In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Basic environment
System: centos7.4
First turn off the firewall and selinux
Iptables-F
Setenforce 0
Docker installation
Install dependency packages
Yum install-y yum-utils device-mapper-persistent-data lvm2
Install the docker package source
Yum-config-manager-- add-repo\
Https://download.docker.com/linux/centos/docker-ce.repo
Yum install docker-ce-y
Install docker-compase https://docs.docker.com/compose/install/
Under root users: curl-L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname-s)-$(uname-m)"-o / usr/local/bin/docker-compose
Chmod + x / usr/local/bin/docker-compose
Download the harbor installation package: https://github.com/goharbor/harbor/releases
I am using the harbor-offline-installer-v1.5.1.tgz version.
Tar-xvf harbor-offline-installer-v1.5.1.tgz, cd harbor, mkdir ssl
Then start to build your own certificate, and the ssl directory stores the certificate and public and private keys we created, and so on.
Openssl req-newkey rsa:4096-nodes-sha256-keyout ca.key-x509-days 365-out ca.crt
Enter the country CN, and your name can enter your own name
Create the root certificate that generates the ca.
Openssl req-newkey rsa:4096-nodes-sha256-keyout reg.wangxinlei.com.key-out reg.wangxinlei.com.csr
Openssl x509-req-days 365-in reg.wangxinlei.com.csr-CA ca.crt-CAkey ca.key-CAcreateserial-out reg.wangxinlei.com.crt
Request to issue a certificate
The generated file is shown in the following figure
Modify the configuration file harbor.cfg
Cd / root/harbor, vim harbor.cfg
Hostname = reg.wxl.com # hostname the domain name you entered when you generated the certificate
Ui_url_protocol = https protocol defaults to http and modified to https
Ssl_cert =. / ssl/reg.wxl.com.crt these two file paths are changed to the real path
Ssl_cert_key =. / ssl/reg.wxl.com.key
Harbor_admin_password = 123456 harbor login administrator password defaults to harbor12345, which can be changed to the password you need
Systemctl start docker, start docker.
Systemctl enable docker self-booting docker
Execute. / prepare under the harbor path to prepare the configuration file with the content just modified
Perform a. / install.sh installation under the harbor path
Prompt that the docker-compose version requires
[root@master01 harbor] #. / install.sh
[Step 0]: checking installation environment...
Note: docker version: 18.09.2
✖ Need to install docker-compose (1.7.1 +) by yourself first and run this script again.
Reinstall docker-compose, cd / usr/local/bin/, rm-rf docker-compose
Curl-L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname-s)-$(uname-m)"-o / usr/local/bin/docker-compose
Chmod + x / usr/local/bin/docker-compose
Execute. / install.sh again to install harbar.
Then modify the hosts file. Windows directory: C:\ Windows\ System32\ drivers\ etc\ hosts
Add 192.168. Reg.wangxinlei.com, if you do not have the permission to modify, please modify the file permission.
Linux system adds 192.168. 0 to the / etc/hosts directory. Reg.wangxinlei.com
Browser input reg.wangxinlei.com
Enter the account password in the configuration file admin 123456
The deployment is complete, and the next step is to learn how to use the harbar private repository.
Library, a project that comes with harbar, can be used to store some public images. Under this project, anyone can download images on pull, but push push is not allowed.
New user: wangxl Wxl148539
Enter the library project and add the user you just created to the new member.
If you log in to harbar locally. Create a directory first
Mkdir-p / etc/harbar/certs.d/reg.wangxinlei.com
Cp / root/harbar/ssl/reg.wangxinlei.com.crt to the directory above
And add domain name resolution to / etc/hosts
If you need to use harbar and push to push the docker image, you need to log in first.
Login command:
[root@master01 ~] # docker login reg.wangxinlei.com
Username: wangxl
Password:
WARNING! Your password will be stored unencrypted in / root/.docker/config.json.
Configure a credential helper to remove this warning. See
Https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded
Login succeeded.
Uploading a local image to the image repository is divided into two steps. The first step is to mark the image in the project.
Step 2: push the image to the current project
[root@master01 ~] # docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
Nginx latest 881bd08c0b08 Less than a second ago 109MB
Take the image above as an example
Docker tag nginx reg.wangxinlei.com/test/nginx:v1
Docker push reg.wangxinlei.com/test/nginx:v1
Harbar user manual address https://github.com/goharbor/harbor/blob/master/docs/user_guide.md
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.