自启脚本,/ect/init.d/web
#!/bin/bash
# chkconfig: 3 10 90
# description: script to start/stop web
case $1 in
start)
systemctl stop firewalld
systemctl start docker
vmhgfs-fuse /usr/local/web/php/www/ -o allow_other
vmhgfs-fuse /usr/local/web/nginx/html/ -o allow_other
docker start openresty
docker start redis
docker start mysql
docker start php
;;
stop)
docker stop openresty
docker stop redis
docker stop mysql
docker stop php
systemctl stop docker
;;
*)
echo "Usage: $0 (start|stop)"
;;
esac
添加自启配置
chkconfig --add web
chkconfig web on
chkconfig --level web2345 on //开启2 3 4 5项,0 1 6项为关闭状态
操作完成后可以查看是否成功
chkconfig --list web
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。