Harbo1.5.2离线搭建
生活随笔
收集整理的這篇文章主要介紹了
Harbo1.5.2离线搭建
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
環境說明
操作系統版本:Centos7.5
docker版本:docker-ce 17.03.2
harbor版本:v1.5.2
docker-compose: ?1.22.0
基礎環境搭建
系統優化
CentOS關閉selinux
sudo sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/configsetenforce 0
關閉防火墻
systemctl stop firewalld.service && systemctl disable firewalld.service配置主機時間、時區、系統語言
查看時區 date -R或者timedatectl 修改時區 ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime 修改系統語言環境 sudo echo 'LANG="en_US.UTF-8"' >> /etc/profile;source /etc/profileKernel性能調優
cat >> /etc/sysctl.conf<<EOF net.ipv4.ip_forward=1 net.ipv4.neigh.default.gc_thresh1=4096 net.ipv4.neigh.default.gc_thresh2=6144 net.ipv4.neigh.default.gc_thresh3=8192 EOFsysctl -p
Docker安裝
#卸載舊版本Docker軟件 yum remove docker \docker-client \docker-client-latest \docker-common \docker-latest \docker-latest-logrotate \docker-logrotate \docker-selinux \docker-engine-selinux \docker-engine \container* #定義安裝版本 export docker_version=17.03.2 # step 1: 安裝必要的一些系統工具 sudo yum update -y sudo yum install -y yum-utils device-mapper-persistent-data lvm2 bash-completion # Step 2: 添加軟件源信息 sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo # Step 3: 更新并安裝 Docker-CE sudo yum makecache all version=$(yum list docker-ce.x86_64 --showduplicates | sort -r|grep ${docker_version}|awk '{print $2}') sudo yum -y install --setopt=obsoletes=0 docker-ce-${version} docker-ce-selinux-${version} # 如果已經安裝高版本Docker,可進行降級安裝(可選) yum downgrade --setopt=obsoletes=0 -y docker-ce-${version} docker-ce-selinux-${version} # 設置開機啟動 sudo systemctl enable docker# docker加速
vim /etc/docker/daemon.json
{
??? "registry-mirrors": ["https://z34wtdhg.mirror.aliyuncs.com"],
??? "storage-driver": "overlay2",
??? "storage-opts": ["overlay2.override_kernel_check=true"]
}
Docker-compose 安裝
#安裝依賴和pip yum -y install certbot libevent-devel gcc libffi-devel python-devel openssl-devel python-pip #pip方式安裝docker-compose pip install -U docker-compose #查看版本 docker-compose -v安裝harbor
#解壓安裝包 tar zxvf harbor-offline-installer-v1.5.2.tgz -C /opt/ #修改初始化配置(配置登錄地址,配置管理的默認密碼) cd /opt/harbor .... hostname = harbor.httpshop.com harbor_admin_password = 123491aq .... #安裝 ./install.sh?
轉載于:https://www.cnblogs.com/xzkzzz/p/9837659.html
總結
以上是生活随笔為你收集整理的Harbo1.5.2离线搭建的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: makefile 完美教程
- 下一篇: java控制台输出百分比进度条示例