安装gitlab
2018-09-11 本文已影响11人
Miracle001
gitlab
下载:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/
rz 上传gitlab-ce-11.2.3-ce.0.el7.x86_64.rpm
yum -y install gitlab-ce-11.2.3-ce.0.el7.x86_64.rpm
gitlab-ctl reconfigure

gitlab-ctl status

ss -ntl 80/8080端口
浏览器:192.168.25.101
设置密码

输入root和刚才设置的密码

修改默认端口
vim /etc/gitlab/gitlab.rb
80端口换成8081端口
搜索nginx

vim /var/opt/gitlab/nginx/conf/gitlab-http.conf
80换成8081端口

vim /etc/gitlab/gitlab.rb
8080端口换成8083端口
搜索unicorn

vim /var/opt/gitlab/gitlab-rails/etc/unicorn.rb
端口8083

gitlab-ctl reconfigure
vim /var/opt/gitlab/nginx/conf/gitlab-http.conf
看一下8081端口是否又变为80
如果变了,就换成8081端口,然后执行命令
gitlab-ctl restart
vim /var/opt/gitlab/nginx/conf/gitlab-http.conf
此时端口8081不会再变化,就执行此命令
gitlab-ctl status
输入地址192.168.x.x:8081
设置密码
登陆root
ok
sourcetree连接gitlab(内网)
http://gitlab.example.com/bajin/RedChat.git
gitlab.example.com变为192.168.10.88即可
