精简版起步tomcat
精简版启动tomcat启动 java -Djava.util.logging.config.file/work/solr/conf/logging.properties -Djava
精简版启动tomcat
启动 java -Djava.util.logging.config.file=/work/solr/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/work/solr/common/endorsed -classpath /work/solr/bin/bootstrap.jar -Dcatalina.base=/work/solr -Dcatalina.home=/work/solr? -Dsolr.solr.home=/work/solr/solr -Djava.io.tmpdir=/work/solr/temp org.apache.catalina.startup.Bootstrap start
?
脚本 #!/bin/bash
solr=$dist/sys/solr
solr_conf=$conf/solr
solr_data=$data/solr
solr_log=$logs/sys/solr.log
solr_waiting=5
solr_param="-server -Xms1024m -Xmx4096m -XX:PermSize=96m -XX:MaxPermSize=256m -Xmn1000m -XX:SurvivorRatio=10 -XX:+UseConcMarkSweepGC -XX:+UseCMSCompactAtFullCollection -XX:CMSMaxAbortablePrecleanTime=5000 -XX:+CMSClassUnloadingEnabled -XX:CMSInitiatingOccupancyFraction=80 -XX:+UseCompressedOops -Djava.awt.headless=true -Dsolr.solr.home=${solr_conf} -Dorg.apache.lucene.FSDirectory.class=org.apache.lucene.store.NIOFSDirectory"
cmd_start(){
ret=`ps -ef|grep "/duitang/dist/conf/solr"|grep -v grep|wc -l|awk '{if (int($0)>0) print 0;else print 1}'`
if [ $ret == 1 ]; then
cd $solr
nohup java $solr_param -jar start.jar >${solr_log} &
fi
}
cmd_stop(){
ps -ef|grep solr|grep -v grep|awk '{print $2}'|xargs kill &>/dev/null
}
cmd_status(){
#ret=`curl -s http://localhost:7100/solr/admin/ping?indent=on |grep -i status|grep -i ok|tr -d '\r'|tr -d '\n'|wc -c|awk '{if (int($0)>0) print 0;else print 1}'`
ret=`curl -s http://localhost:7100/solr/item/admin/ping?indent=on |grep -i status|grep -i ok|tr -d '\r'|tr -d '\n'|wc -c|awk '{if (int($0)>0) print 0;else print 1}'`
return `expr $ret`
}
?
?
?
?