Requirement:
After we installed a new system on the server (centos 7), because it was a minimal installation, many toolkits were not installed, but you need to install it manually. The ifconfig command It just needs to be installed manually. Ifconfig is a common command we usually check IP address, network card information and so on, so it is very necessary to install it.
Installation process:
1. After installing the system on the new server, check the IP address and find that there is no such command
ifconfig< br>-bash: ifconfig: conmmand not found
2. Install ifconfig directly, and find no software packages available
Reason for installation failure: The installation package name is not ifconfig
Solution: Directly use yum to search for the installation package name
4. Search for the tool package
5. Use yum to install the toolkit, verify
Supplement:
Because I don’t know the IP address at the beginning. It is very inconvenient to operate on the local terminal (the font is small and cannot be copied and pasted). You can solve it like this:
1. Use ip addr to view the ip address, and the remote terminal connects to this ip address
2. After installing the ifconfig toolkit, fix the IP address to prevent subsequent changes.
vim /etc/sysconfig/network-scripts/ifcfg-enp0s31f6
p>
3. Restart the network card
systemctl restart network
Summary:
1. Generally during installation After centos 7 minimizes the system, there will be many packages that are not installed, such as ifconfig, vim.wget, etc. If these commands are found without this command when using them, you can install them directly with yum, and then use the same method to install them. 2. The server IP address is best set to a fixed IP address to prevent sudden disconnection (ip changes) in the future. 3. After fixing the IP address, to check whether the server can access the Internet, you can use the ping command to ping the Baidu domain name. If it fails, then modify the IP address again.