标签:查看 hash sys mysq tom free boost lin tst
准备工作
防火墙
systemctl status firewalld 看到active(running)就意味着防火墙打开了
systemctl stop firewalld 看到inactive(dead)就意味着防火墙关闭了
systemctl start firewalld 打开防火墙
systemctl disable firewalld 重启后防火墙还是处于关闭的状态
systemctl enable firewalld 重启不会恢复到原来的状态
systemctl restart firewalld.service 重启防火墙
防火墙端口开放与关闭
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --zone=public --add-port=443/tcp --permanent
firewall-cmd --zone=public --add-port=22/tcp --permanent
firewall-cmd --zone=public --add-port=21/tcp --permanent
firewall-cmd --zone=public --add-port=53/udp --permanent
firewall-cmd --zone=public --remove-port=80/tcp --permanent
firewall-cmd --zone=public --remove-port=443/tcp --permanent
firewall-cmd --zone=public --remove-port=22/tcp --permanent
firewall-cmd --zone=public --remove-port=21/tcp --permanent
firewall-cmd --zone=public --remove-port=53/udp --permanent
firewall-cmd --zone=public --add-port=4400-4600/udp --permanent
firewall-cmd --zone=public --add-port=4400-4600/tcp --permanent
netstat -ntlp //查看当前所有tcp端口·
netstat -ntulp |grep 80 //查看所有80端口使用情况·
netstat -an | grep 3306 //查看所有3306端口使用情况·
查看一台服务器上面哪些服务及端口
netstat -lanp
查看一个服务有几个端口。比如要查看mysqld
ps -ef |grep mysqld
查看某一端口的连接数量,比如3306端口
netstat -pnt |grep :3306 |wc
查看某一端口的连接客户端IP 比如3306端口
netstat -anp |grep 3306
netstat -an 查看网络端口
更新yum源 常用安装依赖
yum install epel-release -y
yum update
yum install -y gcc gcc-c++ pcre pcre-devel openssl openssl-devel zlib zlib-devel
yum -y install ncurses-devel
yum -y install wget vim pcre pcre-devel openssl openssl-devel libicu-devel gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel ncurses ncurses-devel curl curl-devel krb5-devel libidn libidn-devel openldap openldap-devel nss_ldap jemalloc-devel cmake boost-devel bison automake libevent libevent-devel gd gd-devel libtool* libmcrypt libmcrypt-devel mcrypt mhash libxslt libxslt-devel readline readline-devel gmp gmp-devel libcurl libcurl-devel openjpeg-devel
标签:查看 hash sys mysq tom free boost lin tst
原文地址:https://www.cnblogs.com/ddf128/p/12123817.html