CentOS network configuration, and cloning

--- --- restore content begins

CentOS network configuration is an important part of learning before the start. There may be similar for the different versions of the configuration of the network time. But the principle is the same.

We began to get to the network configuration.

Firstly, our CentOS is installed in a virtual machine inside

I use this virtual machine

 Then we began to configure the network for its virtual machines

 

 

 After configuration is complete here continue to configure NAT settings

 

 

 Here I only need to configure the position of the red graffiti

 

 

 And then determine just fine.

Next we turn on CentOS

Here I changed the name master, but did not make much and configuring network

Shut down the system and turn off the firewall system from the start, enter the following command in a terminal off the virtual machine firewall, while closing the SELinux service. (The system when running Hadoop If you do not turn off the firewall program may cause unknown problems, it is recommended that you turn off the system before configuring the firewall)

 

 

 FIG next modification position

 

 

 Open network interface configuration file CentOS ifcfg-enp0s3 or ifcfg-eth0 (required vary according to the actual situation of the network computer configuration file, said document fails to be input to "ifcfg-" Tab key using the keypad configuration file to find the network), enter the following command, enter, shown in Figure 4-5; 4-6, the configuration based on the increase related configuration parameters: (vi command to edit the file system for the Linux command, it is recommended to practice and master the use)

 

 

 Because different versions of configuration files may be in the position will be different red box is the content of the need for change, but the file name may be different, but do not worry, and delete the contents of the red box in front of "/" 

Press tab will appear twice your folder is the first file, enter into the like.

 

 

 We need to add the following content

 

 

HWADDR a MAC value in the previous section of the main panel network configuration; the IPADDR the IP address of the virtual machine, may be provided on their own, the need to maintain the same network segment and the host; NETMASK subnet mask a default of 255.255.255.0; GATEWAY gateway, the host must be provided with the same host. Figure:

 

 

 Set by the network file for the virtual host global network parameters, enter the following command, enter, as shown in

 

 

 

 

 

 Open the DNS configuration file resolv.conf, specify DNS server addresses, we set here is mainly the host machine corresponding DNS service area, as well as DNS (DNS server 8.8.8.8 to Google for Google provided on the external network can be based on the actual local network conditions configure the DNS server). Enter the following command, and press Enter;

 

 

 Add the following configuration, after completion of pressing the "Esc" key to exit the edit mode vi, enter ": wq" Save as

Red graffiti is your IP

 

Restart the virtual machine network, enter the following command

 

 Verify whether the configuration input on the virtual host ping 192.168.. (The IP host address of the host, the replacement of the actual situation) FIG representing host and host virtual host communication. (Ping command Linux or Windows may determine whether the command is connected to the local network or the domain name specified IP, packet represents the time where time is typically less than 30ms indicates good signal designated network local network)

 

 Verify external network is working, enter ping www.baidu.com on a virtual host, as representing the virtual host can access the Internet network.

 

 After the completion of the installation of a virtual machine configuration, we can complete the copying other VM by cloning, thus reducing the workload configuration.

Click the right mouse button and select Manage master clone selection

 

 The next step

 

 Next, FIG.

 

 Press to select the picture shown here is recommended, another will take up too much memory

 

 Click Finish.

thanks for reading

 

Guess you like

Origin www.cnblogs.com/cc-ca/p/11569918.html