yum离线安装
1.所需的rpm文件:(找到自己所需要的版本下载)
2.yum离线安装网址:
1.http://blog.csdn.net/eddy_chan/article/details/54728385
2.http://blog.csdn.net/jb19900111/article/details/50700042
3.查看自带的yum:rpm -qa |grep yum
4.卸载自带的yum:rpm -e .... --nodeps
5.查看并卸载自带的python-urlgrabber : rpm -qa | grep python-urlgrabber
6.卸载:rpm -e ... --nodeps
7.安装python:rpm -ivh python-urlgrabber-3.10-8.el7.noarch.rpm 下图表示安装成功
8.安装其他的rpm: rpm -ivh yum-*
9.配置yum源数据
9.1. cd /etc/yum.repos.d/
9.2. 在 /etc/yum.repos.d/下创建一个repo结尾的文件(名称没关系)
9.3. 编辑vi /etc/yum.repos.d/xiao.repo
9.4添加以下内容内容:
[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
10.yum clean all 清除原有缓存
11.yum makecache 获取yum列表(需要网络)
12.yum repolist可以查看源数据,出现下图代表成功