使用命令修改ip地址的方法:
[[email protected]~]#vi /etc/sysconfig/network-scripts/ifcfg-ens33
按i可以添加修改内容
ONBOOT="no"改成yes 开启网卡
BOOTPROTO="dhcp" 改成none或static
IPADDR=192.168.159.129
NETEWAY=255.255.255.0
GATEWAY=192.168. 159.1
DNS1=8.8.8.8
重启网卡服务
[[email protected] ~]# systemctl restart network
关闭防火墙并设置开机不启动
查看防火墙开启情况
systemctl status firewalld
active 开启 (running)
Active: inactive (dead) 关闭
临时关闭: systemctl stop firewalld
开机关闭防火墙:
[[email protected] ~]# systemctl disable firewalld
重启计算机生效
临时和关闭Selinux
查看selinux开启情况
[[email protected] ~]# getenforce
Enforcing 开启 Permissive 关闭
临时关闭selinux
[[email protected] ~]# setenforce 0
彻底关闭selinux
[[email protected] ~]# vi /etc/sysconfig/selinux
SELINUX=disabled
最后重启服务生效
[[email protected] ~]# systemctl restart network
设置系统光盘开机自动挂载
[[email protected] ~]#
echo "/dev/sr0 /mnt iso9660 defaults 0 0 " >> /etc/fstab
将全部文件的内容全挂载一下
查看挂载情况
[[email protected] ~]# df -h
原文地址:http://blog.51cto.com/12446548/2072281