学习nginx接触到的linux中的命令行
- service在/sbin目录下,是一个脚本文件,它通过检查/etc/init.d目录中的一系列脚本文件来识别各个服务,并调用这些脚本从而实现对服务的控制。
service脚本的基本用法为:service 服务名称 start|stop|restart|status。例如service nginx restart
- systemctl是一个systemd工具,主要负责控制systemd系统和服务管理器(这句话说的比较官方,具体还要多实践感受)
systemctl restart nginx
- nginx -s reload是用进程pid启动nginx服务,nginx -c nginx地址/nginx.conf -c 指定配置文件
这个是遇到的坑https://ccxlqc.github.io/2019/01/20/nginx/