https://www.howtoforge.com/tutorial/how-to-install-and-configure-solr-on-ubuntu-1604/
sudo apt-get update && apt-get upgrade -y
The command went sort of fine except for 2 errors:
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
But the command
sudo apt-get update
worked just fine
Used the command cd /tmp (to move to this folder)
wget http://apache.uib.no/lucene/solr/7.1.0/solr-7.1.0.tgz
Command seems to have worked fine
tar xzf solr-7.1.0.tgz solr-7.1.0/bin/install_solr_service.sh --strip-components=2
Command above seem to have worked fine
Sudo ./install_solr_service.sh solr-7.1.0.tgz
Solr now runs (can even use the network interface for solr
localhost:8983/solr/
But how to stop and start the service at will?
/opt/solr-7.1.0/bin/solr stop -p
8983
Alternative /opt/solr-7.1.0/bin/solr stop -all
(stops all ports)
Seems to work with network interface atleast, but command
Service solr status says that it is active.... may not be what I should use.
The command /opt/solr-7.1.0/bin/
solr status
gave the result: No solr nodes are running
/opt/solr-7.1.0/bin/
solr start -p 8984 (-p is for port ... can use a different port number)
Command above gives exceptions and error message
I had be use sudo and -force parameter to make the application start (think it is a permission issue with one of the files)
Without -force the application terminates as it do not like to be started with escalated privileges
sudo /opt/solr-7.1.0/bin/
solr start -force
When running the command /opt/solr-7.1.0/bin/
solr status
I now get the result:"Found 1 Solr nodes Solr process 23111 running on port 8983" ... (omitted)
The Solr network interface works agains
/opt/solr-7.1.0/bin/solr stop -all
This command seems not to work
But...
/opt/solr-7.1.0/bin/solr stop -p
8983
seems to work :D
===========================================================================
Commands I will use:
localhost:8983/solr/ (in browser)
/opt/solr-7.1.0/bin/solr stop -p
8983
/opt/solr-7.1.0/bin/
solr status
sudo /opt/solr-7.1.0/bin/
solr start -force