centos7 build your own yum source
HTTPS: // www.cnblogs.com/juandx/p/6136621.html still need to learn it yourself checked before recall but forgotten.
1. Install nginx, createrepo
1
2
|
yum install nginx -y
yum install createrepo -y
|
2. Modify the nginx configuration file, / etc / nginx / nginx.conf
1
2
3
|
location / {
autoindex
on
;
}
|
Restart nginx, systemctl restart nginx
3. Set up a folder in the root directory of nginx
1
|
mkdir -p /usr/share/nginx/html/CentOS_72_1511_Yum/Aliyun/version_7.2/64bit
|
4. Prepare Ali cloud sync source, base, updates, extras, epel, ensuring that only the following two repo /etc/yum.repos.d/
1
2
3
|
wget -O /etc/yum.repos.d/CentOS-Base.repo http:
//mirrors.aliyun.com/repo/Centos-7.repo
wget -O /etc/yum.repos.d/CentOS-epel.repo http:
//mirrors.aliyun.com/repo/epel-7.repo
|
5. Start Sync Downloadable
1
|
reposync -p /usr/share/nginx/html/CentOS_72_1511_Yum/Aliyun/version_7.2/64bit/
|
6. Jiancang
1
2
3
4
|
createrepo -p /usr/share/nginx/html/CentOS_72_1511_Yum/Aliyun/version_7.2/64bit/
base
/Packages
createrepo -p /usr/share/nginx/html/CentOS_72_1511_Yum/Aliyun/version_7.2/64bit/extras/Packages
createrepo -p /usr/share/nginx/html/CentOS_72_1511_Yum/Aliyun/version_7.2/64bit/updates/Packages
createrepo -p /usr/share/nginx/html/CentOS_72_1511_Yum/Aliyun/version_7.2/64bit/epel
|
7. crontab timing synchronization
1
2
|
crontab -e
1 2 * * * /usr/bin/reposync -np /usr/share/nginx/html/CentOS_72_1511_Yum/Aliyun/version_7.2/64bit/
|
1. Install nginx, createrepo
1
2
|
yum install nginx -y
yum install createrepo -y
|
2. Modify the nginx configuration file, / etc / nginx / nginx.conf
1
2
3
|
location / {
autoindex
on
;
}
|
Restart nginx, systemctl restart nginx
3. Set up a folder in the root directory of nginx
1
|
mkdir -p /usr/share/nginx/html/CentOS_72_1511_Yum/Aliyun/version_7.2/64bit
|
4. Prepare Ali cloud sync source, base, updates, extras, epel, ensuring that only the following two repo /etc/yum.repos.d/
1
2
3
|
wget -O /etc/yum.repos.d/CentOS-Base.repo http:
//mirrors.aliyun.com/repo/Centos-7.repo
wget -O /etc/yum.repos.d/CentOS-epel.repo http:
//mirrors.aliyun.com/repo/epel-7.repo
|
5. Start Sync Downloadable
1
|
reposync -p /usr/share/nginx/html/CentOS_72_1511_Yum/Aliyun/version_7.2/64bit/
|
6. Jiancang
1
2
3
4
|
createrepo -p /usr/share/nginx/html/CentOS_72_1511_Yum/Aliyun/version_7.2/64bit/
base
/Packages
createrepo -p /usr/share/nginx/html/CentOS_72_1511_Yum/Aliyun/version_7.2/64bit/extras/Packages
createrepo -p /usr/share/nginx/html/CentOS_72_1511_Yum/Aliyun/version_7.2/64bit/updates/Packages
createrepo -p /usr/share/nginx/html/CentOS_72_1511_Yum/Aliyun/version_7.2/64bit/epel
|
7. crontab timing synchronization
1
2
|
crontab -e
1 2 * * * /usr/bin/reposync -np /usr/share/nginx/html/CentOS_72_1511_Yum/Aliyun/version_7.2/64bit/
|