一 下载安装所需文件
http://archive.apache.org/dist/lucene/solr/
solr-5.5.4.tgz
http://archive.apache.org/dist/tomcat/tomcat-8/
apache-tomcat-8.5.13.tar.gz
二 在centos7上创建目录
mkdir /usr/local/solr
mkdir /usr/local/tomcat
三 上传文件
解压solr文件
tar -zxvf solr-5.5.4 -C /usr/local/solr/
解压tomcat文件
四 拷贝文件
复制solr-5.4.4/server/solr-webapp/webapp到tomcat下的webapps目录下,并改名为solr。
cp -r /usr/local/solr/solr-5.5.4/server/solr-webapp/webapp /usr/local/tomcat/apache-tomcat-8.5.13/webapps/solr
将solr-5.4.4/server/lib/ext/目录下的所有jar包复制到tomcat/webapps/solr/WEB-INF/lib/下
cp -r /usr/local/solr/solr-5.5.4/server/lib/ext/* /usr/local/tomcat/apache-tomcat-8.5.13/webapps/solr/WEB-INF/lib/
创建classes文件
/usr/local/tomcat/apache-tomcat-8.5.13/webapps/solr/WEB-INF
mkdir classes
将solr-5.4.4/server/resources下的log4j.properties文件复制到tomcat7/weapps/solr/WEB-INF/classes目录下
cp /usr/local/solr/solr-5.5.4/server/resources/log4j.properties /usr/local/tomcat/apache-tomcat-8.5.13/webapps/solr/WEB-INF/classes/
将solr-5.4.4/server/solr目录复制到tomcat目录下并重命名为solr_home
cp -r /usr/local/solr/solr-5.5.4/server/solr /usr/local/tomcat/apache-tomcat-8.5.13/solr_home
修改 tomcat8/weapps/solr/WEB-INF/下的web.xml 将注释去掉(下面的这块默认是注释掉的)
/usr/local/tomcat/apache-tomcat-8.5.13/webapps/solr/WEB-INF/web.xml
/usr/local/tomcat/apache-tomcat-8.5.13/solr_home
关闭防火墙
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
五创建核
拷贝Jar包
/usr/local/solr/solr-5.5.4/dist
(1)solr-dataimporthandler-5.3.1jar
(2)solr-dataimporthandler-extras-5.3.1.jar
to:/usr/local/tomcat/apache-tomcat-8.5.13/webapps/solr/WEB-INF/lib
cp -r /usr/local/solr/solr-5.5.4/dist/solr-dataimporthandler-5.5.4.jar /usr/local/tomcat/apache-tomcat-8.5.13/webapps/solr/WEB-INF/lib
cp -r /usr/local/solr/solr-5.5.4/dist/solr-dataimporthandler-extras-5.5.4.jar /usr/local/tomcat/apache-tomcat-8.5.13/webapps/solr/WEB-INF/lib
创建文件夹
/usr/local/tomcat/apache-tomcat-8.5.13/solr_home
mkdir GlobalEnergy