yum源的搭建HTTP方式

1 将iptables 关闭及selinux关闭;

2将操作系统的镜像包挂载在目录下:

mount -o loop /CentOS6.iso /var/www/html/CentOS6

3 安装httpd,可以通过RPM包直接安装

4 service httpd start 启动时报错如下:

httpd: apr_sockaddr_info_get() failed for shiwei

httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

在 /etc/hosts 中填入自己的主机名称,如下:127.0.0.1 mysql01

5 将httpd改为开机重启:chkconfig httpd on

6 http访问进行测试:http://192.168.10.100/Centos6

7修改yum源配置文件

/etc/yum.repos.d/CentOS-Base.repo
[base]
name=CentOS-$releasever - Base
baseurl=http://192.168.10.100/Centos6
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6


8测试是否成功

[root@template yum.repos.d]# yum list | more
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
Installed Packages
ConsoleKit.x86_64                          0.4.1-3.el6                      @anaconda-CentOS-201303020151.x86_64/6.4
ConsoleKit-libs.x86_64                     0.4.1-3.el6                      @anaconda-CentOS-201303020151.x86_64/6.4
GConf2.x86_64                              2.28.0-6.el6                     @anaconda-CentOS-201303020151.x86_64/6.4
GConf2-devel.x86_64                        2.28.0-6.el6                     @anaconda-CentOS-201303020151.x86_64/6.4
MAKEDEV.x86_64                             3.24-6.el6                       @anaconda-CentOS-201303020151.x86_64/6.4
ORBit2.x86_64                              2.14.17-3.2.el6_3                @anaconda-CentOS-201303020151.x86_64/6.4
ORBit2-devel.x86_64                        2.14.17-3.2.el6_3                @anaconda-CentOS-201303020151.x86_64/6.4
SDL.x86_64                                 1.2.14-3.el6                     @anaconda-CentOS-201303020151.x86_64/6.4
abrt.x86_64                                2.0.8-15.el6.centos              @anaconda-CentOS-201303020151.x86_64/6.4
abrt-addon-ccpp.x86_64                     2.0.8-15.el6.centos              @anaconda-CentOS-201303020151.x86_64/6.4
abrt-addon-kerneloops.x86_64               2.0.8-15.el6.centos              @anaconda-CentOS-201303020151.x86_64/6.4
abrt-addon-python.x86_64                   2.0.8-15.el6.centos              @anaconda-CentOS-201303020151.x86_64/6.4
abrt-cli.x86_64                            2.0.8-15.el6.centos              @anaconda-CentOS-201303020151.x86_64/6.4
abrt-libs.x86_64                           2.0.8-15.el6.centos              @anaconda-CentOS-201303020151.x86_64/6.4
abrt-tui.x86_64                            2.0.8-15.el6.centos              @anaconda-CentOS-201303020151.x86_64/6.4
acl.x86_64                                 2.2.49-6.el6                     @anaconda-CentOS-201303020151.x86_64/6.4










  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值