1、安装好centos 6.5系统 
2、在输入命令 setup 设置网络 
Linux修改IP地址 
3、敲打回车键 出现如下界面 
Linux修改IP地址
authentication configuration:身份证配置 
firewall configuration:防火墙配置 
network configuration:网络 配置 
System services :系统服务

按上下方向键选择网络配置 回车 
4、选择设备配置 
Linux修改IP地址
device configuration:ip配置 
dns configuration:dns配置 
选择ip配置回车 
5、选择第一个 回车 
Linux修改IP地址
6、出现如下界面 
Linux修改IP地址
use dhcp:自动获取 必须要有dhcp 服务器 如果没有 将 * 换成空格 手动填写 
static ip:ip地址 
netmask:子网掩码 
default gateway id:默认网关 
primary dns server:dns服务器地址 【首选】 
secondary dns server:备用dns服务器地址 
设置好后:按table键:依次 OK–》Save–》save&quit–》quit 
7、重启网络 输入命令 service network restart 回 
Linux修改IP地址
8、查看ip地址 ifconfig 
Linux修改IP地址 
9、如果上面的步骤不可以配置IP,就是用如下命令 
vim /etc/sysconfig/network-scripts/ifcfg-eth0打开网卡配置文件 
看到如下界面 
Linux修改IP地址 
将ONBOOT=no,改为ONBOOT=yes。 
文件修改完毕后,按ESC键返回vim命令状态,输入:x保存文件,使用service network restart命令重启网卡就可以了。

相关文章: