Ubuntu 私有化部署GitLab

从清华源下载gitlab 安装包

https://mirrors.tuna.tsinghua.edu.cn/gitlab-ee/ubuntu/pool/bionic/main/g/gitlab-ee/

wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ee/ubuntu/pool/bionic/main/g/gitlab-ee/gitlab-ee_15.2.2-ee.0_amd64.deb

安装gitlab

sudo dpkg -i gitlab-ee_15.2.2-ee.0_amd64.deb

根据提示配置


sudo vim /etc/gitlab/gitlab.rb
# 修改内容
# 1.启动访问地址 external_url 'http://192.168.1.200:82'
# 2.nginx 监听的端口:  nginx['listen_port'] = 82

sudo gitlab-ctl reconfigure

密码记录地址 ,密码只保留24小时,需要及时修改

使用http://192.168.1.200:82 进入即可

使用 root 和默认生成的密码进入系统再修改密码即可

查看git 运行状态

gitlab-ctl status

开机自启配置

#禁止 Gitlab 开机自启动
systemctl disable gitlab-runsvdir.service

#启用 Gitlab 开机自启动
enable gitlab-runsvdir.service

另:参考地址:https://cloud.tencent.com/developer/article/1935402

posted on 2022-08-13 00:22  卍兲卐  阅读(206)  评论(0编辑  收藏  举报

导航