centos下部署harbor

该文详细介绍了在CentOS系统中如何进行环境准备,包括开启内核转发、删除防火墙规则,然后逐步安装Docker和DockerCompose,配置Docker镜像加速器。接着,文章详述了Harbor私有仓库的部署过程,包括解压安装文件、修改配置、启动安装脚本等步骤,最终实现Harbor的正常运行。
摘要由CSDN通过智能技术生成

目录

一.环境准备:

二.安装docker

三.安装docker compose

四.部署harbor


一.环境准备:

1.打开内核转发功能,编辑/etc/sysctl.conf添加以下内容:

net.ipv4.ip_forward=1

net.ipv4.conf.default.rp_filter=0

net.ipv4.conf.all.rp_filter=0

[root@achao ~]# vi /etc/sysctl.conf

# sysctl settings are defined through files in

# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.

#

# Vendors settings live in /usr/lib/sysctl.d/.

# To override a whole file, create a new file with the same in

# /etc/sysctl.d/ and put new settings there. To override

# only specific settings, add a file with a lexically later

# name in /etc/sysctl.d/ and put new settings there.

#

# For more information, see sysctl.conf(5) and sysctl.d(5).

net.ipv4.ip_forward=1

net.ipv4.conf.default.rp_filter=0

net.ipv4.conf.all.rp_filter=0

2.重新加载sysctl.conf

[root@achao ~]# sysctl -p

net.ipv4.ip_forward = 1

net.ipv4.conf.default.rp_filter = 0

net.ipv4.conf.all.rp_filter = 0

3.删除防火墙规则

[root@achao ~]# iptables -F

[root@achao ~]# iptables -X

[root@achao ~]# iptables -Z

[root@achao ~]# /usr/sbin/iptables-save 

# Generated by iptables-save v1.4.21 on Sun Feb 26 22:04:57 2023

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值