Fork me on GitHub

daydayup863

人生就像一杯茶,不会苦一辈子,但总会苦一阵子。

0%

OS image

编写centos7.sh

1
2
3
4
5
6
7
8
9
#!/bin/bash
mkdir centos7
cd centos7
supermin5 -v --prepare bash grep yum yum-plugin rpm systemd pkgconfig initscripts -o supermin.d
supermin5 -v --build --format chroot supermin.d -o appliance.d
cp /etc/resolv.conf appliance.d/etc/
echo 7 > appliance.d/etc/yum/vars/releasever
tar --numeric-owner -cpf centos-7.tar -C appliance.d .
cat centos-7.tar | docker import - os/centos
阅读全文 »

配置yum源

$ cat /etc/yum.repos.d/CentOS.repo

1
2
3
4
5
6
7
8
9
10
11
12
13
14
[centos-sclo-rh]
name=CentOS-6.10 - SCLo rh
baseurl=http://vault.centos.org/centos/6.10/sclo/$basearch/rh/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo

[centos-sclo-sclo]
name=CentOS-6.10 - SCLo sclo
baseurl=http://vault.centos.org/centos/6.10/sclo/$basearch/sclo/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo

$ yum clean all && yum makecache

阅读全文 »