vi /etc/rc.localhtml
在文件末尾加入程序的启动脚本centos
但使用CentOS7后发现程序并未开机启动。执行以下命令就行了spa
chmod
+x
/etc/rc
.d
/rc
.
local
code
具体缘由能够都这篇文章:戳我htm
文章中强烈建议建立本身的systemd服务或udev规则来在开机时运行脚本。get
建立本身的systemd服务能够读读这篇文章:it
http://www.centoscn.com/CentOS/config/2015/0507/5374.htmlstream