最新版 Harbor 在ubuntu系统上安装
最新版 Harbor 在ubuntu系统上安装
The latest version of Harbor is installed on the ubuntu system
安装docker
Install docker
root@hello:~# curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
root@hello:~#
配置Docker Compose
Configure Docker Compose
root@hello:~# sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 633 100 633 0 0 2444 0 --:--:-- --:--:-- --:--:-- 2444
100 12.1M 100 12.1M 0 0 10.2M 0 0:00:01 0:00:01 --:--:-- 26.2M
root@hello:~# sudo chmod +x /usr/local/bin/docker-compose
root@hello:~# sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
root@hello:~# docker-compose --version
docker-compose version 1.29.2, build 5becea4c
root@hello:~#
下载Docker Harbor安装包
Download the Docker Harbor installation package
root@hello:~# wget https://github.com/goharbor/harbor/releases/download/v2.3.2/harbor-offline-installer-v2.3.2.tgz
root@hello:~#
解压安装包
Unzip the installation package
root@hello:~# tar xvf harbor-offline-installer-v2.3.2.tgz -C /usr/local/
harbor/harbor.v2.3.2.tar.gz
harbor/prepare
harbor/LICENSE
harbor/install.sh
harbor/common.sh
harbor/harbor.yml.tmpl
root@hello:~# cd /usr/local/harbor/
配置证书
Configure Certificate
root@hello:/usr/local/harbor# mkdir ca
root@hello:/usr/local/harbor# cd ca/
root@hello:/usr/local/harbor/ca# pwd
/usr/local/harbor/ca
root@hello:/usr/local/harbor/ca# openssl genrsa -des3 -out server.key 2048
Generating RSA private key, 2048 bit long modulus (2 primes)
......................................+++++
...................................................................................................................................................+++++
e is 65537 (0x010001)
Enter pass phrase for server.key:
Verifying - Enter pass phrase for server.key:
root@hello:/usr/local/harbor/ca#
root@hello:/usr/local/harbor/ca#
root@hello:/usr/local/harbor/ca# openssl req -new -key server.key -out server.csr
Enter pass phrase for server.key:
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) [AU]:
State or Province Name (full name) [Some-State]:
Locality Name (eg, city) []:
Organization Name (eg, company) [Internet Widgits Pty Ltd]:
Organizational Unit Name (eg, section) []:
Common Name (e.g. server FQDN or YOUR name) []:
Email Address []:
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
root@hello:/usr/local/harbor/ca#
root@hello:/usr/local/harbor/ca# cp server.key server.key.org
root@hello:/usr/local/harbor/ca# openssl rsa -in server.key.org -out server.key
Enter pass phrase for server.key.org:
writing RSA key
root@hello:/usr/local/harbor/ca# openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
Signature ok
subject=C = AU, ST = Some-State, O = Internet Widgits Pty Ltd
Getting Private key
root@hello:/usr/local/harbor/ca#
修改配置文件,修改 hostname 和证书路径 即可
Modify the configuration file, modify the hostname and certification path
root@hello:/usr/local/harbor# cp harbor.yml.tmpl harbor.yml
root@hello:/usr/local/harbor#
root@hello:/usr/local/harbor# vim harbor.yml
root@hello:/usr/local/harbor# cat harbor.yml
# Configuration file of Harbor
hostname: harbor.chenby.cn
# http related config
http:
# port for http, default is 80. If https enabled, this port will redirect to https port
port: 80
# https related config
https:
# https port for harbor, default is 443
port: 443
# The path of cert and key files for nginx
certificate: /usr/local/harbor/ca/server.crt
private_key: /usr/local/harbor/ca/server.key
harbor_admin_password: Harbor12345
----略----
root@hello:/usr/local/harbor#
安装
Install
root@hello:/usr/local/harbor# ./install.sh
[Step 0]: checking if docker is installed ...
Note: docker version: 20.10.8
[Step 1]: checking docker-compose is installed ...
Note: docker-compose version: 1.29.2
[Step 2]: loading Harbor images ...
Loaded image: goharbor/redis-photon:v2.3.2
Loaded image: goharbor/nginx-photon:v2.3.2
Loaded image: goharbor/harbor-portal:v2.3.2
Loaded image: goharbor/trivy-adapter-photon:v2.3.2
Loaded image: goharbor/chartmuseum-photon:v2.3.2
Loaded image: goharbor/notary-signer-photon:v2.3.2
Loaded image: goharbor/harbor-core:v2.3.2
Loaded image: goharbor/harbor-log:v2.3.2
Loaded image: goharbor/harbor-registryctl:v2.3.2
Loaded image: goharbor/harbor-exporter:v2.3.2
Loaded image: goharbor/notary-server-photon:v2.3.2
Loaded image: goharbor/prepare:v2.3.2
Loaded image: goharbor/harbor-db:v2.3.2
Loaded image: goharbor/harbor-jobservice:v2.3.2
Loaded image: goharbor/registry-photon:v2.3.2
[Step 3]: preparing environment ...
[Step 4]: preparing harbor configs ...
prepare base dir is set to /usr/local/harbor
Clearing the configuration file: /config/portal/nginx.conf
Clearing the configuration file: /config/log/rsyslog_docker.conf
Clearing the configuration file: /config/log/logrotate.conf
Generated configuration file: /config/portal/nginx.conf
Generated configuration file: /config/log/logrotate.conf
Generated configuration file: /config/log/rsyslog_docker.conf
Generated configuration file: /config/nginx/nginx.conf
Generated configuration file: /config/core/env
Generated configuration file: /config/core/app.conf
Generated configuration file: /config/registry/config.yml
Generated configuration file: /config/registryctl/env
Generated configuration file: /config/registryctl/config.yml
Generated configuration file: /config/db/env
Generated configuration file: /config/jobservice/env
Generated configuration file: /config/jobservice/config.yml
Generated and saved secret to file: /data/secret/keys/secretkey
Successfully called func: create_root_cert
Generated configuration file: /compose_location/docker-compose.yml
Clean up the input dir
[Step 5]: starting Harbor ...
Creating network "harbor_harbor" with the default driver
Creating harbor-log ... done
Creating harbor-portal ... done
Creating harbor-db ... done
Creating registryctl ... done
Creating redis ... done
Creating registry ... done
Creating harbor-core ... done
Creating harbor-jobservice ... done
Creating nginx ... done
? ----Harbor has been installed and started successfully.----
root@hello:/usr/local/harbor#
配置dns解析,或者在本地host中配置,具体配置略
Configure dns resolution, or configure in the local host, the specific configuration is omitted
登陆
Sign in
默认账号:admin
默认密码:Harbor12345
Default account: admin
Default password: Harbor12345
客户端使用
Client use
root@hello:~# vim /etc/docker/daemon.json
root@hello:~#
root@hello:~# cat /etc/docker/daemon.json
{
"insecure-registries": ["https://harbor.chenby.cn"]
}
root@hello:~#
root@hello:~# systemctl daemon-reload
root@hello:~#
root@hello:~#
root@hello:~# sudo systemctl restart docker
root@hello:~# docker login https://harbor.chenby.cn/
Username: admin
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
root@hello:~#
最新版 Harbor 在ubuntu系统上安装的更多相关文章
- 在64位Ubuntu系统上安装32位程序包
在64位Ubuntu系统上安装32位的程序包 $sudo apt-get install package_name:i386 例如: $sudo apt-get install openjdk-7-j ...
- linux/Ubuntu系统上安装mysql数据库(附图详解)
在前面的文章中,我已经分享了如何在Ubuntu系统中安装以及搭建java开发环境,那么当我们需要跟数据打交道的时候,那么就需要在ubuntu系统中安装一个数据库了,那么废话就不多说了,我们这里主要是分 ...
- 如何使用apt-get在ubuntu系统上安装OpenJDK 8
文章目录 添加ppa仓库 设置openjdk版本 查看java 版本 Android 8.1 系统编译的时候需要安装OpenJDK 8,这里如果可以自己下载源码编译安装,当然本想编译Android系统 ...
- Ubuntu系统上安装搜狗拼音输入法sogou
1. 首先在百度搜索搜狗拼音输入法Linux就能看到它的官网:http://pinyin.sogou.com/linux/ 下载后直接安装.安装成功后在控制台输入 im-config 如果选中的是fc ...
- 在Ubuntu 18.04系统上安装Systemback的方法(抄)
在Ubuntu 18.04系统上安装Systemback的方法 2018-12-26 21:39:05作者:林莉稿源:云网牛站 本文介绍如何在Ubuntu 18.04或者Ubuntu 18.10系统上 ...
- Nginx: ubuntu系统上如何判断是否安装了Nginx?
问题描述:ubuntu系统上,如何查看是否安装了Nginx? 解决方法:输入命令行:ps -ef | grep nginx master process后面就是Nginx的安装目录. 延伸:1. 如何 ...
- Linux:Ubuntu系统的安装
好久没更了,今天就更完这一期的Linux系统吧,这次主要安装的是常用Linux系统的之一:Ubuntu(乌班图)系统,这个系统和CentOS 7的安装步骤也是类似的,(我不采取用虚拟机的方法来安装,当 ...
- 在Ubuntu系统上搭建Hadoop 2.x(2.6.2)
官方的中文版的Hadoop快速入门教程已经是很老的版本了,新版的Hadoop目录结构发生了变化,因此一些配置文件的位置也略微调整了,例如新版的hadoop中找不到快速入门中提到的conf目录,另外,网 ...
- 在Ubuntu|CentOS上安装Shutter截图工具及快捷键设置
简介 Shutter前身叫GScrot,它是一款相当棒的截图软件. 通过Shutter,你可以截取包括选定区域.全屏幕.窗口.窗口内的控件甚至网页的图像.通过内置的强大插件机制,你可以在截图后,对图像 ...
- 如何在Ubuntu/CentOS上安装Linux内核4.0
大家好,今天我们学习一下如何从Elrepo或者源代码来安装最新的Linux内核4.0.代号为‘Hurr durr I'm a sheep’的Linux内核4.0是目前为止最新的主干内核.它是稳定版3. ...
随机推荐
- 【Leetcode第285场周赛】——周赛总结
1.6027. 统计数组中峰和谷的数量 - 力扣(LeetCode) (leetcode-cn.com) 给你一个下标从 0 开始的整数数组 nums .如果两侧距 i 最近的不相等邻居的值均小于 n ...
- jekyll+github pages
写在前面 这篇文章记录了我折腾jekyll,github pages的过程,看到别人的 xxxx.github.io,于是我也想搞一个,了解到大都使用的jekyll来生成的.最开始我还不知道可以直接f ...
- 通过Linux的socket套接字实现客户端与服务器端的通信
具体案例:使用树莓派ds18b20温度传感器实现温度上报 首先需要获得传感器文件中保存的温度信息: 温度信息通常保存在路径为"/sys/bus/w1/devices/28-xxxxxxxxx ...
- Centos7部署PXE+Kickstart 实现批量安装操作系统
1.PXE环境概述 作为一名运维人员,在一些中小公司经常会遇到一些机械式的重复工作,比如:批量一次大批量的进行操作系统的安装等等.为了实现自动化运维,减少人员负担我们可以部署以下服务:Kickstar ...
- CentOS 8.x下编译php 7.4、php5.6、php5.3多版本报错处理教程
一.编译安装php 7.4.x 参考CentOS 8.0.1905编译安装Nginx1.16.1+MySQL8.0.18+PHP7.3.10 1.安装编译工具及库文件(使用yum命令安装) yum i ...
- Redis各个客户端的对比
[Spring RedisTemplate 的底层一开始使用Jedis.但是自从SpringBoot2开始,底层开始使用了Lettuce,故不算在内] [题外话:如果要使用Spring来集成对Redi ...
- manjaro安装后配置与美化
时间同步 sudo timedatectl set-ntp true 换源 sudo pacman-mirrors -i -c China -m rank 更新 更新系统 sudo pacman -S ...
- Java中int型数据类型对应MySQL数据库中哪种类型?
java类 mysql数据库 java.lang.Byte byte TINYINT java.lang.Short short SMALLINT java.lang.Integer intege ...
- auto 类型说明符
编程时常常需要把表达式的值赋给变量,这就要求在声明变量时清楚地知道表达式的类型.然而做到这一点并非那么容易,有时候甚至根本做不到.为了解决这个问题,c++11新标准引入了auto类型说明符,用它就能让 ...
- store数据仓库
项目搭建 npm init vite-app GxShujukucd GxShujukunpm inpm i vue-router npm i vuex // 这一句是这节课的关键 新建store ① ...