如果内部网络没有连接Internet就在本地配置yum仓库
将操作系统镜像上传到服务器中,进行挂载
mount –o loop rhel-server-6.7-x86_64-dvd.iso /mnt
yum源配置文件
#cd /etc/yum.repos.d
#cp rhel-source.repo rhel-source.repo.bak
#vi rhel-source.repo baseurl=file:///mnt/Server
enabled=
gpgcheck=
……….. yum clean all
yum list
安装了redhat6.3企业版,自带的yum用不起来,软件都找不到。
网上搜了一下说是没付钱。。。,需要改下yum源。操作步骤如下:
1.切换到yum源存放目录
[root@rhel6 ~]# cd /etc/yum.repos.d/
2.wget方式下载网易Centos yum源
[root@rhel6 yum.repos.d]# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
3.修改文件名,备份自带redhat源
[root@rhel6 yum.repos.d]# mv rhel-source.repo rhel-source.repo.bak
[root@rhel6 yum.repos.d]# mv CentOS6-Base-163.repo rhel-source.repo
4.修改repo文件中的版本号
[root@rhel6 yum.repos.d]# sed -i "s;\$releasever;6;g" rhel-source.repo
5.清除原有缓存
[root@rhel6 yum.repos.d]# yum clean all
6.获取yum列表
[root@rhel6 yum.repos.d]# yum makecache
安装yum报错 ImportError: No module named sqlitecachec
[root@localhostyum-3.4.]#./yummain.py update Traceback (mostrecent call last): File "./yummain.py", line , in<module> from yum import Errors File"/root/yum-3.4.3/yum/__init__.py", line , in <module> import rpmsack File"/root/yum-3.4.3/yum/rpmsack.py", line , in <module> import yum.depsolve File"/root/yum-3.4.3/yum/depsolve.py", line , in <module> from transactioninfo importTransactionMember File"/root/yum-3.4.3/yum/transactioninfo.py", line , in <module> from sqlitesack importYumAvailablePackageSqlite File"/root/yum-3.4.3/yum/sqlitesack.py", line , in <module> import yumRepo File"/root/yum-3.4.3/yum/yumRepo.py", line , in <module> import sqlitecachec ImportError: Nomodule named sqlitecachec 解决方法: 查看你安装的 python-iniparse-*.e*.noarch.rpm yum-*.centos.0.1.noarch.rpm yum-metadata-parser-*.x86_64.rpm yum-plugin-fastestmirror-*.noarch.rpm 插件版本是不是与CentOS对应的版本,插件版本安对了就不报错了