1、网络配置 1.1动态获取IP dhclient 1.2静态IP 修改/etc/sysconfig/network-scripts/ifcfg-ens33

		
		TYPE=Ethernet
		PROXY_METHOD=none
		BROWSER_ONLY=no
		**BOOTPROTO=static**
		DEFROUTE=yes
		IPV4_FAILURE_FATAL=no
		IPV6INIT=yes
		IPV6_AUTOCONF=yes
		IPV6_DEFROUTE=yes
		IPV6_FAILURE_FATAL=no
		IPV6_ADDR_GEN_MODE=stable-privacy
		NAME=ens33
		UUID=47142241-91cf-415e-81bb-4cfa6e7f2494
		DEVICE=ens33
		**ONBOOT=yes**
		**IPADDR=192.168.48.110
		NETMASK=255.255.255.0
		GATEWAY=192.168.48.2***

2、ifconfig命令找不到

yum search ifocnfig
yum install net-tools.x86_64

3、查看开启的端口 netstat -ntlp

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 127.0.0.1:6379          0.0.0.0:*               LISTEN      1003/redis-server 1 
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      991/sshd            
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      1186/master         
tcp6       0      0 :::22                   :::*                    LISTEN      991/sshd            
tcp6       0      0 :::23                   :::*                    LISTEN      1/systemd           
tcp6       0      0 ::1:25                  :::*                    LISTEN      1186/master  

4、防火墙打开端口 firewall-cmd --zone=public --add-port=6379/tcp --permanent 开端口命令:firewall-cmd --zone=public --add-port=80/tcp --permanent 重启防火墙:systemctl restart firewalld.service 命令含义: --zone #作用域 --add-port=80/tcp #添加端口,格式为:端口/通讯协议 --permanent #永久生效,没有此参数重启后失效

5、查看防火墙允许访问的端口 firewall-cmd --list-ports