Build the Enterprise Yum Warehouse

Source: Internet
Author: User

Build the Enterprise Yum Warehouse

Basic Package available on local CDBase
Yum Cache provides update packages
The Yum cache provides common packages:,,, nginx zabbix dockersaltstack

Environment preparation

system IP role Host name
Centos7.4_x86_64 192.168.69.112 Yum Warehouse Service Side yum_server_69_112
Centos7.4_x86_64 192.168.69.113 Yum Warehouse Client yum_client_69_113

Server-side configuration

1. Basic Environment Preparation

//关闭防火墙[[email protected]_server_69_112 ~]# systemctl stop firewalld//临时关闭selinux[[email protected]_server_69_112 ~]# setenforce 0//安装ftp服务,启动并加入开机启动[[email protected]_server_69_112 ~]# yum -y install vsftpd [[email protected]_server_69_112 ~]# systemctl start vsftpd [[email protected]_server_69_112 ~]# systemctl enable vsftpd//开启yum缓存功能[[email protected]_server_69_112 ~]# vim /etc/yum.conf[main] cachedir=/var/cache/yum/$basearch/$releasever keepcache=1[[email protected]_server_69_112 ~]# yum clean all

2. Provide the base base source

[[email protected]_server_69_112 ~]# mkdir /var/ftp/centos75[[email protected]_server_69_112 ~]# mount /dev/cdrom /mnt[[email protected]_server_69_112 ~]# cp -rp  /mnt/Packages/*.rpm /var/ftp/centos75

3. Provision of third-party sources

[[email protected]_server_69_112 ~]# mkdir /var/ftp/ops[[email protected]_server_69_112 ~]# yum -y install nginx docker//复制已缓存的 Nginx docker 及依赖包 到自定义 YUM 仓库目录中[[email protected]_server_69_112 ~]# find /var/cache/yum/x86_64/7/ -iname "*.rpm" -exec cp -rf {} /var/ftp/ops \;

4. Install createrepo and create a reopdata warehouse

//安装createrepo[[email protected]_server_69_112 ~]# yum -y install createrepo//生成仓库信息[[email protected]_server_69_112 ~]# createrepo /var/ftp/ops[[email protected]_server_69_112 ~]# createrepo /var/ftp/centos75//注意: 如果此仓库每次新增软件则需要重新生成一次

The client uses the Yum source

1. Configure and use the base underlying source

[[email protected]_client_69_113 ~]# gzip /etc/yum.repos.d/*[[email protected]_client_69_113 ~]# vim /etc/yum.repos.d/centos7.repo [centos75]name=centos74_basebaseurl=ftp://172.16.1.250/centos75gpgcheck=0

2. Client pointing to local ops source

[[email protected]_client_69_113 ~]# vim /etc/yum.repos.d/ops.repo [ops]name=local ftpserverbaseurl=ftp://172.16.1.250/opsgpgcheck=0

Yum Clean All
Yum Makecache

Yum Warehouse installation software error
Ftp://172.16.1.250/centos75/repodata/repomd.xml: [Errno] FTP Error 550-server denied the change to the given Direc Tory
Deny changes to the specified directory

Solve
Installing Createrepo
[Email protected]_server_69_112 ~]# yum-y Install Createrepo
Generate Warehouse Information
[Email protected]_server_69_112 ~]# CREATEREPO/VAR/FTP/CCENTOS75
Note: If you add software to this warehouse each time you need to regenerate

Build the Enterprise Yum Warehouse

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.