Home>Article>Operation and Maintenance> centos cannot update using yum command

centos cannot update using yum command

王林
王林 Original
2020-03-18 14:38:25 2165browse

centos cannot update using yum command

Set the network card to start automatically at boot

To solve this problem, you must first confirm whether the network card has been started. The network card may be turned off when CentOS7 is first installed. You need to Turn it on by yourself.

Make sure you are using the root account. If not, please change it yourself.

1. Enter the /etc/sysconfig/network-scripts directory. That is, enter the command "cd /etc/sysconfig/network-scripts" and use the command "ls -a" to view all files in the directory.

centos cannot update using yum command

(Recommended tutorial:centos usage tutorial)

2. Modify the network card configuration file of ifcfg-ens33 (CentOS7 modified the network card The naming rule is no longer eth0, but ifcfg-eno numbers). Enter the command "vi ifcfg-ens33" to enter the vi editor, and press the "i" or "insert" key to enter editing mode.

centos cannot update using yum command

3. Change the value of "ONBOOT" to "yes", then press esc to exit the edit mode, enter ":wq" to save and exit.

centos cannot update using yum command

#4. Restart the system or restart the network card, enter the command "reboot" or "service network restart".

Recommended related video tutorials:linux video tutorial

The above is the detailed content of centos cannot update using yum command. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn