redhat6 本地 yum创建。

 编辑yum仓库配置文件
[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# ls
rhel-source.repo
##备份 rhel-source.repo
[root@localhost yum.repos.d]# cp rhel-source.repo rhel-source.repo.bak
[root@localhost yum.repos.d]# vim rhel-source.repo
[myyum](库名称)
name=RedHatMyyum(名称描述)
baseurl=file:///webapps/install/redhat/iso/(yum源目录,源地址)
enabled=1(是否启用该yum源,0为禁用)
gpgcheck=1(检查GPG-KEY,0为不检查,1为检查)
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release(gpgcheck=0时无需配置)
 
 在放“rhel-server-6.0-x86_64-dvd.iso ”的文件目录下,/webapps/install/redhat/iso 目录先建立起来,然后使用命令挂载空间:
mount -o loop rhel-server-6.0-x86_64-dvd.iso /webapps/install/redhat/iso
 

1首先确认机器是否安装rsh包:

[oracle@linux ~]$ rpm -aq |grep rsh

rsh-0.17-25.4

rsh-server-0.17-25.4
 [oracle@linux ~]$yum -y install rsh*
yum -y remove rsh*
查看本地yum使用哪个
yum repolist
ftp方式 yum
#cat /etc/yum.repos.d/os.repo
[os]
name=Linux os Packages
baseurl=ftp://158.220.42.51/pub/os
gpgcheck=0
proxy_none_

猜你喜欢

转载自hui8080.iteye.com/blog/2237093