在学习FastDFS过程中,开机自动开启的问题我找了一天,最后还是直接写一个脚本,开机的时候执行脚本开启。
希望能帮到你们把,首先cd到/etc/init.d创建(touch)一个test.sh文件.
#!/bin/bash
# command content
systemctl start fdfs_storaged
systemctl start fdfs_trackerd
sudo /usr/local/nginx/sbin/./nginx -c /usr/local/nginx/conf/nginx.conf
exit 0
~
开机的时候直接在命令界面输入:
/etc/init.d/test.sh