1.查看IP地址
ip addr
2.保存并退出
:wq
3.防火墙
(1)设置开机启用防火墙:systemctl enable firewalld.service
(2)设置开机禁用防火墙:systemctl disable firewalld.service
(3)启动防火墙:systemctl start firewalld
(4)关闭防火墙:systemctl stop firewalld
(5)检查防火墙状态:systemctl status firewalld
4.查看已经开放的端口
firewall-cmd --list-all
5.对外开放端口
firewall-cmd --add-port=8080/tcp --permanent
firewall-cmd --reload