Xiuno教程篇三【CentOS 6.8设置IP详细教程】

等你吃夜宵 8月前 573


设置了临时IP,直接可以用Xshell软件和Xftp来 SSH访问,

直接访问服务器文件,etc/sysconfig/network-scripts/ifcfg-eth1

然后下载下来,直接在电脑上修改。或者直接新建个ifcfg-eth1文件,放到etc/sysconfig/network-scripts目录里面去


代码如下:

HWADDR="08:00:27:73:56:0f"
TYPE="Ethernet"  
BOOTPROTO="static" #dhcp改为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="eth1"  
UUID="bb3a302d-dc46-461a-881e-d46cafd0eb71"  
ONBOOT="yes" #开机启用本配置  
IPADDR=192.168.1.45 #静态IP  
GATEWAY=192.168.1.1 #默认网关  
NETMASK=255.255.255.0 #子网掩码  
DNS1=192.168.1.1 #DNS 配置


最新回复 (2)
  • baoye 8月前
    0 引用 2
    楼主是个好人
返回
发新帖
HTTP/1.1 502 Bad Gateway Content-Type: text/html Connection: close Content-Length: 308 Date: Thu, 26 Apr 2018 20:49:22 GMT X-Via: 1.1 localhost.localdomain (random:6297 Fikker/Webcache/3.7.5) 502 Bad Gateway

502 Bad Gateway - Cann't Connect To Upstream Server By SSL Read

Server: localhost.localdomain
Date: 2018-04-26 20:49:22

Fikker/Webcache/3.7.5