标签:00 supervisor supervisord nginx 0.0 etc sysctl
cat /etc/redhat-release && uname -r
CentOS Linux release 7.8.2003 (Core)
3.10.0-1127.el7.x86_64
systemctl stop firewalld && systemctl disable firewalld
echo SELINUX=disabled > /etc/sysconfig/selinux
cp -pv /etc/sysctl.conf /etc/sysctl.conf.bak
echo "net.ipv4.tcp_fin_timeout=2" >> /etc/sysctl.conf
echo "net.ipv4.tcp_tw_reuse=1" >> /etc/sysctl.conf
echo "net.ipv4.tcp_tw_recycle=1" >> /etc/sysctl.conf
sysctl -p
yum install -y supervisor nginx
supervisord -c /etc/supervisord.conf && cp -pv /etc/supervisord.conf /etc/supervisord.conf.bak
touch /etc/supervisord.d/nginx.ini && cat /etc/supervisord.d/nginx.ini
[program:nginx]
command = /usr/sbin/nginx
autostart=true
autorestart=unexpected
exitcodes=0
stdout_logfile=/var/log/nginx/error.log
supervisorctl reload 修改配置文件从新加载
supervisorctl start/restart nginx 管理nginx
systemctl restart supervisord && systemctl enable supervisord
http://192.168.1.16:9001/ 启用web页
ps -ef | grep supervisor
root 1503 1 0 21:36 ? 00:00:00 /usr/bin/python /usr/bin/supervisord -c /etc/supervisord.conf
root 1522 1305 0 21:36 pts/0 00:00:00 grep --color=auto supervisor
netstat -tuplna | grep 9001
tcp 0 0 127.0.0.1:9001 0.0.0.0:* LISTEN 1503/python
netstat -tuplna | grep nginx
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 2758/nginx: worker
tcp6 0 0 :::80 :::* LISTEN 2758/nginx: worker
kill -9 2758
netstat -tuplna | grep nginx
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 3061/nginx: master
tcp6 0 0 :::80 :::* LISTEN 3061/nginx: master
标签:00,supervisor,supervisord,nginx,0.0,etc,sysctl 来源: https://blog.51cto.com/mailfile/2872266
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。