admin 管理员组文章数量: 887019
进入文件
root@localhost 桌面]# vim /etc/sysconfig/network-scripts/ifcfg-eno16777736
改配置文件
TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=eno16777736
UUID=f3ea634c-d078-4590-aed4-51bc7530d093
DEVICE=eno16777736
ONBOOT=yes
IPADDR=192.168.137.6
NETMASK=255.255.255.0
GATEWAY=192.168.137.1
DNS=8.8.8.8
改完之后重启刷新
[root@localhost 桌面]# service netwok restart
ifconfig 查看配置
[root@localhost 桌面]# ifconfig
eno16777736: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.137.6 netmask 255.255.255.0 broadcast 192.168.137.255
inet6 fe80::20c:29ff:fec0:d961 prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:c0:d9:61 txqueuelen 1000 (Ethernet)
RX packets 127 bytes 12653 (12.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 100 bytes 11568 (11.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 24 bytes 2364 (2.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 24 bytes 2364 (2.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether 00:00:00:00:00:00 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
远程连接 ssh 对方IP
打yes
输入对方密码
退出 exit
安包
[root@localhost 桌面]# yum repolist
systemctl start httpd
版权声明:本文标题:配置 IP 地址 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.freenas.com.cn/jishu/1729072162h1314256.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论