Install Harbor mirror warehouse under CentOS

Need to rely on Python 2.7 or above, Docker engine 1.10 or above, and Docker Compose 1.6.0 or above.
Note: CentOS 7.2 comes with Python 2.7.5

Install Harbor
Download the offline installation package https://github.com/goharbor/harbor/releases

Unzip the installation package tar xvf harbor-offline-installer-v1.7.4.tgz
Modify the configuration file harbor.cfg

The required parameters are:

  1. hostname: The hostname of the target host, used to access the UI and register services. Cannot use localhost and 127.0.0.1, because harbor needs to be accessed by external clients, I changed it to an IP address here.
  2. ui_url_protocol: The protocol used to access the UI and token/notification service. The default is http. If SSL authentication is enabled on Nginx, it can be set to https. I used the default http here.
  3. max_job_workers: The maximum number of replicated workers in the job service. The default value is 50 here. Considering the performance of my server, I modified it to 5.
  4. customize_crt: set to on, the prepare script creates the private key and root certificate used to generate/verify the registry token. If set to off, the key and root certificate will be provided by an external source, and I set it to on.
  5. ssl_cert: The location of the SSL certificate. This property will only take effect when the protocol is set to https.
  6. ssl_cert_key: The location of the SSL key. This property will only take effect when the protocol is set to https.
  7. secretkey_path: The path where the password is stored, it is best not to modify it here, otherwise an error will be reported later, I modified it to /data/.
  8. log_rotate_count: The number of log files retained. After reaching the maximum value, previous logs will be deleted circularly.
  9. log_rotate_size: The size of each log. To save space, I set a maximum of 5 logs, each with a maximum of 200MB.
  10. db_password: The root password of the MySQL database used for DB authentication.
  11. harbor_admin_password: set the password of admin, the default is Harbor12345

Run prepare to update the parameters. /prepare

Start the installation, execute ./install.sh to install

After installation, visit http://ip

have a test
docker pull hello-world
docker tag hello-world xxx.xxx.xxx.xxx/library/hello-world
docker push xxx.xxx.xxx.xxx/library/hello-world
Please refer to http://www.ilkhome.cn/?post=450 for reporting port 443 issues

Push mirror failed, report denied: requested access to the resource is denied
Solution: In this case, log in to the harbor warehouse. If the login is successful, it will be OK.
docker login xxx.xxx.xxx.xxx
Username: admin
Password:
Login Succeeded

stop:
docker-compose -f docker-compose.yml stop
start up:
docker-compose -f docker-compose.yml start

Recommended Posts

Install Harbor mirror warehouse under CentOS
CentOS deploys Harbor mirror warehouse
Install mysql5.7 under CentOS7
Install ActiveMQ under Centos7
Install PostgreSQL12 under CentOS7
ubuntu install harbor warehouse
Install mysql under Centos 7
Install Jenkins under Centos 7
Install MariaDB under MariaDB Centos7
Install mysql5.1 under CentOS6.5
Install Oracle11gR2 database under CentOS6.9
Install MySQL under Linux (CentOS 7)
Install MongoDB database under CentOS7
CentOS 6.8 under linux install mongodb
Install Mesos tutorial under CentOS7
Install and configure keepalived under CentOS 5.9
Compile and install LAMP under Centos 5.2
[Introduction to redis] Install redis under Centos
Install Python3 and ansible under CentOS8
Install the latest OpenCV4.3 under Centos8
Install and use docker under CentOS 6.8
1.5 Install Centos7
Install Python3 and Py under CentOS7
Install Mono 3.2 and Jexus 5.4 under CentOS 6.3
CentOS 8 (2)
CentOS deploys Harbor mirror warehouse
CentOS 8 (1)
Install Harbor mirror warehouse under CentOS
centos7 python3.7+vi
CentOS + Jenkins
1.5 Install Centos7
2019-07-09 CentOS7 installation
centos7_1708 installation
Centos 7.5 python3.6
Compile and install libmodbus library under CentOS7
Install mysql8.0.13 version under Linux CentOS7 system
Install Mono 2.10.8 and Jexus 5.0 under 32- and 64-bit CentOS 6.0
Three ways to install JDK under CentOS
Install Docker CE in yum under CentOS 7
Centos6 install Python2.7.13
Centos7.3 install nginx
CentOS7.2 install Mysql5.7.13
CentOS install Redmine
Centos7 install Python 3.6.
CentOS7 install MySQL
Centos7 install protobuf
CentOS 7 install Docker
CentOS7 install GlusterFS
CentOS 7.4 install Zabbix 3.4
CentOS7 install Docker
Centos6.5 install Tomcat
CentOS install Python 3.6
centos7 install docker-ce 18.01.0
CentOS 7.2 install MariaDB
CentOS 7 install Hadoop 3.0.0
Centos7 install Python2.7
Centos 7.6 install seleniu
CentOS 7.3 install Zabbix3
Centos7 install LAMP+PHPmyadmin
CentOS install mysql
CentOS install openjdk 1.8
CENTOS6.5 install CDH5.12.1 (1)
CentOS install PHP
CentOS6 install mist.io
CentOS7 install mysql
centOs install rabbitMQ
CentOS 7 install MySQL 5.6
Centos7 install Nginx
CentOS6.5 install CDH5.13
Centos7 install docker18