Skip to main content

Secure nginx with Let's Encrypt on Ubuntu 18.04

How to Install Solr on Ubuntu 12.04


Solr Installation :-

Apacha Solr requires Tomcat, so the first step, install the Tomcat server:
apt-get install tomcat6



want to get Solr and extract it to a temporary directory:
mkdir -p ~/tmp/solr/
cd ~/tmp/solr/
wget http://apache.ziply.com/lucene/solr/3.6.0/apache-solr-3.6.0.tgz
tar xzvf apache-solr-3.6.0.tgz

All the solr cores and indexes will go in /var/solr:
mkdir -p /var/solr

Copy the Solr webapp and the example multicore configuration files:
cp apache-solr-3.6.0/dist/apache-solr-3.6.0.war /var/solr/solr.war
cp -R apache-solr-3.6.0/example/multicore/* /var/solr/
chown -R tomcat6 /var/solr/

Need to point Catalina at Solr:

echo -e '<Context docBase="/var/solr/solr.war" debug="0"

privileged="true" allowLinking="true" crossContext="true">\n<Environment

name="solr/home" type="java.lang.String" value="/var/solr"

override="true" />\n</Context>' | sudo tee -a  /etc/tomcat6/Catalina/localhost/solr.xml



echo 'TOMCAT6_SECURITY=no' | sudo tee -a /etc/default/tomcat6

Change near the top of the file other environment vars are set up:
JAVA_OPTS="$JAVA_OPTS -Dsolr.home=/var/solr"

Restart Tomcat6 and :
/etc/init.d/tomcat6 restart 

Open to http://localhost:8080/solr/ – you should see it up and running. 

 

 
 
 
 
 
Thanks,
Vishal Vyas 

Comments

  1. Hi, thanks for this tutorial. I am using the new version of of Solr which is 4.2.1 and I followed the steps above. At first run using http://loclahost:8080/solr/ I got an error message about core, it says that something is wrong with the solrconfig.xml (can't remember the message cause I can't reproduce it anymore). And then I tried to repeat the step "..point Catalina at Solr" cause I thought I didn't followed that correctly, and now when I run my localhost:8080/solr I got the message "HTTP 404".

    ReplyDelete
    Replies
    1. Hi Follow this steps :-

      mkdir -p ~/tmp/solr/
      cd ~/tmp/solr/
      wget http://apache.ziply.com/lucene/solr/4.2.1/apache-solr-4.2.1.tgz
      tar xzvf apache-solr-4.2.1.tgz

      All the solr cores and indexes will go in /var/solr:
      mkdir -p /var/solr

      Copy the Solr webapp and the example multicore configuration files:
      cp apache-solr-4.2.1/dist/apache-solr-4.2.1.war /var/solr/solr.war
      cp -R apache-solr-4.2.1/example/multicore/* /var/solr/
      chown -R tomcat6 /var/solr/


      /etc/init.d/tomcat6 restart

      Delete
  2. Hi, great tutorial, you mention this:
    Change near the top of the file other environment vars are set up:
    JAVA_OPTS="$JAVA_OPTS -Dsolr.home=/var/solr"
    But don't say what file? Is it solr.xml?

    ReplyDelete
  3. Hi Vishal,

    its a good tutorial got to learn solr from the above tutorial.
    Can you please provide instructions to install lucene on ubuntu 12.04.

    Regards,
    Vijay

    ReplyDelete
  4. Nice share Linux guru :)

    Thanks,
    Martin Leonis

    ReplyDelete
  5. what does this mean?

    gzip: stdin: not in gzip format
    tar: Child returned status 1
    tar: Error is not recoverable: exiting now
    root@ed-VGN-AW11Z-B:~/tmp/solr# tar xzvf apache-solr-3.6.0.tgz

    happens when i execute this line
    tar xzvf apache-solr-3.6.0.tgz

    ReplyDelete
  6. tell me whre to change this line
    Change near the top of the file other environment vars are set up:
    JAVA_OPTS="$JAVA_OPTS -Dsolr.home=/var/solr"

    ReplyDelete

Post a Comment

Popular posts from this blog

Another instance of Certbot is already running - Solved - Linux guru

Error : Another instance of Certbot is already runningcertbot --server https://acme-v02.api.letsencrypt.org/directory --manual --preferred-challenges dns --installer nginx -d *.vishalvyas.com Another instance of Certbot is already running Reason : when you run certbot form your machine and unexpectedly stop the command, Then cert bot is not running but it left some .certbot.lock files behind.You need to kill the certbot instance form your machine. Solution : Run the below command to find killed certbot.find / -type f -name ".certbot.lock" You can see result of the command, If there are, you can remove them. Run below command to remove them.find / -type f -name ".certbot.lock" -exec rm {} \; And try again.

Install Apache Using Ansible Playbooks

Ansible is a automation tool which is widely used, you can install and install, configure and manage number of system and services remotely. you can install software and manage services and tasks without needing manually log in to each servers. you have to install ansible in one machine and use ssh to communicate host each other.



Ansible uses Playbooks which is written in YAML format. it's uses module base format. with playbook can run multiple tasks at time and provide more advance functionality, YAML file always start with "---" syntax. In this article we will see how to install and configure apahce2 using ansible YAML script. Master server : 10.80.253.11 [Ansible server, ] Slave 1 : 10.80.253.12 [need to install apache2 in slave 1] Slave 2 : 10.80.253.13 [need to install apache2 in slave 2] We need to configure slave server info in our ansible configuration file, click here to know how to add client machine to ansible. Let's update our apache2.yml file and install…

Create aws s3 bucket using cli

In this article i will explain you to how to manage s3 bucket and objects using AWS cli command line interface. for that you will have to configure AWS cli interface to your local linux machine. You can configure cli from. HERE.




After configured aws cli to your local machine, you can run all below commands. How to create bucket using AWS Cli.root@master:~# aws s3 mb s3://linuxgurubucket make_bucket: linuxgurubucket Listing Bucket : To list all bucket : root@master:~# aws s3 ls 2018-05-01 15:28:37 linuxgurubucket To list all objects from bucket :root@master:~# aws s3 ls s3://linuxgurubucket 2018-05-01 15:32:16 71515 vishal.jpg How to copy local file to s3 using aws cp command :root@master:~# aws s3 cp ansible.sh s3://linuxgurubucket/ upload: ./ansible.sh to s3://linuxgurubucket/ansible.sh To check it's upload or not :root@master:~# aws s3 ls s3://linuxgurubucket/ 2018-05-01 15:34:19 82 ansible.sh 2018-05-01 15:32:16 71515 vishal.jpg To remove file from s3 bucket using cli: