可以把 需要设置为开机自执行的脚本放到 配置文件:/etc/rc.local,参考内容如下:
/etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
/etc/init.d/nginx start
/alidata/server/php/sbin/php-fpm -c /alidata/server/php/etc/php.ini -y /alidata/server/php/etc/php-fpm.conf
/etc/init.d/vsftpd start
/alidata/www/go/gocron/run.sh start
相关文章: