Simple installation of Solr4.7 in CentOS
I. Environment preparation:
System Environment: CentOS 6.2
Tomcat 7.0.47
Jdk-7u9
Solr-4.7.0
First, upload the package to the/tmp directory.
1. jdk Installation
[Root @ svn-server/] # cd/tmp/
[Root @ svn-server/] # tar zxvf jdk-7u9-linux-x64.tar.gz
[Root @ svn-server/] # mv jdk1.7.0 _ 09/usr/
[Root @ svn-server/] # vi/etc/profile
Copy the following code in the last line to add the following content:
JAVA_HOME =/usr/jdk1.7.0 _ 09/
CLASSPATH =.: $ JAVA_HOME/lib/tools. jar
PATH = $ JAVA_HOME/bin: $ PATH
Export JAVA_HOME CLASSPATH PATH
Save and exit (: wq !) Then, execute the following command to take effect:
Source/etc/profile
2. tomcat installation
Decompress the tomcat package to the tmp directory:
[Root @ svn-server tmp] tar zxvf apache-tomcat-7.0.47.tar.gz
Move the tomcat package to/usr/local/tomcat:
[Root @ svn-server tmp] mv apache-tomcat-7.0.47/usr/local/tomcat
Ii. Install solr
1. Decompress solr
[Root @ svn-server tmp] tar-zxvf solr-4.7.0.tgz
2. Move the solr package to the opt directory:
[Root @ svn-server tmp] mv/tmp/solr-4.7.0/opt/solr
3. Copy solr. war in exmaple/webapps to tomcat
[Root @ svn-server tmp] makdir-p/opt/tomcat/webapps
[Root @ svn-server tmp] cp/opt/solr/example/webapps/solr. war/opt/tomcat/webapps/
[Root @ svn-server tmp] vim/usr/local/tomcat/conf/server. xml
<Host name = "localhost" appBase = "/opt/tomcat/webapps"
UnpackWARs = "true" autoDeploy = "true">
Change webapps to/opt/tomcat/webapps;
4. Start tomcat, automatically decompress solr. war, and modify web. xml under the solr project.
[Root @ svn-server tmp] cd/usr/local/tomcat/bin/
[Root @ svn-server bin]./startup. sh
[Root @ svn-server bin] vi/opt/tomcat/webapps/solr/WEB-INF/web. xml
5. Modify the solr home configuration (Note: You need to remove the comments of this Section, otherwise it will not take effect ):
<Env-entry>
<Env-entry-name> solr/home </env-entry-name>
<Env-entry-value>/opt/solr/example/solr </env-entry-value>
<Env-entry-type> java. lang. String </env-entry-type>
</Env-entry>
6. Copy the jar package under solr/example/lib/ext to/tomcat/../solr/WEB-INF/lib:
[Root @ svn-server tmp] cp/opt/solr/example/lib/ext/*. jar/opt/tomcat/webapps/solr/WEB-INF/lib/
7. Create classpath under tomcat solr and copy example/resources/log4j. properties to classpath:
[Root @ svn-server tmp] mkdir-p/opt/tomcat/webapps/solr/classpath
[Root @ svnserver tmp] cp/opt/solr/example/resources/log4j. properties/opt/tomcat/webapps/solr/classpath/
8. Restart tomcat after configuration is complete.
/Usr/local/tomcat/bin/shutdown. sh
/Usr/local/tomcat/bin/startup. sh
9. Enter http: // 192.168.1.196: 8080/solr/in the browser to go to The solr admin screen.
4. simple installation is complete!
Reply to this post in time if you have any questions !!!
Solr details: click here
Solr: click here
Solr3.6.1 build an environment in Tomcat6
Tomcat-based Solr3.5 cluster deployment
Load Balancing for Solr clusters using Nginx on Linux
Install and use Solr in Linux
Deploy Solr 4 on Ubuntu 12.04 LTS through Tomcat
Solr implements Low Level query parsing (QParser)
Build a search Server Based on Solr 3.5
Solr 3.5 development and application tutorial PDF
Solr 4.0 deployment instance tutorial