ubuntu部署gitlab-ce及数据迁移

ubuntu部署gitlab-ce及数据迁移 

进行前梳理: 在esxi7.0 Update 3 基础上使用 ubuntu22.04.5-server系统对 gitlab-ce 16.10进行部署,以及将gitlab-ee 16.9 数据进行迁移到gitlab-ce 16.10         

进行后总结: 起初安装了极狐17.8.3-jh 版本(不支持全局中文,就没用了)

                又安装了gitlab-ce 16.10.10,(和旧服务器版本不一致,备份不能恢复,又换)

                又安装了gitlab-ce 16.9.2,但和gitlab-ee 16.9.2有区别(ce和ee有区别,)。

                然后chatgpt表示gitlab严格检验版本。

ubuntu部署gitlab-ce及数据迁移_第1张图片                                                                

# 本文章编写的初衷是从gitlab-ee至gitlab-ce的数据迁移,如果涉及到数据迁移请保持版本一致,比如gitlab-ce 16.9.2对应 gitlab-ce 16.9.2 。

ubuntu服务器系统下载链接: 

https://mirrors.aliyun.com/ubuntu-releases/jammy/ubuntu-22.04.5-live-server-amd64.iso

gitlab-ce离线deb源       官方源: gitlab/gitlab-ce - Packages · packages.gitlab.com

https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/jammy/gitlab-ce_16.10.10-ce.0_amd64.deb/download.deb

一、系统版本与调优

调优教程源地址: Ubuntu Server 22.04 系统性能优化-CSDN博客

1.系统版本

root@qr:~# cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.5 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.5 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy                        #特别注意jammy

2.时区设置

root@qr:~# timedatectl set-timezone Asia/Shanghai

root@qr:~# date
Wed Feb 26 04:29:29 PM CST 2025

3.更新镜像源(国内)

#源更换

cp -rf /etc/apt/sources.list /etc/apt/sources.list.bak

vim /etc/apt/sources.list

deb http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse

#更新源

apt-get update

4.关闭防火墙ufw

sudo ufw disable # 停止并禁用自动启动

sudo ufw status # 查看防火墙状态,会输出结果:Status: inactive

5.设置 ulimit 的 open files

cp -rf /etc/security/limits.conf /etc/security/limits.conf.bak

echo '* soft noproc 65535'>>/etc/security/limits.conf
echo '* hard noproc 65535'>>/etc/security/limits.conf
echo '* soft nofile 409600'>>/etc/security/limits.conf
echo '* hard nofile 409600'>>/etc/security/limits.conf
# 注意:以下是root用户的配置,ubuntu 系统root用户必须显式指定配置
echo 'root soft noproc 65535'>>/etc/security/limits.conf
echo 'root hard noproc 65535'>>/etc/security/limits.conf
echo 'root soft nofile 409600'>>/etc/security/limits.conf
echo 'root hard nofile 409600'>>/etc/security/limits.conf

然后,在下面的两文件中加入:D

你可能感兴趣的:(java,开发语言,gitlab,ubuntu)