2015年4月20日 星期一

[Linux 文章收集] CentOS : Manual IP network configuration

來源自 這裡 
Preface: 
Just installed my first CentOS 6.0 test server. In order to save bandwidth, I downloaded the minimal installation ISO which produced a Linux system that was able to boot correctly, but provided none of the standard system-config-... tools. So in order to continue installation, I had to setup IP information for the systems network card by manually editing files. This is a summary of the steps I followed. 

Step1: 
Go to /etc/sysconfig/network-scripts/ and edit file ifcfg-eth0. Then, make sure you provide the following keys: 
  1. DEVICE=eth0  
  2. HWADDR=00:1f:29:c3:22:16  
  3. BOOTPROTO=static           
  4. NM_CONTROLLED=yes  
  5. ONBOOT=yes  
  6. IPADDR=10.5.0.6  
  7. NETMASK=255.255.255.0  
Step2: 
Open file /etc/sysconfig//network and add information for host name and default gateway like this : 
  1. NETWORKING=yes  
  2. HOSTNAME=barbara.shelman.int  
  3. GATEWAY=10.5.0.1  
Step3: 
The DNS servers are defined in /etc/resolv.conf. Typically the file looks like this: 
  1. nameserver 10.5.1.1  
  2. nameserver 10.5.1.2  
Step4: 
Network manager should pick up the changes immediately. In case it does not, restart the netwrok service like this : 
$ /etc/init.d/network restart

This is the minimal setup that worked for me. After I was able to set up my yum proxy and begin installation of CentOS packages, I was able to run system-config-network, which changed many of the previous entries. For example the gateway information in now stored in ifcfg-eth0, along with the DNS information. The previous setup however, is what go me started. 

Supplement: 
How To Configure Static IP On CentOS 6 
[教學] CentOS 6.3 安裝 – (2) 網路設定篇

沒有留言:

張貼留言

[Git 常見問題] error: The following untracked working tree files would be overwritten by merge

  Source From  Here 方案1: // x -----删除忽略文件已经对 git 来说不识别的文件 // d -----删除未被添加到 git 的路径中的文件 // f -----强制运行 #   git clean -d -fx 方案2: 今天在服务器上  gi...