In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "the process of network configuration of IP and host name in CentOS7 system". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
CentOS has just been updated to CentOS7 in recent days, so many users do not know how to install and configure CentOS7, especially the hostname and IP of CentOS7 are somewhat different from the previous version. So how does the CentOS7 system configure IP and hostname networks?
Tip: there is no visual interface for Centos7.
Enter the login interface
Enter the account number into root and enter enter.
Then enter the root password set above and enter enter.
System login succeeded
Set IP address, gateway DNS
Description: CentOS 7.0 is not automatically opened after the default installation of the network connection!
Cd / etc/sysconfig/network-scripts/ # enter the network profile directory
Vi ifcfg-eno16777736 # Edit the configuration file to add and modify the following
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
ONBOOT=yes # enable automatically enable network connection
IPADDR0=192.168.21.128 # set IP address
PREFIXO0=24 # set the subnet mask
GATEWAY0=192.168.21.2 # set Gateway
DNS1=8.8.8.8 # set the main DNS
DNS2=8.8.4.4 # set backup DNS
: wq! # Save exit
Service network restart # restart the network
Ping http://www.xitongzhijia.net/ # tests whether the network is working
Ip addr # View IP address
Set the hostname to www
Hostname www # set the hostname to www
Vi / etc/hostname # Edit configuration file
Www # change localhost.localdomain to www
: wq! # Save exit
Vi / etc/hosts # Edit configuration file
127.0.0.1 localhost www # modify localhost.localdomain to www
: wq! # Save exit
Shutdown-r now # restart the system
This is the content of "the process of network configuration of IP and hostname in CentOS7 system". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.