ifconfig命令使用方法
临时修改修改网卡IP地址
- 语法:ifconfig 网卡名称 IP地址
- 注意:直接修改网卡的IP地址,重启失效
给一块网卡添加多个临时IP

删除临时IP
- ifconfig 网卡名称:第几个IP del IP地址
-
例:
删除临时IP
重启网络服务命令
- CentOs7:systemctl restart network 或者 service network restart
- CentOs6:service network restart
查看网络服务当前状态命令
*systemctl status NetworkManager
NetworkManager
-
概述:
概述
RHEL/CENTOS Linux网络相关的配置文件

永久修改网卡地址
-
方法一:
方法一
-
方法二:
方法二
-
配置文件常见参数说明
image.png
image.png
关闭防火墙并设置开机不启动
- 查看防火墙状态:systemctl status firewalld 或者 systemctl status firewalld.service
- 关闭防火墙:systemctl stop firewalld.service
- 开启防火墙:systemctl start firewalld.service
- 设置防火墙开机不启动:systemctl disable firewalld.service
- 设置防火墙开机启动:systemctl enable firewalld.service
-
image.png
临时和永久关闭Selinux
- 查看Selinux是否开机启动:getenforce
- 设置Selinux临时关闭:setenforce 0
-
永久关闭:修改配置文件
image.png 修改为
image.png
然后使用reboot重启服务
设置系统光盘开机自动挂载-配置本地YUM源
设置系统光盘开机自动挂载


配置本地YUM源




网友评论