gitlab ubuntu 安装
https://www.jianshu.com/p/2eef885b4aed
1.安装依赖包
sudo apt-get update
sudo apt-get install -y curl openssh-server ca-certificates
2. 邮件配置
选择Internet那一项,不带Smarthost的
sudo apt-get install -y postfix
3. 添加镜像
免费版
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
企业版
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh | sudo bash
4. 安装
sudo apt-get update
sudo apt-get install gitlab-ce
或者 sudo apt-get install gitlab-ee
5. 配置访问路径
sudo -e /etc/gitlab/gitlab.rb
修改下图中的路径
![](http://upload-images.jianshu.io/upload_images/3878590-d3327045a676def4.png?imageMogr2/auto-orient/strip|imageView2/2/w/727/format/webp)
TIM图片20190212135449.png
6. 更新配置
sudo gitlab-ctl reconfigure
7. 重新启动gitlab
sudo gitlab-ctl restart
结果如下图
![](http://upload-images.jianshu.io/upload_images/3878590-816e0b7382551780.png?imageMogr2/auto-orient/strip|imageView2/2/w/443/format/webp)
TIM图片20190212135903.png
8. 打开 sshd 和 postfix 服务
service sshd start
service postfix start
9. 查看gitlab服务器状态
sudo gitlab-ctl status
10. 结果
在浏览器中访问http://127.0.0.1
![](http://upload-images.jianshu.io/upload_images/3878590-95f2d156e47bdd5f.png?imageMogr2/auto-orient/strip|imageView2/2/w/740/format/webp)
TIM图片20190212140211.png
![](https://img2020.cnblogs.com/blog/1154656/202004/1154656-20200411151902935-8644569.png)
![](https://img2020.cnblogs.com/blog/1154656/202004/1154656-20200414085848099-1991940138.jpg)
作者:涂山小狐妖
链接:https://www.jianshu.com/p/2eef885b4aed
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
链接:https://www.jianshu.com/p/2eef885b4aed
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。