ifconfig eth0
192.168.136.128
通过Ctrl+Alt+F2进入命令行界面 登陆账号后输入以下代码
vi /etc/sysconfig/network-scripts/ifcfg-eth0
ONBOOT=
yes
BOOTPROTO=static
IPADDR=
192.168.136.128
NETMASK=
255.255.255.0
GATEWAY=
192.168.136.2
DNS1=
192.168.136.2
IPV6INIT=
no
按Esc后输入 :wq #保存退出,接着输入以下命令
service ip6tables
stop #停止IPV6服务
chkconfig ip6tables
off #禁止IPV6开机启动
service yum-updatesd
stop #关闭系统自动更新,该命令可能不存在
chkconfig yum-updatesd
off #禁止开启启动,该命令可能不存在
service network restart
#重启网络连接
ifconfig
#查看IP地址
#route add default gw 192.168.136.2 dev eth0 #设置默认网关
yum install -y ntp
#安装ntp
service ntpd start
#启动ntpd服务
chkconfig ntpd
on #设置ntpd为开机启动
转载请注明原文地址: https://ju.6miu.com/read-675706.html