一、Docker Compose 安装
[[email protected] ~]# yum -y install epel-release [[email protected] ~]# yum -y install python-pip [[email protected] ~]# pip --version pip 8.1.2 from /usr/lib/python2.7/site-packages (python 2.7) [[email protected] ~]# pip install --upgrade pip
[[email protected] ~]# pip install docker-compose
编译中断。 error: command ‘gcc‘ failed with exit status 1 ---------------------------------------- ERROR: Command errored out with exit status 1: /usr/bin/python2 -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"‘"‘/tmp/pip-install-SF_hPB/subprocess32/setup.py‘"‘"‘; __file__=‘"‘"‘/tmp/pip-install-SF_hPB/subprocess32/setup.py‘"‘"‘;f=getattr(tokenize, ‘"‘"‘open‘"‘"‘, open)(__file__);code=f.read().replace(‘"‘"‘\r\n‘"‘"‘, ‘"‘"‘\n‘"‘"‘);f.close();exec(compile(code, __file__, ‘"‘"‘exec‘"‘"‘))‘ install --record /tmp/pip-record-MXLYK7/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
解决办法
yum install python-devel yum install libevent-devel pip install gevent
[[email protected] ~]# docker-compose version docker-compose version 1.25.0, build b42d419 docker-py version: 4.1.0 CPython version: 2.7.5 OpenSSL version: OpenSSL 1.0.2k-fips 26 Jan 2017
[[email protected] ~]# docker --version Docker version 19.03.5, build 633a0ea
[[email protected] ~]# tar -zxf harbor-offline-installer-v1.2.0.tgz [[email protected] ~]# cd harbor [[email protected] harbor]# vi /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.1.225 docker.ljj.cn [[email protected] harbor]# vi harbor.cfg hostname = docker.ljj.cn ui_url_protocol = https db_password = root123 max_job_workers = 3 customize_crt = on ssl_cert = /data/cert/server.crt ssl_cert_key = /data/cert/server.key
[[email protected] harbor]# mkdir -p /data/cert [[email protected] harbor]# cd /data/cert/
[[email protected] cert]# openssl genrsa -des3 -out server.key 2048 Generating RSA private key, 2048 bit long modulus ................+++ ......................................................................+++ e is 65537 (0x10001) Enter pass phrase for server.key: Verifying - Enter pass phrase for server.key: #密码123456 [[email protected] cert]# openssl req -new -key server.key -out server.csr Enter pass phrase for server.key: #输入123456 You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter ‘.‘, the field will be left blank. ----- Country Name (2 letter code) [XX]:CN State or Province Name (full name) []:SX Locality Name (eg, city) [Default City]:TY Organization Name (eg, company) [Default Company Ltd]:ZDC Organizational Unit Name (eg, section) []:ZDC Common Name (eg, your name or your server‘s hostname) []:docker.ljj.cn Email Address []:1350748936@qq.com Please enter the following ‘extra‘ attributes to be sent with your certificate request A challenge password []: #直接回车 An optional company name []: #直接回车
[[email protected] cert]# cp server.key server.key.org [[email protected] cert]# openssl rsa -in server.key.org -out server.key Enter pass phrase for server.key.org: #退密码输入123456 writing RSA key
[[email protected] cert]# openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt#转换成不带密码的证书。
Signature ok subject=/C=CN/ST=SX/L=TY/O=ZDC/OU=ZDC/CN=docker.ljj.cn/emailAddress=1350748936@qq.com Getting Private key
安装harbor
[[email protected] ~]# cd harbor [[email protected] harbor]# ./install.sh
原文地址:https://www.cnblogs.com/liujunjun/p/12129566.html
时间: 2024-11-09 03:54:24