zoukankan      html  css  js  c++  java
  • yum源服务器搭建

    1、安装httpd和php

    yum install -y httpd

    yum install -y php

    我们需要手动去配置 httpd 的相关参数,配置文件的位置: /etc/httpd/conf
    参数说明见下表
    参数说明当前配置
    ServerName 服务器的地址信息 http://192.168.1.100:10009
    DocumentRoot http文件服务器的下载目录 /package
    Listen 监听的端口 10009
    Directory 服务器文件 /package(与 DocumentRoot 文件一致)

    在设定的Directory下新建test.php

    加开机自自动chkconfighttpd on

    service httpd start

    浏览器访问http://localhost:port/test.php ---ok

    2、在Directory下上传/rhel-server-6.8/Packages

    浏览器访问:http://localhost:port/rhel-server-6.8/Packages  ---ok

    3.安装createrepo,此程序主要用于生成创建yum仓库,创建索引信息。

    yum install createrepo
    createrepo /data/resource/rhel-server-6.8

    到这里我们已经完成了yum源服务器的配置。

    可以查看在 /data/resource/rhel-server-6.8 多了repodata文件夹

    4、我们到客户端进行测试:

    [root@IP70-CentOS7 ~]# >>vim /etc/yum.repos.d/Local.repo

    vi redhat6.8.repo

     [RedHat6.8]

    name= RedHat6.8
    baseurl= http://xx.xx.xx.236:11080/rhel-server-6.8/
    enabled=1
    gpgcheck=0

    然后执行

    yum clean all 

    yum makecache
    yum repolist

     至此配置完成。

  • 相关阅读:
    单片机GPIO口模拟串口的方法
    arduino~snprintf
    #7号板问题
    stm8s + si4463 寄存器配置
    linux之cut用法
    74HC123D 引脚介绍及应用
    无线板卡接口定义
    iio adc转换应用编写
    m72 gprs模块的应用编写
    dac7562 应用层实现dac
  • 原文地址:https://www.cnblogs.com/zhxiaoxiao/p/10233135.html
Copyright © 2011-2022 走看看