Linux下vi编辑模式的使用
参考链接:https://www.cnblogs.com/sharpest/p/7427460.html
Linux中查看软件目录
参考链接:https://www.cnblogs.com/mfryf/p/3611359.html
centos6开放端口
参考链接:https://www.cnblogs.com/liyuanhong/articles/7064582.html
centos7开放端口
参考链接:https://www.cnblogs.com/oskyhg/p/8011001.html
查看已经开放的端口:
firewall-cmd --list-ports
开启端口
firewall-cmd --zone=public --add-port=80/tcp --permanent
返回success为成功
命令含义:
–zone #作用域
–add-port=80/tcp #添加端口,格式为:端口/通讯协议
–permanent #永久生效,没有此参数重启后失效
开启断绝口后需要重启防火墙
重启防火墙
systemctl restart firewalld.service
Linux保持程序运行
使用supervisor
参考链接:https://www.cnblogs.com/zhoujinyi/p/6073705.html
https://blog.csdn.net/tengqingyong/article/details/81569903
supervisor相关命令
参考链接:https://blog.csdn.net/lin_tuer/article/details/78443481
[启动supervisord]
[root@iZ94xdyrdjmZ etc]# supervisord
如果修改了 /etc/supervisord.conf ,需要执行 supervisorctl reload 来重新加载配置文件
Error: Another program is already listening on a port that one of our HTTP servers is configured to use. Shut this program down first before starting
解决方法:
find / -name supervisor.sock
unlink /name/supervisor.sock
nohub使程序在后台运行
参考链接:https://blog.csdn.net/jiangyu1013/article/details/81476184
# nohup python3 /home/dong/say_to_lady.py &
再按下回车