<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>java &#8211; lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</title>
	<atom:link href="http://lifelinux.com/tag/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://lifelinux.com</link>
	<description>All About Linux !</description>
	<lastBuildDate>Mon, 16 Mar 2015 11:19:30 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.5.3</generator>
	<item>
		<title>How To Install Solr 4.10.4 On CentOS 6.5</title>
		<link>http://lifelinux.com/how-to-install-solr-4-10-4-on-centos-6-5/</link>
					<comments>http://lifelinux.com/how-to-install-solr-4-10-4-on-centos-6-5/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Mon, 16 Mar 2015 11:16:09 +0000</pubDate>
				<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[web programming]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[install solr 4.10.4]]></category>
		<category><![CDATA[install solr on centos]]></category>
		<category><![CDATA[java]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=1955</guid>

					<description><![CDATA[<p>Solr is highly reliable, scalable and fault tolerant, providing distributed indexing, replication and load-balanced querying, automated failover and recovery, centralized configuration and more. Solr powers the search and navigation features of many of the world&#8217;s largest internet sites. In this tutorial I will explain How to install Solr 4.10.4 on CentOS 6.5. The first of [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://lifelinux.com/how-to-install-solr-4-10-4-on-centos-6-5/">How To Install Solr 4.10.4 On CentOS 6.5</a> appeared first on <a rel="nofollow" href="http://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><blockquote><p>Solr is highly reliable, scalable and fault tolerant, providing distributed indexing, replication and load-balanced querying, automated failover and recovery, centralized configuration and more. Solr powers the search and navigation features of many of the world&#8217;s largest internet sites.</p></blockquote>
<p><span id="more-1955"></span></p>
<p>In this tutorial I will explain How to install Solr 4.10.4 on CentOS 6.5. The first of all, Login as root user.</p>
<h2>Installing JAVA</h2>
<p>To start things off first check if you have Java installed:</p>
<pre># which java
</pre>
<p>If you do not have Java installed check for latest version:</p>
<pre># yum list available | grep openjdk
</pre>
<p>Outputs</p>
<pre>java-1.6.0-openjdk.x86_64                  1:1.6.0.34-1.13.6.1.el6_6     updates
java-1.6.0-openjdk-demo.x86_64             1:1.6.0.34-1.13.6.1.el6_6     updates
java-1.6.0-openjdk-devel.x86_64            1:1.6.0.34-1.13.6.1.el6_6     updates
java-1.6.0-openjdk-javadoc.x86_64          1:1.6.0.34-1.13.6.1.el6_6     updates
java-1.6.0-openjdk-src.x86_64              1:1.6.0.34-1.13.6.1.el6_6     updates
java-1.7.0-openjdk-demo.x86_64             1:1.7.0.75-2.5.4.0.el6_6      updates
java-1.7.0-openjdk-devel.x86_64            1:1.7.0.75-2.5.4.0.el6_6      updates
java-1.7.0-openjdk-javadoc.noarch          1:1.7.0.75-2.5.4.0.el6_6      updates
java-1.7.0-openjdk-src.x86_64              1:1.7.0.75-2.5.4.0.el6_6      updates
java-1.8.0-openjdk.x86_64                  1:1.8.0.31-1.b13.el6_6        updates
java-1.8.0-openjdk-demo.x86_64             1:1.8.0.31-1.b13.el6_6        updates
java-1.8.0-openjdk-devel.x86_64            1:1.8.0.31-1.b13.el6_6        updates
java-1.8.0-openjdk-headless.x86_64         1:1.8.0.31-1.b13.el6_6        updates
java-1.8.0-openjdk-javadoc.noarch          1:1.8.0.31-1.b13.el6_6        updates
java-1.8.0-openjdk-src.x86_64              1:1.8.0.31-1.b13.el6_6        updates
</pre>
<p>Type the following command to install java</p>
<pre># yum install java-1.8.0-openjdk.x86_64
</pre>
<p>Finally, check Java version:</p>
<pre># java -version
java version "1.8.0_75"
OpenJDK Runtime Environment (rhel-2.5.4.0.el6_6-x86_64 u75-b13)
OpenJDK 64-Bit Server VM (build 24.75-b04, mixed mode)
[root@host-129-19 ~]# 
</pre>
<h2>Installing Solr</h2>
<p>Install the latest version Solr release by downloading from http://www.us.apache.org/dist/lucene/solr/</p>
<pre># cd /opt/
# wget http://www.us.apache.org/dist/lucene/solr/4.10.4/solr-4.10.4.tgz
</pre>
<p>Extracting solr package:</p>
<pre># tar zxvf solr-4.10.4.tgz
# mv solr-4.10.4 solr
</pre>
<p>Renaming &#8220;example&#8221; directory to project name, example &#8220;core&#8221;:</p>
<pre># cd solr
# mv example core
</pre>
<h2>Running Solr</h2>
<p>You should now be able to test running the Solr server with following command</p>
<pre># cd /opt/solr/core
# java -jar start.jar
</pre>
<p>If everything works correctly you should be able to view the Solr server admin by going to:<br />
http://[server hostname or IP]:8983/solr/<br />
If this does not work try viewing the log /opt/solr/solr/logs/solr.log</p>
<h2>Auto Start Apache Solr</h2>
<p>First, create script for handling the Solr server service</p>
<pre># vi /etc/init.d/solr
</pre>
<p>And add the following script</p>
<pre>#!/bin/sh 
# chkconfig: 2345 95 20 
# description: Solr Server 
# Solr Server service start, stop, restart 
# @author Shay Anderson 10.13 

SOLR_DIR="/opt/solr/core" 
JAVA="/usr/bin/java -DSTOP.PORT=8079 -DSTOP.KEY=a09df7a0d -jar start.jar" 
LOG_FILE="/opt/solr/core/logs/solr-server.log" 

case $1 in 
      start) 
            echo "Starting Solr..." 
            cd $SOLR_DIR 
            $JAVA 2&gt; $LOG_FILE &amp; 
            sleep 3 
            ;; 
      stop) 
            echo "Stopping Solr..." 
            pkill -f start.jar &gt; /dev/null 
            RETVAL=$? 
            if [ $RETVAL -eq 0 ]; then 
                  echo "Stopped" 
            else 
                  echo "Failed to stop" 
            fi 
            ;; 
      restart) 
            $0 stop 
            sleep 2 
            $0 start 
            ;; 
      *) 
            echo "Usage: $0 [start|stop|restart]" 
            exit 1 
            ;; 
esac 

exit 0
</pre>
<p>To run Apache Solr by default when the system boots, type the following command</p>
<pre>
# chmod +x /etc/init.d/solr
# chkconfig --level 345 solr on
</pre>
<g:plusone href="http://lifelinux.com/how-to-install-solr-4-10-4-on-centos-6-5/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="http://lifelinux.com/how-to-install-solr-4-10-4-on-centos-6-5/">How To Install Solr 4.10.4 On CentOS 6.5</a> appeared first on <a rel="nofollow" href="http://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://lifelinux.com/how-to-install-solr-4-10-4-on-centos-6-5/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
