您的位置:首页 > 理论基础 > 计算机网络

搭建本地yum源(http方式) on Red Hat Enterprise Linux Server

2016-04-27 09:40 896 查看
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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: