[Linux] centos7 add the script to the /etc/rc.local file, boot from the start

Linux set the boot from the start, add the command to /etc/rc.d/rc.local, this paper tomcat set an example:

A: Add command from the start

export JAVA_HOME=/usr/java/jdk1.8.0_211

export JRE_HOME=$JAVA_HOME/jre

sh /usr/tomcat/apache-tomcat-9.0.20/bin/startup.sh

Two: rc.local file to add execute permissions

  chmod +x rc.local

Guess you like

Origin www.cnblogs.com/xioawu-blog/p/10989986.html