Linux常见命令

apache
启动
systemctl start httpd
停止
systemctl stop httpd
重启
systemctl restart httpd

mysql
启动
systemctl start mysqld
停止
systemctl stop mysqld
重启
systemctl restart mysqld

php-fpm
启动
systemctl start php-fpm
停止
systemctl stop php-fpm
重启
systemctl restart php-fpm

nginx
启动
systemctl start nginx
停止
systemctl stop nginx
重启
systemctl restart nginx

1.查看防火墙状态
firewall-cmd –state
2.启动防火墙
systemctl start firewalld
3.关闭防火墙
systemctl stop firewalld
4.检查防火墙开放的端口
firewall-cmd –permanent –zone=public –list-ports
5.开放一个新的端口
firewall-cmd –zone=public –add-port=8080/tcp –permanent
6.重启防火墙
firewall-cmd –reload
7.验证新增加端口是否生效
firewall-cmd –zone=public –query-port=8080/tcp
8.防火墙开机自启动
systemctl enable firewalld.service
9.防火墙取消某一开放端口
firewall-cmd –zone=public –remove-port=9200/tcp –permanent

lsof -i tcp:9000

free -m

About the Author: xp2020

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注