Preparation Tool:
xshell6, xftp6, the official website ( https://www.netsarang.com/zh/downloading/ ) to download, educational version, for personal use
Virtual machine installation tutorial to Baidu, there are two important points during installation:
1, choose to install the operating system later when you install the operating system
2, the default installation to minimize installation, no need to adjust
Get ip:
1, execute ip addr command, view the name of the NIC (ifconfig was abandoned, not installed, ifconfig error is normal)
2, modify the network configuration file to obtain ip address
Performing vi / etc / sysconfig / network-scripts / ifcfg-ens33 command, the value of yes to ONBOOT
Save and exit, perform systemctl restart network reboot network
Ip addr command execution, see the ip address
Use xshell connect virtual machines, use ordinary account login, switch to the root account login is completed
Replace the yum source
1, delete the subscription and registration information: yum remove subscription-manager
2, delete rhn related components: yum remove rhn-check
3, uninstall the current yun: rpm -qa | grep yum | xargs rpm -e --nodeps
4, download centos of yum package
Address: http://mirrors.163.com/centos/7/os/x86_64/Packages/
download file:
yum-plugin-fastestmirror-1.1.31-52.el7.noarch.rpm
yum-updateonboot-1.1.31-52.el7.noarch.rpm
yum-utils-1.1.31-52.el7.noarch.rpm
yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
yum-3.4.3-163.el7.centos.noarch.rpm
python-urlgrabber-3.10-9.el7.noarch.rpm
5, file upload tool using xshell just downloaded to a virtual machine
6, yum installation package, run the following command:
rpm -Uvh yum-plugin-fastestmirror-1.1.31-52.el7.noarch.rpm --nodeps
rpm -Uvh yum-updateonboot-1.1.31-52.el7.noarch.rpm --nodeps
rpm -Uvh yum-utils-1.1.31-52.el7.noarch.rpm --nodeps
rpm -Uvh yum-metadata-parser-1.1.4-10.el7.x86_64.rpm --nodeps
rpm -Uvh yum-3.4.3-163.el7.centos.noarch.rpm --nodeps
rpm -Uvh python-urlgrabber-3.10-9.el7.noarch.rpm --nodeps
7, yum update source:
rm -f /etc/yum.repos.d/redhat.repo
we /etc/yum.repos.d/CentOS-Base.repo
# Contents:
[base]
name=CentOS-$7 - Base - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=$7&arch=$basearch&repo=os
baseurl=http://mirrors.163.com/centos/7/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
#released updates
[updates]
name=CentOS-$7 - Updates - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=$7&arch=$basearch&repo=updates
baseurl=http://mirrors.163.com/centos/7/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
#additional packages that may be useful
[extras]
name=CentOS-$7 - Extras - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=$7&arch=$basearch&repo=extras
baseurl=http://mirrors.163.com/centos/7/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$7 - Plus - 163.com
baseurl=http://mirrors.163.com/centos/7/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
8, and generates the cache emptying yum yum cache:
yum clean all && yum makecache
9, verify:
Yun -y install tree command execution
Download normal yum source said the replacement is completed
10, install the Desktop
yum -y groupinstall "Server with GUI"
11, start the desktop
startx
12, uninstall Desktop
yum -y groupremove "Server with GUI"
This article refer to the following article:
https://www.cnblogs.com/lanyincao/p/11829486.html