废话不多下边给大家介绍一种在redhat上配置yum的方法:
环境: vm 7.1.3
系统: rhle 5.4
其他:建议清空防火墙规则关闭seLinux
配置:
# mkdir -p /media/repo/Redhat
#cd /media/repo/Redhat
#mount /dev/cdrom /media/repo/Redhat
#cd ..
#rpm -ivh /media/repo/Server/createrepo-0.4.11-3.e.15.noarch.rpm
#vi /etc/yum.conf
.....
#gpgcheck=0
Plagins=1
[local_cdrom]
baseurl=file:///media/repo 注意这个目录不是光盘挂载目录,是创建本地源的目录
name=my local_cdrom
:x
Repo#createrepo -g /media/repo/Redhat/Server/repodata/repomd.xml . 注意后边还有个“.”
ok~!~!~!
测试:
Repo#yum install httpd* -y
repo#cd /var/www/html
Html#vi index.html
Dfdfdfdf
Dfdf
:x
html#yum install vsftpd* -y
Html#cd /etc/selinux
Selinux#vi /etc/selinux/config
SELINUX=disabled
html#service httpd start
html#service vsftpd start
用客户端访问ftp://192.168.1.1 http://192.168.1.1