本文只用于自己记录安装过程,方便日后自己使用
一. 安装
安装参考:
https://blog.csdn.net/qq_43279457/article/details/126295413
注: 安装过程中参考有错误的地方
第四点:设置Ubuntu网络中是
127.0.0.1 mygitlab.com
汉化参考:
https://zhuanlan.zhihu.com/p/340093022
需要汉化就要下载对应的gitlab版本。包括原先的英语版本和汉化需要对应起来。
二. 卸载gitlab
参考链接
https://blog.csdn.net/YiLiuF/article/details/104580979/
三. 我的安装步骤
1. 安装和配置依赖
sudo apt-get update
sudo apt-get install -y curl openssh-server ca-certificates tzdata
sudo apt-get install -y postfix
systemctl enable postfix
2. 安装软件包
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
sudo apt-get install gitlab-ce
如果安装不成功就参考https://zhuanlan.zhihu.com/p/340093022 中下载安装包进行安装。
3. 配置和使用
修改域名和端口
sudo vim /etc/gitlab/gitlab.rb
gitlab.rb 文件中修改成
4. 初始化gitlab
sudo gitlab-ctl reconfigure
敲完命令后会一直刷屏,你需要等一会儿时间
5. 配置Ubuntu网络
sudo vim /etc/hosts
添加设置成如下内容
127.0.0.1 mygitlab.com
添加完成后重启ubuntu
6.配置winuows hosts
查看ubuntu ip
编辑Windows的C:\Windows\System32\drivers\etc\hosts文件
增加
192.168.126.128 mygitlab.com
7.通过网页访问
网页访问 http://mygitlab.com:8088/
默认用户名:root
默认密码:*********
默认密码存储位置
sudo vim /etc/gitlab/initial_root_password