yum search java | grep -i --color JDK升级:
yum install java-1.7.0-openjdk java-1.7.0-openjdk-devel
安装tomcat7:
unzip apache-tomcat-7.0.54.zipmv apache-tomcat-7.0.54 /data/tomcat7修改端口:/data/tomcat7/conf/server.xml 8080就是:
启动tomcat7:
cd /data/tomcat7/binchmod +x ./shutdown.sh ./startup.sh ./catalina.sh./startup.sh提示如下表示成功:
Using CATALINA_BASE: /data/tomcat7Using CATALINA_HOME: /data/tomcat7Using CATALINA_TMPDIR: /data/tomcat7/tempUsing JRE_HOME: /usrUsing CLASSPATH: /data/tomcat7/bin/bootstrap.jar:/data/tomcat7/bin/tomcat-juli.jarTomcat started.访问:http://localhost:8080 查看 设置tomcat gui权限:
vi /data/tomcat7/conf/tomcat-users.xml将:
改为:
安装solr4.9
unzip solr-4.9.0.zipcd solr-4.9.0cp solr-4.9.0/dist/solr-4.9.0.war /data/tomcat7/webapps/solr.war修改solr索引文件主目录:/data/tomcat7/webapps/solr/WEB-INF/web.xml
改为:
创建solr索引目录:solr/home /data/solr java.lang.String
mkdir -p /data/solrcp -rf solr-4.9.0/example/solr/* /data/solr/修改/data/solr/collection1/conf/solrconfig.xml:
${solr.data.dir:}改为:
${solr.data.dir:/data/solr/collection1/data}最后复制相应的jar文件(重要):
cp -rf solr-4.9.0/example/lib/ext/* /data/tomcat7/lib/cp -rf solr-4.9.0/example/resources/log4j.properties /data/tomcat7/lib最后重启tomcat7:
/data/tomcat7/bin/shutdown.sh/data/tomcat7/bin/startup.sh