Gitlab超简易安装部署实战

139 阅读2分钟

开启掘金成长之旅!这是我参与「掘金日新计划 · 2 月更文挑战」的第 14 天,点击查看活动详情

GitLab是利用Ruby on Rails一个开源的版本管理系统,实现一个自托管的Git项目仓库,支持在内网服务器搭建配置。可通过Web界面进行访问公开的或者私人项目。与Github类似,GitLab能够浏览源代码,管理缺陷和注释。可以管理团队对仓库的访问,它非常易于浏览提交过的版本并提供一个文件历史库。团队成员可以利用内置的简单聊天程序(Wall)进行交流。它还提供一个代码片段收集功能可以轻松实现代码复用,便于日后有需要的时候进行查找。 首先检查实验用虚拟机配置环境:

root@docker-server1:~# lsb_release -a                       #检查ubuntu版本信息        
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy
root@docker-server1:~# cat /etc/issue                       
Ubuntu 22.04.1 LTS \n \l
root@docker-server1:~# uname -r                            #检查内核版本
5.15.0-50-generic
root@docker-server1:~# free -m                             #检查内存信息,Gil顺利运行需要留足2GB以上内存空间
               total        used        free      shared  buff/cache   available
Mem:            3889        2874         439           1         575         652
Swap:              0           0           0

使用xftp上传软件包至当前目录,检查gitlab软件包内容,安装软件包:

root@docker-server1:~# dpkg -c gitlab-ce_15.4.3-ce.0_amd64.deb      #检查软件包内容
root@docker-server1:~# dpkg -i gitlab-ce_15.4.3-ce.0_amd64.deb      #安装软件包组件
Selecting previously unselected package gitlab-ce.
(Reading database ... 109390 files and directories currently installed.)
Preparing to unpack gitlab-ce_15.4.3-ce.0_amd64.deb ...
Unpacking gitlab-ce (15.4.3-ce.0) ...
Setting up gitlab-ce (15.4.3-ce.0) ...
It looks like GitLab has not been configured yet; skipping the upgrade script.
. . * *  .   *    *    *  * 
,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, *** ,,,,,,,,,.,,,,,,,,,,,,,.,,, ,,,,
,*,.
 _  __ __ __ / ____(_) /_/ / ____ /  / 
/ / /  /  /  /  / __ ` / __ /  //  /  /  //  //  //  /  //  / _ // _ /___ / _, / . /
Thank you for installing GitLab!
GitLab was unable to detect a valid hostname for your instance.
Please configure a URL for your GitLab instance by setting external_url
configuration in /etc/gitlab/gitlab.rb file.
Then, you can start your GitLab instance by running the following command:
sudo gitlab-ctl reconfigure
For a comprehensive list of configuration options please see the Omnibus GitLab readme
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md
Help us improve the installation experience, let us know how we did with a 1 minute survey:
https://gitlab.fra1.qualtrics.com/jfe/form/SV_6kVqZANThUQ1bZb?installation=omnibus&release=15-4

安装成功以后,出现GITLAB的logou画面: c6dda169960dfb861f90b9cb295b0a78_cbeede44-5e37-4cb1-af86-fabc79913076.png