
이전 단계에서 구성한 내부 DNS 서버를 Harbor 서버의 네임서버로 설정합니다.
nmcli con show
NAME UUID TYPE DEVICE
enp0s1 e69cd965-7eae-3ea0-a891-b56c47641dd2 ethernet enp0s1
lo 822b460f-14fe-47e9-bd75-6bc29a12f85c loopback lo
nmcli con mod enp0s1 ipv4.dns "192.168.56.53 1.1.1.1" ipv4.ignore-auto-dns yes
nmcli con mod enp0s1 ipv6.ignore-auto-dns yes
nmcli con up enp0s1
그럼 설정한 도메인에 대해 정상적으로 질의하는 것을 확인할 수 있습니다.
[root@harbor-registry-server ~]# dig harbor.home.internal
; <<>> DiG 9.16.23-RH <<>> harbor.home.internal
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 36577
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
; COOKIE: 0d7b7a9d8778ca4b01000000696f954f5ce5c3d6ed95845b (good)
;; QUESTION SECTION:
;harbor.home.internal. IN A
;; ANSWER SECTION:
harbor.home.internal. 60 IN A 192.168.56.60
;; Query time: 0 msec
;; SERVER: 192.168.56.53#53(192.168.56.53)
;; WHEN: Tue Jan 20 23:46:39 KST 2026
;; MSG SIZE rcvd: 93
AWS S3를 Harbor의 백엔드로 이용할 예정이기 때문에 S3 통신 상태도 확인해주었습니다.
[root@harbor-registry-server ~]# curl -I https://s3.ap-northeast-2.amazonaws.com/
HTTP/1.1 405 Method Not Allowed
x-amz-request-id: DRTR1ES359RK3A4W
x-amz-id-2: sO0mf/5YU4CFWXwDK08BDnPcRitUITVQFy92c+2lNBC4sW/V7xNYV1eo5fop8k8v0KVR88GpPnoSymU7Wv+rQt+8XEgJYQaY
Allow: GET
Content-Type: application/xml
Transfer-Encoding: chunked
Date: Tue, 20 Jan 2026 14:49:26 GMT
Server: AmazonS3

[root@harbor-registry-server ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sr0 11:0 1 1024M 0 rom
vda 252:0 0 100G 0 disk
├─vda1 252:1 0 600M 0 part /boot/efi
├─vda2 252:2 0 1G 0 part /boot
└─vda3 252:3 0 98.4G 0 part
├─rl-root 253:0 0 63.5G 0 lvm /
├─rl-swap 253:1 0 3.9G 0 lvm [SWAP]
└─rl-home 253:2 0 31G 0 lvm /home
vdb 252:16 0 200G 0 disk
[root@harbor-registry-server ~]# mkfs.xfs -f /dev/vdb
meta-data=/dev/vdb isize=512 agcount=4, agsize=13107200 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=1, sparse=1, rmapbt=0
= reflink=1 bigtime=1 inobtcount=1
data = bsize=4096 blocks=52428800, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0, ftype=1
log =internal log bsize=4096 blocks=25600, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
Discarding blocks...Done.
mkdir -p /data
mount /dev/vdb /data
df -h /data
정상적으로 마운트되었다면 아래와 같은 정보를 출력합니다.
Filesystem Size Used Avail Use% Mounted on
/dev/vdb 200G 1.5G 199G 1% /data
UUID를 확인합니다.
[root@harbor-registry-server ~]# blkid /dev/vdb
/dev/vdb: UUID="95336391-2f40-453b-85df-2afa9298eed4" TYPE="xfs"
etc/fstab에 고정하여 재부팅에도 마운트가 유지되도록 합니다.
echo 'UUID=95336391-2f40-453b-85df-2afa9298eed4 /data xfs defaults,nofail 0 2' >> /etc/fstab
mkdir -p /data/harbor /data/cert
dnf install -y yum-utils
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
dnf install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
systemctl enable --now docker
docker version
docker compose version
[root@harbor-registry-server ~]# ls -l /data/cert
total 0
mkdir -p /data/cert
cd /data/cert
openssl genrsa -out ca.key 4096
openssl req -x509 -new -nodes -key ca.key -sha256 -days 3650 \
-subj "/C=KR/O=LAB/OU=CA/CN=LAB-ROOT-CA" \
-out ca.crt
openssl genrsa -out harbor.key 4096
cat > harbor-openssl.cnf <<'EOF'
[ req ]
default_bits = 4096
prompt = no
default_md = sha256
distinguished_name = dn
req_extensions = req_ext
[ dn ]
C = KR
O = LAB
OU = Harbor
CN = harbor.home.internal
[ req_ext ]
subjectAltName = @alt_names
[ alt_names ]
DNS.1 = harbor.home.internal
IP.1 = 192.168.56.60
EOF
openssl req -new -key harbor.key -out harbor.csr -config harbor-openssl.cnf
openssl x509 -req -in harbor.csr -CA ca.crt -CAkey ca.key -CAcreateserial \
-out harbor.crt -days 825 -sha256 -extensions req_ext -extfile harbor-openssl.cnf
ls -l /data/cert
openssl x509 -in /data/cert/harbor.crt -noout -subject -issuer -ext subjectAltName
[root@harbor-registry-server cert]# ls -l /data/cert
openssl x509 -in /data/cert/harbor.crt -noout -subject -issuer -ext subjectAltName
total 28
-rw-r--r--. 1 root root 1919 Jan 21 00:31 ca.crt
-rw-------. 1 root root 3268 Jan 21 00:31 ca.key
-rw-r--r--. 1 root root 41 Jan 21 00:31 ca.srl
-rw-r--r--. 1 root root 309 Jan 21 00:31 harbor-openssl.cnf
-rw-r--r--. 1 root root 1968 Jan 21 00:31 harbor.crt
-rw-r--r--. 1 root root 1736 Jan 21 00:31 harbor.csr
-rw-------. 1 root root 3272 Jan 21 00:31 harbor.key
subject=C=KR, O=LAB, OU=Harbor, CN=harbor.home.internal
issuer=C=KR, O=LAB, OU=CA, CN=LAB-ROOT-CA
X509v3 Subject Alternative Name:
DNS:harbor.home.internal, IP Address:192.168.56.60
출력에 DNS:harbor.home.internal / IP Address:192.168.56.60이 보이면 성공입니다.
dnf install -y wget tar
cd /opt
wget -O harbor-offline-installer-v2.10.1.tgz \
https://github.com/goharbor/harbor/releases/download/v2.10.1/harbor-offline-installer-v2.10.1.tgz
tar xzvf harbor-offline-installer-v2.10.1.tgz
cd harbor
ls
cp harbor.yml.tmpl harbor.yml
vi harbor.yml
hostname: harbor.home.internal
https:
port: 443
certificate: /data/cert/harbor.crt
private_key: /data/cert/harbor.key
harbor_admin_password: "Password!"
data_volume: /data
storage_service:
s3:
region: ap-northeast-2
bucket: harbor-backend-7f3a9c2d
accesskey: "${S3_ACCESS_KEY}"
secretkey: "${S3_SECRET_KEY}"
regionendpoint: "https://s3.ap-northeast-2.amazonaws.com"
secure: true
v4auth: true
encrypt: true
read -p "S3_ACCESS_KEY: " S3_ACCESS_KEY
echo
read -s -p "S3_SECRET_KEY: " S3_SECRET_KEY
echo
export S3_ACCESS_KEY S3_SECRET_KEY
시크릿 파일 생성(권한 600)
install -m 600 /dev/null /root/harbor-s3.env
vi /root/harbor-s3.env
/root/harbor-s3.env 내용(서버에만 존재)
S3_ACCESS_KEY=AKIA...
S3_SECRET_KEY=...
설치할 때만 로드
set -a
. /root/harbor-s3.env
set +a
./prepare
./install.sh