yum源的搭建HTTP方式

来源:互联网 发布:手机电脑控制软件 编辑:程序博客网 时间:2024/05/29 04:13

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










0 0