Centos7安装HarBor

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Centos7安装HarBor

一、安装docker
下载地址:http://49.4.115.45:81/docker-ce-18.03.0.ce-1.el7.centos.x86_64.rpm

1.1 启动
systemctl start docker
systemctl enable docker

1.2 编辑配置文件
vim /usr/lib/systemd/system/docker.service
ExecStart=/usr/bin/dockerd --insecure-registry 10.0.0.15     #12行

1.3 重启docker
systemctl restart docker

二、docker-compose安装
下载地址:http://49.4.115.45:81/docker-compose-Linux-x86_64

2.1 授权并移动
chmod +x docker-compose-Linux-x86_64
mv docker-compose-Linux-x86_64 /usr/local/sbin/docker-compose

2.2 查看是否生效
docker-compose version

docker-compose version 1.28.6, build 5db8d86f


docker-py version: 4.4.4
CPython version: 3.7.10
OpenSSL version: OpenSSL 1.1.0l  10 Sep 2019

三、Harbor安装
下载地址:http://49.4.115.45:81/harbor-offline-installer-v2.2.2.tgz
3.1 安装
1.解压

tar -zxvf harbor-offline-installer-v2.2.2.tgz -C /var

2.修改配置

cd /var/harbor/
cp harbor.yml.tmpl harbor.yml
vim harbor.yml

3. 安装

/var/harbor/install.sh

docker ps

[root@host harbor]# docker ps


CONTAINER ID       IMAGE                               COMMAND          
      CREATED             STATUS                             PORTS      
                NAMES
c7058f7f8630       goharbor/harbor-jobservice:v2.2.2  
 "/harbor/entrypoint.…"   18 seconds ago     Up 15 seconds (health:
starting)                               harbor-jobservice
43a004d38166       goharbor/nginx-photon:v2.2.2         "nginx -g 'daemon
of…"   18 seconds ago     Up 15 seconds (health: starting)   0.0.0.0:80-
>8080/tcp       nginx
315e16d4961e       goharbor/harbor-core:v2.2.2        
 "/harbor/entrypoint.…"   52 seconds ago     Up 18 seconds (health:
starting)                               harbor-core
a1690b4eeeb8       goharbor/harbor-portal:v2.2.2        "nginx -g 'daemon
of…"   56 seconds ago     Up 50 seconds (healthy)                        
              harbor-portal
06b92cf28a62       goharbor/harbor-db:v2.2.2            "/docker-
entrypoint.…"   56 seconds ago     Up 52 seconds (health: starting)      
                        harbor-db
9fc559d92d54       goharbor/redis-photon:v2.2.2         "redis-server
/etc/r…"   56 seconds ago     Up 52 seconds (healthy)                    
                  redis
548c0ceb55b7       goharbor/registry-photon:v2.2.2    
 "/home/harbor/entryp…"   56 seconds ago     Up 52 seconds (healthy)    
                                  registry
c930c809b386       goharbor/harbor-registryctl:v2.2.2  
"/home/harbor/start.…"   56 seconds ago     Up 51 seconds (healthy)      
                                registryctl
2ca8db9f19b3       goharbor/harbor-log:v2.2.2           "/bin/sh -c
/usr/loc…"   58 seconds ago     Up 56 seconds (healthy)          
 127.0.0.1:1514->10514/tcp   harbor-log
3.3 访问Harbor
浏览器输入ip地址,用户名默认:admin,密码是harbor.yml中配置的

You might also like