CentOS has just been updated to CentOS7 in recent days, so many users do not know how to install and configure CentOS7, especially the host name and IP of CentOS7. The configuration is somewhat different from the previous version. So how does the CentOS7 system perform IP and hostname network configuration?
Tip: Centos7 is no visual interface.
Enter the login screen
Enter the root entry
Enter the root password set above to enter
System login success
Set IP address, gateway DNS
Description: After CentOS 7.0 is installed by default, it does not automatically open the network connection!
cd /etc/sysconfig/network-scripts/#Enter the network configuration file directory
vi ifcfg-eno16777736 #Edit the configuration file, add the following changes
HWADDR=00 :0C:29:8D:24:73
TYPE=Ethernet
BOOTPROTO=static #Enable Static IP Address
DEFROUTE=yes
PEERDNS= Yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=eno16777736
UUID=ae0965e7-22b9-45aa-8ec9-3f0a20a85d11< Br>
ONBOOT=yes #Enable automatic network connection enable
IPADDR0=192.168.21.128 #Set IP address
PREFIXO0=24 #Set subnet mask
GATEWAY0=192.168.21.2 #设置网关器
DNS1=8.8.8.8 #设置主DNS
DNS2=8.8.4.4 #设置备DNS
:wq! # 保存退出
service network restart #再网络
ping http://www.xitongzhijia.net/#test whether the network is normal
ip addr #View IP address< Br>
Set the host name to www
hostname www #Set the host name to www
vi /etc/hostname #Edit configuration file
www #修改localhost. Localdomain is www
:wq! #SaveExit
vi /etc/hosts #Edit Configuration File
127.0.0.1 localhost www #Modify localhost.localdomain to www
:wq! #SaveExit
shutdown -r now #restart the system
The above is how the CentOS7 system performs IP and hostname network configuration. After configuring the IP and hostname, you can start surfing the Internet. It is.
As a webmaster, not only to ensure the website traffic increases, but also to prevent DDOS attacks,
If you want to use Windows applications on Ubuntu, you need to use Wine. In additio
If you are unable to read and write to the disk during the Linux process, the application cannot be
Usually we use the command to view the disk mounted in the Linux system, in fact, in addition to thi
Deep understanding of Linux text stream
Linux vim shows utf-8 document garbled how to do?
Notes on operating online replacement files on Linux systems
Steps to Mount an LVM Partition on a Linux System
How to turn off IP access for Linux Apache server
How Linux limits user login failures through PAM
Linux system disable ping command skills
Linux uses commands to clear the terminal screen
Ubuntu defragmentation command summary
Ubuntu how to install and optimize SSD hard disk
Win8 Encyclopedia 27: Security Mode and System Performance
Using the Windows 8 File History feature
How to turn off the notebook touchpad
Windows7 and Win2008 R2 0day surprise remote attack vulnerability
Teach you how to convert cad to coreldraw
Linux system shell command tutorial
Why is win10 called the last version of Windows? What is the intention?
Win8 adjusts the speed of the mouse double click