Mirror site
Domestic mirror source for some open source software
Site Edition
(1) Enterprise Station
1. Sohu: http://mirrors.sohu.com/ 2. NetEase: http://mirrors.163.com/ 3. Ali Cloud: http://mirrors.aliyun.com/ 4. Taobao: http://npm.taobao.org/
(2) Educational stations
2. Central China University of Science and Technology: http://mirror.hust.edu.cn/(Current capacity estimate used: 4.83T) 3. Tsinghua University: http://mirrors.tuna.tsinghua.edu.cn/(Currently used capacity estimate: 9.8T) 6. China University of Science and Technology: http://mirrors.ustc.edu.cn/(Currently used capacity estimate: 21.32T) 14. Zhejiang University: http://mirrors.zju.edu.cn/ 17. Chongqing University: http://mirrors.cqu.edu.cn/(current capacity estimate: 3.93T)
(3) State address of official mirror list
CentOS: http://mirror-status.centos.org/#cn Archlinux: https://www.archlinux.org/mirrors/status/ Ubuntu: https://launchpad.net/ubuntu/+cdmirrors Debian: http://mirror.debian.org/status.html Fedora Linux/Fedora EPEL: https://admin.fedoraproject.org/mirrormanager/mirrors Apache: http://www.apache.org/mirrors/#cn Cygwin: https://www.cygwin.com/mirrors.html
Download CentOS7 from Ali Cloud Mirror Station
vmware Create Virtual Machine
Operating system version selection and setup, and install the operating system later
network configuration
Install Linux Mirror CD/DVD
Create user, set password
Virtual Machine Rename
vmware replication virtual machine
If you copy the directory of the virtual machine directly to another folder, you get two virtual machines.
minimal Edition Preparation
The minimum version does not have an ifconfig tool.ip addr nmcli device show to view network card information.
Network Card Operation
systemctl network nmcli ip ifconfig etc/sysconfig/network-scripts/ifcfg-xx
ifcfg-xx network card configuration file in etc/sysconfig/network-scripts/directory
# The ifcfg-xx file in /etc/sysconfig/network-scripts/directory is the configuration file of the network card.There are several network cards, and there are several corresponding profiles. [root@instance-fjii60o3 ~]# ll /etc/sysconfig/network-scripts/ total 232 -rw------- 1 root root 149 Jul 9 18:44 ifcfg-eth0 -rw------- 1 root root 143 Jul 9 18:39 ifcfg-eth0.bak -rw-r--r--. 1 root root 254 Jan 3 2019 ifcfg-lo lrwxrwxrwx. 1 root root 24 May 30 2018 ifdown -> ../../../usr/sbin/ifdown -rwxr-xr-x. 1 root root 654 Jan 3 2018 ifdown-bnep
ifcfg profile to connect to the external network.
CentOS7 Minimum Installation ifcfg-ens33 Network Profile
[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens33 TYPE=Ethernet PROXY_METHOD=none BROWSER_ONLY=no BOOTPROTO=dhcp DEFROUTE=yes IPV4_FAILURE_FATAL=no IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_FAILURE_FATAL=no IPV6_ADDR_GEN_MODE=stable-privacy NAME=ens33 UUID=a2c03b61-30f6-4ce4-bbd7-4b03dbde8ab2 DEVICE=ens33 ONBOOT=yes
Goods Purchase File Server ifcfg-Auto_eth2 Network Profile
[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-Auto_eth2 HWADDR=00:0c:29:cc:16:f0 TYPE=Ethernet BOOTPROTO=none IPADDR=192.168.25.133 PREFIX=24 GATEWAY=192.168.25.2 DNS1=192.168.25.2 DEFROUTE=yes IPV4_FAILURE_FATAL=yes IPV6INIT=no NAME="eth0" UUID=6e6f9829-0737-4943-ab21-61d6173ba8c4 ONBOOT=yes LAST_CONNECT=1438160743
Baidu Cloud Server ifcfg-eth0 Network Profile
[root@instance-fjii60o3 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0 # Generated by parse-kickstart IPV6INIT="yes" BOOTPROTO="dhcp" DEVICE="eth0" ONBOOT="yes" RES_OPTIONS="rotate timeout:1" IPV6_PEERDNS=no ZONE=public
Goods Purchase Static Address ifcfg-eth0 Network Profile
[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE="eth0" BOOTPROTO="static" #BOOTPROTO="dhcp" HWADDR="00:0C:29:6B:21:18" IPV6INIT="yes" NM_CONTROLLED="yes" ONBOOT="yes" TYPE="Ethernet" UUID="5c4e89fb-eced-4d66-962a-e5f6e565ec26" IPADDR="192.168.25.130" NETMASK="255.255.255.0"
ip command
# Use the ip addr command to view the ip address and physical address.Here are lo and eth0. [root@localhost Desktop]# ip addr 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000 link/ether 00:0c:29:6b:21:18 brd ff:ff:ff:ff:ff:ff inet 192.168.25.130/24 brd 192.168.25.255 scope global eth0 inet6 fe80::20c:29ff:fe6b:2118/64 scope link valid_lft forever preferred_lft forever
nmcli command
The default network services in Red Hat Enterprise Linux 7 and ClientOS 7 are provided by NetworkManager, a daemon for dynamically controlling and configuring the network, which is used to keep current network devices and connections working and also supports traditional ifcfg-type configuration files.
NetworkManager can be used for the following types of connections: Ethernet, VLANS, Bridges, Bonds, Teams, Wi-Fi, mobile boradband (such as mobile 3G), and IP-over-InfiniBand.For these network types, NetworkManager can configure their network aliases, IP addresses, static routes, DNS, X X connections, and many other special parameters.
You can use the command line tool nmcli to control NetworkManager.
Network Management Command Line Tool, also known as nmcli, in CentOS / RHEL 7.Users who frequently use ifconfig should avoid using ifconfig in CentOS 7.Nmcli is much more powerful and complex.
OBJECT and COMMAND can be used either as a full name or as a short name, with a minimum of one letter and the first three letters recommended.
https://blog.51cto.com/budeed/2053661
https://www.cnblogs.com/xiangsikai/p/8435927.html
Start Stop Restart Viewing Network Services
# open [root@localhost ~]# systemctl start network # Stop it [root@localhost ~]# systemctl stop network # restart [root@instance-fjii60o3 ~]# systemctl restart network # View network service status [root@instance-fjii60o3 ~]# systemctl status network ● network.service - LSB: Bring up/down networking Loaded: loaded (/etc/rc.d/init.d/network; bad; vendor preset: disabled) Active: active (exited) since Mon 2019-05-27 14:01:37 CST; 1 months 20 days ago Docs: man:systemd-sysv-generator(8) Process: 624 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=0/SUCCESS)
Check network card connection
# Check the status of network devices and whether the network card is connected.Objects can use full names or abbreviations, and the first three letters are recommended.CentOS7 Minimum Installation Medium Effect [root@instance-fjii60o3 ~]# nmcli dev status DEVICE TYPE STATE CONNECTION eth0 ethernet connected System eth0 lo loopback unmanaged -- # Effect CentOS6 in Goods Purchase Server [root@localhost Desktop]# nmcli dev status DEVICE TYPE STATE eth0 802-3-ethernet connected
# Look at the network device information, there are two devices, eth0 and lo. [root@instance-fjii60o3 ~]# nmcli dev show GENERAL.DEVICE: eth0 GENERAL.TYPE: ethernet GENERAL.HWADDR: FA:16:3E:4B:8D:94 GENERAL.MTU: 1500 GENERAL.STATE: 100 (connected) GENERAL.CONNECTION: System eth0 GENERAL.CON-PATH: /org/freedesktop/NetworkManager/ActiveConnection/1 WIRED-PROPERTIES.CARRIER: on IP4.ADDRESS[1]: 172.16.0.4/20 IP4.GATEWAY: 172.16.0.1 IP4.ROUTE[1]: dst = 169.254.169.254/32, nh = 172.16.0.2, mt = 100 IP4.ROUTE[2]: dst = 0.0.0.0/0, nh = 172.16.0.1, mt = 100 IP4.ROUTE[3]: dst = 172.16.0.0/20, nh = 0.0.0.0, mt = 100 IP4.DNS[1]: 172.16.0.2 IP4.DNS[2]: 172.16.0.3 IP6.ADDRESS[1]: fe80::f816:3eff:fe4b:8d94/64 IP6.GATEWAY: -- IP6.ROUTE[1]: dst = fe80::/64, nh = ::, mt = 100 IP6.ROUTE[2]: dst = ff00::/8, nh = ::, mt = 256, table=255 GENERAL.DEVICE: lo GENERAL.TYPE: loopback GENERAL.HWADDR: 00:00:00:00:00:00 GENERAL.MTU: 65536 GENERAL.STATE: 10 (unmanaged) GENERAL.CONNECTION: -- GENERAL.CON-PATH: -- IP4.ADDRESS[1]: 127.0.0.1/8 IP4.GATEWAY: -- IP6.ADDRESS[1]: ::1/128 IP6.GATEWAY: --
# View all network connections. Objects can use full names or abbreviations. The first three letters are recommended. [root@instance-fjii60o3 ~]# nmcli con show NAME UUID TYPE DEVICE System eth0 5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03 ethernet eth0 # Show activated connections [root@localhost ~]# nmcli con show -a NAME UUID TYPE DEVICE ens33 a2c03b61-30f6-4ce4-bbd7-4b03dbde8ab2 ethernet ens33
Back up the configuration file first
Error Reason:
I manually created the ifcfg-xx file myself, which caused the network service to fail to start. Delete the file.
[root@localhost ~]# ip addr 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 00:0c:29:d8:60:ca brd ff:ff:ff:ff:ff:ff inet 192.168.211.133/24 brd 192.168.211.255 scope global noprefixroute dynamic ens33 valid_lft 1456sec preferred_lft 1456sec inet6 fe80::81a:8ce9:dd1e:317e/64 scope link noprefixroute valid_lft forever preferred_lft forever
[root@localhost ~]# yum search ifconfig Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.neusoft.edu.cn * extras: mirrors.163.com * updates: mirrors.neusoft.edu.cn base | 3.6 kB 00:00:00 extras | 3.4 kB 00:00:00 updates | 3.4 kB 00:00:00 (1/4): base/7/x86_64/group_gz | 166 kB 00:00:00 (2/4): extras/7/x86_64/primary_db | 205 kB 00:00:01 (3/4): updates/7/x86_64/primary_db | 6.5 MB 00:00:34 (4/4): base/7/x86_64/primary_db | 6.0 MB 00:00:55 =============================================================================== Matched: ifconfig =============================================================================== net-tools.x86_64 : Basic networking tools