Installing Apache Solr on Ubuntu is quite easy. In fact, it does not require any installation. All you will need to do is just download and extract the package. But before you proceed, make sure you have already installed Tomcat which is necessary to access Solr from the browser.
To make further management of Solr server easy, we will first create a separate user for it.
sudo adduser solr
You will be asked to enter a password for solr user as well as additional information which you can ignore by simply pressing Enter. Once done, login to this user. When password is prompted, enter the password you have just created.
su - solr
Once you are logged in, you will be in /home/solr directory.
Now download the latest version of Apache Solr from the official site. On that site you will be given a list of mirror sites to download the installation package. Click on one of them. You will see a list of several versions of Solr. Choose the latest one. Copy the URL of the file (*.tgz) and download it from the terminal as shown below.
wget http://mirror.apache-kr.org/lucene/solr/4.0.0/apache-solr-4.0.0.tgz
Extract the package.
tar xzf apache-solr-4.0.0.tgz
All files will be extracted to apache-solr-4.0.0/ directory. This is all you need to continue to work with Solr. To configure Solr server to connect to a CUBRID Database, see the next tutorial.