GitLab 17.x 在 Ubuntu 24.04 上安装配置

1. 环境准备

2. GitLab 安装

参考:https://about.gitlab.com/install/#ubuntu

安装和配置必要的依赖项:

$ sudo apt-get update
$ sudo apt-get install -y curl openssh-server ca-certificates tzdata perl

接下来,您需要添加GitLab软件包存储库。有一种简单的方法可以执行此操作,即通过运行以下命令:

//配置 repo

$ curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash

[info]尽管在这种情况下它是无害的,但是警惕直接从Internet运行shell脚本。

现在,您将要设置 GitLab 对外提供服务的 URL 地址或 IP ,如果使用 https 方式,GitLab 将自动使用Let's Encrypt 请求一个证书,这需要一个有效的外部域名。

// 安装指定版本
#$ EXTERNAL_URL="http://gitlabtest.xiodi.cn" apt-get install gitlab-ce=17.2.2-ce.0
// 锁定版本以限制自动更新:
#$ sudo apt-mark hold gitlab-ce
// 显示保留的包:
#$ sudo apt-mark showhold

$ EXTERNAL_URL="http://gitlabtest.xiodi.cn" apt-get install gitlab-ce

安装完成后,可以查看一下后面的输出日志,会告诉你,默认用户密码:

$ cat /etc/gitlab/initial_root_password
...
Password: 7jw56aJyF78ePVPVmN71m/3nPgP4Q3un1+XEnxhRrDE=
...

您可用使用 EXTERNAL_URL 地址访问 GitLab 并继续进行配置,默认用户名为 root ,请注意,它不是操作系统的 root。

注意:当第一次访问的时候,尽量不要开启 vpn 代理,有可能会根据当前所处地区,初始化语言,造成没有切换为中文语言选项,待考证是否这个原因,目前遇到过一次。

3. 离线安装

下载地址:https://packages.gitlab.com/gitlab/gitlab-ce

$ wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/noble/gitlab-ce_17.2.2-ce.0_amd64.deb/download.deb
$ EXTERNAL_URL="http://gitlabtest.xiodi.cn" dpkg -i gitlab-ce_17.2.2-ce.0_amd64.deb
### Ubuntu 24.04 Installation Guide #### Preparation Before Installation Before starting the installation of Ubuntu 24.04, ensure that all necessary hardware is compatible with this version of Ubuntu and prepare an installation medium such as a USB drive or DVD containing the latest ISO image file of Ubuntu 24.04. #### System Requirements To install Ubuntu 24.04 smoothly, it's recommended to have at least the following system specifications: - Processor: 2 GHz dual-core processor or better. - Memory (RAM): At least 4 GB, but more memory will provide better performance especially for graphical applications and development environments. - Hard Drive Space: Minimum 25 GB free space; however, considering additional software installations, having much larger storage like described in one case study where there was up to 18T available would be beneficial[^1]. #### Creating Bootable Media Use tools like Rufus on Windows or Startup Disk Creator on another Linux machine to create bootable media from the downloaded ISO file. #### BIOS/UEFI Settings Adjustment Adjusting settings within your computer’s BIOS/UEFI might be required before proceeding with the installation process. This includes setting the correct date/time, enabling UEFI mode over legacy BIOS support when applicable, ensuring Secure Boot is either disabled or set appropriately depending upon whether you plan to use secure boot features during OS operation, adjusting boot order so that external devices are prioritized higher than internal drives allowing selection of the live session directly after powering on without needing manual intervention each time. #### Starting Live Session And Installing The Operating System Boot into the live environment provided by the created bootable disk. Choose "Try Ubuntu" first if unsure about committing changes immediately until satisfied everything works correctly under trial conditions. Once ready, select “Install Ubuntu. Follow prompts through language preferences, keyboard layout configuration, updates/download third-party drivers options while installing, partition setup including choosing between guided full-disk usage or custom layouts based on personal needs/preferences, then finally confirm actions which begin copying files onto target partitions preparing them accordingly for initial startup post-installation completion. #### Post-Installation Configuration After finishing the base operating system deployment, further configurations may include updating package lists using `sudo apt update`, upgrading installed packages via `sudo apt upgrade`. For specific setups requiring particular services running automatically upon reboots, commands similar to those used for configuring service management could apply, e.g., enabling GitLab CE to start at boot time can involve executing `sudo systemctl enable gitlab-runsvdir.service`[^2]. Additionally, users looking to modify display languages' priorities or configure sudo permissions should refer to relevant sections addressing these topics specifically[^3]. --related questions-- 1. What steps need attention regarding compatibility checks prior to attempting any new major release installation? 2. How does changing certain parameters inside BIOS affect my ability to successfully complete an Ubuntu installation? 3. Can I perform tasks simultaneously alongside trying out Ubuntu from a live CD/DVD/USB stick? 4. Why choose between different types of boot modes offered within modern computers’ firmware interfaces? 5. In what scenarios would someone opt for advanced partition schemes rather than letting the installer handle everything automatically?
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

运维阿峰

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值