Solr Installation 1
Lets see how to Install Solr, it is very easy and we are going to do that in this Solr Installation guideline. So let s start! Let s start for Linux and Mac. We ll guide you trough tutorial, live on staging server. First of all, you need to download latest Solr version. 2
Execute wget command from command line interface: wget http://ftp.carnet.hr/misc/apache/lucene/solr/4.5.1/solr-4.5.1.tgz 3
Once your file is successfully downloaded, you will see the file will be in tar.gz format, so you will have to extract it. You can easily extract this using next command: tar -zxvf solr-4.5.1.tgz 4
After we finish downloading and extracting it, you must have the following in your directory: 5
The next step is to position your command line to solr-4.5.1./example. In that directory you have file called start.jar. Executing that file from command line you are starting Apache Solr. There are two ways to start Apache Solr: 1 st Way: Start it and keep running until console is closed. 2 nd Way: Start and run in background until you choose to stop it from command line. If you are working on any important tasks then you can start with 2 nd Way. And if you are testing on local/staging server use 1 st Way. We ll discuss with you Linux commands for both cases, so let s start for first 1 st way: 6
The first thing you need is set your position to example directory, which you can find under: yoursrootdirectory/solr/solr-4.5.1./example 7
1st Way of Installation Solr Installation User Guide Now when you are in example directory, you can check for your start.jar file with ls command. That is our file which we need to execute for starting Solr. Solr will start with this command: java -jar start.jar 8
1st Way of Installation Solr Installation User Guide Now your Solr is started and ready for use. Default Solr port is 8983 which you can change in example/etc/jetty.xml. Look for the line <Set name= port ><SystemProperty name= jetty.port default= 8983 /></Set> and change it. For this guideline we set port to 8984 and when we visit our URL we see our Solr running: This Solr will run until you close your command line interface or you press Ctrl + C. 9
2nd Way of Installation Solr Installation User Guide For this way, we need a different starting command. Position yourself into example directory like we have discussed earlier and execute this command: nohup java -jar start.jar 10
2nd Way of Installation Solr Installation User Guide Running this command lets you to run Solr in background and now you can close your command line or press Ctrl + C, and your Solr will continue running until we kill the process. How to do that? We will show you in the next steps: For listing all processes from one user execute this command: ps -u user (user is your username which you used in connection ). After that you will get a list of processes under your username: 11
2nd Way of Installation Solr Installation User Guide Now you can see my java process is under number 15433. We will use that number and execute command to kill process: kill 15433 12
Help / Support To know more about our Magento Extension Service feel free to call us at +1.631.897.7276 or email us at info@brainvire.com 13