Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Configuration after CentOS7 installation

2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Static IP address Settin

1. Find the name of the network card, and view the name of the network card by using ip an in the console, for example: eno16777984

two。 Use vim to open the relevant configuration file: / etc/sysconfig/network-scripts/ifcfg-eno16777984

3. Modify the file as follows:

TYPE=EthernetBOOTPROTO=staticNAME=eno16777984DEVICE=eno16777984ONBOOT=yesIPADDR=192.168.1.105NETMASK=255.255.255.0GATEWAY=192.168.1.254DNS1=223.5.5.5

4. Restart the network to take effect using the following command

Systemctl restart network

Change of domestic sources

Back up the original configuration file

Mv / etc/yum.repos.d/CentOS-Base.repo / etc/yum.repos.d/CentOS-Base.repo.bak

two。 Download network easy source

Wget http://mirrors.163.com/.help/CentOS7-Base-163.repo

3. Create a new cache

Yum makecache

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report