time: 2018.3.15node
[root@bogon ~]# rpm -qa | grep yum yum-rhn-plugin-2.0.1-6.el7.noarch yum-3.4.3-150.el7.noarch yum-utils-1.1.31-40.el7.noarch PackageKit-yum-1.0.7-6.el7.x86_64 yum-langpacks-0.4.2-7.el7.noarch yum-metadata-parser-1.1.4-10.el7.x86_64
[root@bogon ~]# rpm -e yum-rhn-plugin-2.0.1-6.el7.noarch yum-3.4.3-150.el7.noarch yum-utils-1.1.31-40.el7.noarch PackageKit-yum-1.0.7-6.el7.x86_64 yum-langpacks-0.4.2-7.el7.noarch yum-metadata-parser-1.1.4-10.el7.x86_64 --nodeps
centos
7/
os/
x86_64/
Packages/
ctrl+f 搜索須要的包, 以下:python
yum-plugin-fastestmirror
yum-updateonboot
yum-utils
yum-metadata-parser
yum-3.4.3-150.el7vim
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-42.el7.noarch.rpm wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-updateonboot-1.1.31-42.el7.noarch.rpm wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-utils-1.1.31-42.el7.noarch.rpm wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-3.4.3-154.el7.centos.noarch.rpm
rpm -ivh yum-* # 報錯, 依賴包的版本不符: rpm >= 0:4.11.3-22 is needed by yum-3.4.3-154.el7.centos.noarch
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/rpm-4.11.3-25.el7.x86_64.rpm wget http://mirrors.163.com/centos/7/os/x86_64/Packages/python-urlgrabber-3.10-8.el7.noarch.rpm # 安裝: rpm -Uvh rpm-4.11.3-25.el7.x86_64.rpm --nodeps rpm -Uvh python-urlgrabber-3.10-8.el7.noarch.rpm --nodeps
rpm -ivh yum-*
rm /etc/yum.repos.d/redhat.repo vim /etc/yum.repos.d/CentOS-Base.repo # 內容: #CentOS-Base.repo # # The mirror system uses the connecting IP address of the client and the # update status of each mirror to pick mirrors that are updated to and # geographically close to the client. You should use this for CentOS updates # unless you are manually picking other mirrors. # # If the mirrorlist= does not work for you, as a fall back you can try the # remarked out baseurl= line instead. # # [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
yum clean all
yum makecache
yum install tree tree
順便, 設置網絡自動啓動:centos
[root@localhost ~]# vim /etc/sysconfig/network-scripts/ifcfg- ifcfg-ens33 ifcfg-lo [root@localhost ~]# vim /etc/sysconfig/network-scripts/ifcfg-ens33
修改末行ONBOOT=yes
緩存