1./usr/local/目录下新建文件 autostart.sh 内容为:
#!/bin/bash#chkconfig: 2345 80 90#description:开机自动启动的脚本程序
mkdir /var/run/mariadbcd
/var/run/mariadtouch mariadb.pidchown mysql:mysql
/var/run/mariadb//usr/local/nginx/sbin/nginx >
/dev/null 2>&1 &/usr/local/php/sbin/php-fpm >
/dev/null 2>&1 &/usr/local/mysql/bin/mysqld_safe >
/dev/null 2>&1 &/usr/bin/vmhgfs-fuse .host:/ /mnt/win -o subtype=vmhgfs-fuse,allow_other/usr/local/memcached/bin/memcached -unobody >
/dev/null 2>&1 &2.将脚本添加到开机启动项中编辑 /etc/rc.d/rc.local 加入 /usr/local/autoStart > /dev/null 2&>1 &