1)install httpd
yum install httpd
2) start httpd service
start service httpd
3)config file
/etc/httpd/conf/httpd.conf
care the line
DocumentRoot"/var/www/html" which is the config root to start http
4)verify the http work or not
http://localhost:80 or http:httpserverip:80
if the site can't be access fromother client , please trun off the firewall with
service iptables stop
5) install createrepo
yum install createrepo
6) create the dir and copy the rpmsto the corresponding dir which you create just now
mkdir -p /var/www/html/localYum
cp rpms-pakages /var/www/html/localYum
7)create respon index and info file
createrepo /var/www/html/localYum
8) in your client on which you wantto use the local yum you just create
vim /etc/yum.repos.d/rhel-source.repo
to add the line
[CDGlocal]
name=RHEL
baseurl=http://10.200.114.144//localYum
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
okay ,it's done ,you can yum cleanand yum update
yun install pkgs which the local yumrespon own
if you have any doubt you can referthe below reference which is detail for the process and how to fix the errorsyou may meet .
CentOS搭建本地yum源(http方式)
http://my.oschina.net/u/1461927/blog/372147
本文介绍如何在CentOS系统中搭建HTTP方式的本地YUM源,包括安装配置Apache服务器、创建本地仓库目录、复制RPM包、生成仓库索引文件及客户端配置等步骤。
2013

被折叠的 条评论
为什么被折叠?



