标签:dir dock configure 客户端 head util contain dev ice
wget https://storage.googleapis.com/harbor-releases/release-1.7.0/harbor-offline-installer-v1.7.1.tgz
?
tar xvf harbor-offline-installer-<version>.tgz
hostname = 192.192.49.87
harbor_admin_password = Harbor12345
sudo ./install.sh
sudo mkdir -p /var/yum_data/centos/7/{os,updates,extras,other}/x86_64
sudo yum -y install createrepo
?
#同步某个repo到指定目录,不建议用
sudo reposync -r docker-ce-stable -p /var/yum_data/centos/7/other/
sudo reposync -r base -p /var/yum_data/centos/7/os/
?
#下载某个软件到指定目录,也不建议用
sudo yum install --downloadonly --downloaddir=\
/var/yum_data/centos/7/other/x86_64/docker-ce-stable \
docker-ce
?
#下载rpm到目标目录
sudo yum install --downloadonly --downloaddir=/var/yum_data/centos/7/other/x86_64/nginx/ nginx
?
sudo yumdownloader --resolve --destdir=/var/yum_data/centos/7/other/x86_64/docker-ce-stable/ docker-ce-18.09.1-3.el7
?
sudo yumdownloader --resolve --destdir=/var/yum_data/centos/7/other/x86_64/mariadb/ mariadb mariadb-server
?
sudo createrepo /var/yum_data/centos/7/other/x86_64
sudo createrepo --update /var/yum_data/centos/7/other/x86_64
?
#harbor的yml 的proxy下添加
volumes:
- ./common/config/nginx:/etc/nginx:z
- /var/yum_data:/var/yum_data:z
?
/home/centos/harbor/common/config/nginx
location /centos/ {
root /var/yum_data;
autoindex_exact_size off;
}
?
下载添加repo
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
?
sudo yum-config-manager --add-repo \
http://192.192.49.87/centos/7/other/cnicg.repo
?
sudo yum clean all
sudo yum makecache
sudo yum --disablerepo=base,updates,extras install -y mariadb mariadb-server
cnicg.repo
# cnicg repo
# copy this repo to destination-host,‘/etc/yum.repos.d/‘
# and run ‘sudo yum clean all && sudo yum makecache‘
?
[cnicg]
name=CentOS-$releasever - cnicg
baseurl=http://192.192.49.87/centos/$releasever/other/$basearch/
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
标签:dir dock configure 客户端 head util contain dev ice
原文地址:https://www.cnblogs.com/fatt/p/10320412.html