Open trinhvanbien opened 7 years ago
Done
Hướng dẫn
copy & paste nội dung sau vào file
JRE_HOME=/usr/java/jre1.8.0_40 export JRE_HOME PATH=$JRE_HOME/bin:$PATH export PATH CATALINA_HOME=/opt/apache-tomcat-7.0.63
case $1 in start) /bin/su tomcat $CATALINA_HOME/bin/startup.sh ;; stop) /bin/su tomcat $CATALINA_HOME/bin/shutdown.sh ;; restart) /bin/su tomcat $CATALINA_HOME/bin/shutdown.sh /bin/su tomcat $CATALINA_HOME/bin/startup.sh ;; esac exit 0
dựng tomcat chạy như service trên linux, để tomcat tự động khởi động lại khi máy bị restart.
áp dụng với cả haproxy.