晚风

博客园 首页 新随笔 联系 订阅 管理

修改/etc/rc.d/rc.local文件,修改完成后需执行以下指令才能正常自启动

chmod +x /etc/rc.d/rc.local

 

#!/bin/bash
# THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES
#
# It is highly advisable to create own systemd services or udev rules
# to run scripts during boot instead of using this file.
#
# In contrast to previous versions due to parallel execution during boot
# this script will NOT be run after all other services.
#
# Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure
# that this script will be executed during boot.
 
 

export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.191-2.6.15.4.el7_5.x86_64
export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:.
export PATH=$PATH:$JAVA_HOME/bin
export CATALINA_HOME=/usr/local/tomcat/apache-tomcat-7.0.28



/usr/local/tomcat/apache-tomcat-7.0.28/bin/startup.sh

/usr/local/nginx/sbin/nginx

touch /var/lock/subsys/local

 

posted on 2018-08-23 16:34  晚风  阅读(437)  评论(0编辑  收藏  举报