Centos 6.5設定IP
參考: [url]http://blog.csdn.net/sky663/article/details/8766038[/url]
先修改:vi /etc/sysconfig/network-scripts/ifcfg-eth0
ONBOOT=yes
然後重啟
1. 臨時設定IP: [b]ifconfig 192.168.0.25[/b], 這樣就會在/etc/sysconfig/network-scripts/ifcfg-eth0產生一定的資訊.
2. [b]vi /etc/sysconfig/network-scripts/ifcfg-eth0[/b], 修改會增加以下內容:
[color=darkblue]DEVICE=eth0
BOOTPROTO=static
IPADDR=192.168.0.10
NETMASK=255.255.255.0
ONBOOT=yes[/color]
3. [b]vi /etc/sysconfig/network[/b], 修改或增加以下內容:
[color=darkblue]NETWORKING=yes
GATEWAY=192.168.0.1[/color]
以上設定, 重啟網路, 就可以得到IP: [b]/etc/init.d/network restart[/b]
4.設定dns, 才能上外網:
[b]vi /etc/resolv.conf[/b]
[color=darkblue]nameserver 192.168.0.1[/color]
先修改:vi /etc/sysconfig/network-scripts/ifcfg-eth0
ONBOOT=yes
然後重啟
1. 臨時設定IP: [b]ifconfig 192.168.0.25[/b], 這樣就會在/etc/sysconfig/network-scripts/ifcfg-eth0產生一定的資訊.
2. [b]vi /etc/sysconfig/network-scripts/ifcfg-eth0[/b], 修改會增加以下內容:
[color=darkblue]DEVICE=eth0
BOOTPROTO=static
IPADDR=192.168.0.10
NETMASK=255.255.255.0
ONBOOT=yes[/color]
3. [b]vi /etc/sysconfig/network[/b], 修改或增加以下內容:
[color=darkblue]NETWORKING=yes
GATEWAY=192.168.0.1[/color]
以上設定, 重啟網路, 就可以得到IP: [b]/etc/init.d/network restart[/b]
4.設定dns, 才能上外網:
[b]vi /etc/resolv.conf[/b]
[color=darkblue]nameserver 192.168.0.1[/color]
相關文章
- CentOS6.5網路設定CentOS
- CentOS 6.5 Oracle 環境變數設定CentOSOracle變數
- CentOS6.5如何設定NAT網路方式CentOS
- centos 7 設定靜態ipCentOS
- Centos7網路配置——設定固定ipCentOS
- Centos7設定IP為固定值CentOS
- Centos中IP與DNS手動設定方法CentOSDNS
- Linux(centos7)檢視和設定ip(DHCP)LinuxCentOS
- CentOS 6.5安裝Oracle 11.2.0.4------CentOS 6.5安裝CentOSOracle
- CentOS 7虛擬機器下設定固定IP詳解CentOS虛擬機
- Centos6.5搭建LAMPCentOSLAMP
- CentOS 6.5 正式釋出CentOS
- CentOS6.5搭建ZabbixCentOS
- centos6.5搭建phpCentOSPHP
- centos 6.5 安裝chromeCentOSChrome
- centos6.5伺服器安裝Nginx設定服務和開機自啟CentOS伺服器Nginx
- VMware虛擬機器下Centos8 設定靜態IP地址虛擬機CentOS
- CentOS6.5安裝pipCentOS
- CentOS6.5 安裝opensslCentOS
- CentOS6.5安裝ScrapyCentOS
- CentOS 6.5 tree命令安裝CentOS
- Centos6.5 Docker安裝CentOSDocker
- centos6.5安裝gitCentOSGit
- CentOS6.5安裝MongoDBCentOSMongoDB
- CentOS 6.5安裝Nginx (一)CentOSNginx
- CentOS6.5安裝RHBaseCentOS
- CentOS6.5安裝RHiveCentOSHive
- CentOS 6.5 安裝影像介面CentOS
- Centos6.5映象下載CentOS
- CentOS防火牆設定CentOS防火牆
- centos基礎設定CentOS
- RedHat6.5如何更新為CentOS6.5的YUM源RedhatCentOS
- virtualBox centos 6.5 硬碟擴容CentOS硬碟
- CentOS 6.5/6.6 安裝mysql 5.7CentOSMySql
- CentOS6.5下安裝mongodbCentOSMongoDB
- CentOS 6.5 Xtrabackup 2.4.2安裝流程CentOS
- CentOS 6.5 下安裝 Redis 2.8.7CentOSRedis
- VMWare安裝CentOS 6.5圖解CentOS圖解