linux系统的初始化配置

ip地址的修改

1临时性修改

ip address add +ip地址

2永久性修改

/etc/sysconfig/network-scripts/ifcf +网卡名

主机名的修改

1临时的修改

hostname 主机名 

2永久修改

 /etc/hostname //进入这个配置文件夹修改

关闭firewalld


systemctl enable firewalld.service           //将指定的服务设置为开机启动
systemctl disable firewalld.service          //在每次重启开机时间,不自动启动这个服务

systemctl is-enabled firewalld.service       //查询是否设置为开机自动启动

关闭selinux

vim /etc/sysconfig/selinux
vim /etc/selinux/config


把SELINUX=enforcing 改为 SELINUX=disabled

临时关闭SELinux
setenforce 0
原文地址:https://www.cnblogs.com/jw29/p/5947039.html