Recently I want to create a mailman email list, and I don't want to experiment on my commonly used CentOS6.4. I am afraid it will damage the environment. so I want to install a testing machine, and I think it occupies too much space, so after searching for half a day, I found that the minimal version of CentOS6.0 is the most suitable. after installation, I found that it was really small, and it was only over 600 M. However, because it was too streamlined, the network was not connected. The following describes how to configure the network. after installing the system, you can proceed with the following steps. (Note that this is a vmwarevm. if you use a physical machine, use rp directly.
Recently I want to create a mailman email list, and I don't want to experiment on my commonly used CentOS 6.4. I am afraid it will damage the environment. so I want to install a testing machine, and I think it occupies too much space, so after searching for half a day, I found that the minimal version of CentOS 6.0 is the most suitable. after installation, I found that it was really small, and it was only more than 600 M. However, because it was too streamlined, the network was not connected. The following describes how to configure the network. after installing the system, you can proceed with the following steps.(Note that this is a vmwarevm. if you use a physical machine, you can directly use rp-pppoe for dial-up. for details, see the previous blog .)
First open the virtual machine software. in the virtual network editor, click VMnet8, and then click NAT settings,
Optimistic about your Gateway IP address
My name is 192.168.116.2.
Set it as follows:
A. set the Gateway
vi /etc/sysconfig/network
NETWORKING = yes # indicates whether the system uses the network. this behavior system comes with it. I did not change it.
HOSTNAME = KD. localdomain # set the host name of the local machine. this is set when the system is installed. it comes with the system. I didn't change it.
GATEWAY = 192.168.116.2 # set the IP address of the Gateway connected to the local machine, which is the gateway ip address shown in the first figure.
After modification
B. modify the configuration file of the IP address of the corresponding Nic
vi /etc/sysconfig/network-scripts/ifcfg-eth0
ONBOOT = yes # activate this device when the system starts
BOOTPROTO = static # How to obtain the IP address of the network adapter (static, dhcp, or bootp can be used). we can directly static the fixed IP address to save it from tampering.
IPADDR = 192.168.116.116 # specify a static IP address and the IP address corresponding to the NIC, for example, 192.168.116.xxx
NETMASK = 255.255.255.0 # subnet mask
After modification
C. set DNS
vi /etc/resolv.conf
Nameserver 180.76.76.76 # This is Baidu public DNS
Nameserver 223.5.5.5 # This is Alibaba public DNS
After modification
Then,
Service network restart # restart the network service and network adapter
Ifconfig # View network settings
Ping 192.168.116.1 # check whether the gateway is connected
Then you can. You can ping Baidu.