1.修改主机名称
终端模式下:
hostnamectl set-hostname server2
执行过程中可能要输入密码
hostnamectl命令查看主机信息,可以查看到主机信息已经发生修改,之后reboot重启主机。
2.关闭防火墙
systemctl stop firewalld
systemctl disable firewalld
报错:

接着执行:
sudo systemctl disable firewalld
会显示:
administrator is not in the sudoers file. 1 This incident will be reported.
为了解决这个问题执行以下解决方案:
su -
systemctl disable firewalld
sudo visudo
在打开的编辑器中,找到类似于以下的行(具体取决于你的系统配置):
Allow root to run any commands anywhere
root ALL=(ALL:ALL) ALL
在root这一行加上一行代码:
Allow root to run any commands anywhere
root ALL=(ALL:ALL) ALL
administrator ALL=(ALL:ALL) ALL
按下Esc,:wq 保存退出
查看防火墙状态:
sudo systemctl status firewalld
如果出现inactive说明防火墙已经关闭
3.将 SELinux 的模式设置为“宽容模式”(Permissive Mode)。在这种模式下,SELinux 仍然会评估所有的安全策略规则,但不会强制执行这些规则。
setenforce 0
如果执行不成功,请切换到root用户下执行
4.管理网络连接
nmcli con show或者nmcli device 找到连接设备名称,然后在进行配置。
nmcli con m enp2s0 ipv4.method manual ipv4.address 10.10.120.100/24 ipv4.gateway 10.10.120.1 ipv4.dns 8.8.8.8
5.查看路由信息
ip route show
-------------------------------------未完待续------------------------------






![Postman[7] 内置动态参数及自定义的动态参数](https://i-blog.csdnimg.cn/direct/0eb7deeff3504efead4426d1cac5ae7f.png)












