Centos 7 installation and centos Installation

Source: Internet
Author: User

Centos 7 installation and centos Installation
Centos 7 installation and configuration 1. Install VMware. 2. Install centos7

Right-click "create VM" and select "typical" installation, for example:

 

 

 

Click Next and select "Install the operating system later ",

 

 

 

Select the corresponding operating system,

 

 

 

Then, select the centos directory path ,:

 

 

 

 

Specify the disk capacity. The default value is 20 GB, which can be adjusted. The space is gradually increased, and the upper limit is the available space of the currently configured drive letter.

 

 

Then, an empty virtual machine is created. Configure an iso image for this virtual machine.

 

Click to edit "Virtual Machine Settings ",

 

 

Select the CD/DVD column, select "use iso image file", and select the downloaded centos image.

 

 

 

Click OK. Click "enable Virtual Machine" on the main interface, wait for the system to be installed, and then click "restart.

 

 

Configure centos

Enter centos, enter ifconfig, and the prompt is: command not found

 

 

Ifconfig does not exist, probably because of the centos version.

On the console, enter yum-y install net-tools (-y one-click installation) to install the plug-in.

 

Enter the preceding statement and an error is returned:

 

 

The/etc/resolv. conf file is not configured.

 

In this case, use the ip addr command. If the ens1677736 does not have the inet attribute, you cannot connect to the virtual machine through the IP address.

 

Key Step: Configure ifcfg-ensX (X represents 1677736 here)

Enter the command: vi/etc/sysconfig/network-scripts/ifcfg-ens1677736

 

Change the ONBOOT option to yes (NIC disabled by default)

 

Then Press Esc and enter the command: wq !, Click Save and exit.

 

Restart the network service: sudo service network restart

 

Enter the ip addr command, and the ip address is displayed,

 

 

Now, run the yum-y install net-tools command again. The installation is successful.

 

 

 

The ifconfig command can also be used normally,

 

 

 

 

Now, the basic centos is installed and configured.

 

Configure the centos Network Environment

Configure static IP, vi/etc/sysconfig/network-scripts/ifcfg-ens1677736

Add IP addresses, gateways, and other information, such as red circles:

 

 

 

Configure the static ip address so that the ip address will not be re-allocated after the machine restarts.

 

Add hostname:

 

Run the vi/etc/sysconfig/network command to add HOSTNAME = HH.

 

 

Note: To modify the hostname in Centos 7, you also need to use the hostnamectl command to set it:

Hostnamectl set-hostname hh

Then query hostnamectl, such:

 

 

You can see that the static hostname has been modified.

 

 

Host Name ing

Run the vi/etc/hosts command to add 192.168.216.134 hh

 

 

Restart NETWORK SERVICE

Enter the command: service network restart

 

 

Detection Network, ping badu.com

 

For example, the network environment has been configured.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.