Linux初步接触之常见问题

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 &

再按下回车

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值