linux配置yum安装rpm过程


1、加载iso(准备报iso文件,此处iso文件目录是 /home/soft/):
mkdir /mnt/iso 
mount /home/soft/rhel-server-6.5-x86_64-dvd.iso /mnt/iso -o loop

2、rpm -q createrepo --发现没装过

3、安装 createrepo
cd /mnt/iso/Packages (这是iso镜像的目录,如果是挂载dvd在RHEL_5.9x86_64DVD\Server)
rpm --import /etc/pki/rpm-gpg/RPM*
rpm -ivh createrepo-0.9.9-18.el6.noarch.rpm  --force --nodeps

4、配置yum源
cd /etc/yum.repos.d
cp rhel-source.repo rhel-source.repo.bak
vim rhel-source.repo (以下每个的目录下都有 listing  repodata  TRANS.TBL )
[RHEL6-Server-HighAvailability]
name=RHEL6-Server-HighAvailability
baseurl=file:///mnt/iso/HighAvailability
enabled=1
gpgcheck=0
gpgkey=file:///mnt/iso/RPM-GPG-KEY-redhat-release
[RHEL6-Server-LoadBalancer]
name=RHEL6-Server-LoadBalancer
baseurl=file:///mnt/iso/LoadBalancer
enabled=1
gpgcheck=0
gpgkey=file:///mnt/iso/RPM-GPG-KEY-redhat-release
[RHEL6-Server-ResilientStorage]
name=RHEL6-Server-ResilientStorage
baseurl=file:///mnt/iso/ResilientStorage
enabled=1
gpgcheck=0
gpgkey=file:///mnt/iso/RPM-GPG-KEY-redhat-release
[RHEL6-Server-ScalableFileSystem]
name=RHEL6-Server-ScalableFileSystem
baseurl=file:///mnt/iso/ScalableFileSystem
enabled=1
gpgcheck=0
gpgkey=file:///mnt/iso/RPM-GPG-KEY-redhat-release
[RHEL6-Server-Server]
name=RHEL6-Server-Server
baseurl=file:///mnt/iso/Server
enabled=1
gpgcheck=0
gpgkey=file:///mnt/iso/RPM-GPG-KEY-redhat-release
5、
createrepo -g /mnt/iso/Server/repodata/*comps-rhel6-Server.xml -o /mnt/iso/Server -i /mnt/iso/Server/listing /mnt/iso/Packages/

6、
  yum -y install gcc-4.4.7-4.el6.x86_64.rpm
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值