项目启动指令集

# cat runjstatd.sh 

/home/java_sun/bin/jstatd -J-Djava.rmi.server.hostname=192.168.0.* -J-Djava.security.policy=jstatd.all.policy

  

# cat jstatd.all.policy

 

grant codebase "file:/usr/local/java/lib/tools.jar" {
   permission java.security.AllPermission;
};
  

# cat run.sh 

dateStr=`date +%y%m%d`

serverLog=log/serverlog.${dateStr}

/home/java_sun/bin/java -Dcom.sun.management.jmxremote.port=6000 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -server -Xms256m -Xmx512m -XX:+PrintGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCApplicationStoppedTime -Xloggc:gc.log -jar X.jar aa=1 1>>${serverLog} 2>&1

echo "server stop now!"

 

 

# cat test.sh 

cp=.;

for loop in `ls lib/*.jar`;do

cp=${cp}:${loop}

done

 

 

cp2=`ls  lib/*.jar | xargs  | sed 's/ /:/g'`

cp3=`find lib -name "*.jar" | xargs | sed 's/ /:/g'`

echo $cp3

 

-Djava.rmi.server.hostname=192.168.1.80
-Dcom.sun.management.jmxremote.port=8089
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false

 

 /usr/local/jdk/bin/java -Xms1g -Xmx6g -XX:+HeapDumpOnOutOfMemoryError -classpath ./config:./config/parameter:.:/usr/local/jdk/lib/tools.jar:./lib/javassist.jar:./lib/ibatis-2.3.4.726.jar:./lib/commons-collections-3.2.1.jar:./lib/tomcat-naming-common.jar:./lib/slf4j-simple-1.5.0.jar:./lib/fee_portal-api-1.0.jar:./lib/log4j-1.2.14.jar:./lib/proxool-cglib.jar:./lib/antlr.jar:./lib/mina-core-2.0.0-M5.jar:./lib/commons-logging.jar:./lib/leoframework.jar:./lib/dom4j-1.6.1.jar:./lib/proxool-0.9.1.jar:./lib/ibatis-dao-2.jar:./lib/slf4j-api-1.5.0.jar:./lib/mysql-connector-java-5.1.6-bin.jar:./lib/commons-pool-1.4.jar:./lib/commons-dbcp-1.2.2.jar:./lib/jdom.jar:./dist/X-common-1.0-YY.jar:./dist/X-server-XX.jar -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false com.XX.GameServer

你可能感兴趣的:(启动)