• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Friday, May 9, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System CentOS

How to Install Harbor on CentOS 7

How VPS by How VPS
October 1, 2019
in CentOS
0
0
SHARES
33
VIEWS
Share on FacebookShare on Twitter

Contents

  1. Prerequisites
  2. Getting Started
  3. Install Docker and Docker-Compose
  4. Install Harbor
  5. Generate your own SSL certificate
  6. Configure Harbor
  7. Access Harbor Web Interface
  8. Conclusion
  9. Want to contribute?


Harbor is an open-source enterprise-class registry server that stores and distributes Docker images. Harbor extends the open source Docker Distribution by adding the functionalities usually required by an enterprise, such as security, identity and management. As an enterprise private registry, Harbor offers better performance and security. Having a registry closer to the build and run environment improves the image transfer efficiency. Harbor supports the setup of multiple registries and has images replicated between them. In addition, Harbor offers advanced security features, such as user management, access control and activity auditing.

Prerequisites

  • A Vultr CentOS 7 server instance with at least 1GB RAM.
  • A non-root user with sudo privileges setup on your server.

Getting Started

Before starting, you will need to install the EPEL repo and other required packages to your system.

sudo yum install epel-release wget -y

Once the installation is completed, update your system to the latest version.

sudo yum update -y

Next, restart your system to apply all the updates.

sudo shutdown -r now

In this tutorial, we will use harbor.example.com as the domain name pointed to the server. Replace all occurrences of harbor.example.com with your actual domain name.

Install Docker and Docker-Compose

Harbor is deployed as several Docker containers. Therefore, it can be deployed on any Linux distribution that supports Docker. The target host requires that Docker and Docker Compose be installed.

Install Docker CE using the repository.

sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install -y docker-ce

Install Docker-Compose using pip.

sudo yum install -y python-pip
pip install docker-compose

Start Docker.

sudo systemctl start docker

Verify that docker is installed correctly by running the hello-world image.

sudo docker run hello-world

Install Harbor

The binary of the installer can be downloaded from the release page. Choose either the online or offline installer.

Online installer:

wget https://github.com/vmware/harbor/releases/download/v1.2.0/harbor-online-installer-v1.2.0.tgz

Offline installer:

wget https://github.com/vmware/harbor/releases/download/v1.2.0/harbor-offline-installer-v1.2.0.tgz

Use the tar command to extract the package.

tar -xvf harbor-online-installer-1.2.0.tgz

Generate your own SSL certificate

The default installation of Harbor uses HTTP – as such, you will need to add the option --insecure-registry to your client’s Docker daemon, then restart the Docker service. Installing Harbor with HTTPS is highly recommended. It will save us a lot of time in the future. Generate your own SSL certificate (replace harbor.example.com with your host’s FQDN).

mkdir cert && cd cert
openssl req -sha256 -x509 -days 365 -nodes -newkey rsa:4096 -keyout  harbor.example.com.key -out harbor.example.com.crt

Configure Harbor

Edit the Harbor config file.

vim harbor.cfg

Change hostname to your host’s FQDN and enable https.

hostname = harbor.example.com
ui_url_protocol = https
ssl_cert = /root/cert/harbor.example.com.crt
ssl_cert_key = /root/cert/harbor.example.com.key

Run install.sh to finish the installation.

./install.sh

Run Harbor in the background.

docker-compose up -d

Access Harbor Web Interface

Before starting, you will need to allow port 80 through the firewall.

sudo firewall-cmd --permanent --zone=public --add-port=80/tcp
sudo firewall-cmd --reload

You can access the Harbor server on http://harobr.example.com if you have DNS configured. Login using the default username and password.

admin
Harbor12345

Conclusion

The installation and basic configuration of Harbor is now complete.

Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article
Previous Post

Installing Bolt CMS on FreeBSD 12

Next Post

Install Rancher on CentOS 7

Next Post

Install Rancher on CentOS 7

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Thabet