zoukankan      html  css  js  c++  java
  • 利用http和ftp搭建yum本地源

    1      yum自建本地源

    1.1    配置ftp的yum源:

    S端:

    配置本地yum源,

    yum -y install vsftpd

    cp /usr/share/doc/vsftpd-3.0.2/EXAMPLE/INTERNET_SITE/vsftpd.conf /etc/vsftpd/vsftpd.conf

    sed -i 's/anon_max_rate=50000/anon_max_rate=5000000/g' /etc/vsftpd/vsftpd.conf

    systemctl start vsftpd;systemctl enable vsftpd

    mkdir /var/ftp/rhel

    mount  /dev/cdrom  /var/ftp/rhel

     

    C端的配置:

    cat <<EOF  >/etc/yum.repos.d/base.repo

    [ftp]

    name=ftp

    baseurl=ftp://192.168.100.162/rhel

    enabled=1

    gpgcheck=0

    EOF

    yum clean all

    yum repolist

    1.2    配置httpd的yum源

    S端:

    yum  -y  install  httpd

    mkdir  /var/www/html/rhel

    mount  /dev/cdrom  /var/www/html/rhel

    systemctl start httpd;systemctl enable httpd

    C端:

    cat <<EOF >/etc/yum.repos.d/base.repo

    [http-base]

    name=http-base

    baseurl=http://192.168.100.162/rhel/

    enabled=1

    gpgcheck=0

    EOF

    yum clean all

    yum repolist

  • 相关阅读:
    适配器模式
    事务
    JUnit4
    命令模式
    组合模式
    MySQL语法
    MyEclipse工具
    数据源和连接池
    Annotation
    Java反射机制
  • 原文地址:https://www.cnblogs.com/chuangcc/p/14185472.html
Copyright © 2011-2022 走看看