1.下载GitLab包
国内镜像:http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum -- 推荐
官网:http://about.gitlab.com -- 速度慢
2. 安装GitLab
# 安装依赖包
sudo yum install -y curl policycoreutils-python openssh-server
详细可参考官方文档:https://about.gitlab.com/install/#centos-7
# 把GitLab包拷到Linux上安装
[root@localhost git_data]# rpm -ivh gitlab-ce-10.2.2-ce.0.el7.x86_64.rpm
3.修改文件/etc/gitlab/gitlab.rb
# 把 'http://gitlab.example.com' 改为服务器ip地址或者域名
[root@localhost ~]# vim /etc/gitlab/gitlab.rb
external_url 'http://172.16.1.10'
# 启动GitLab实例
[root@localhost ~]# gitlab-ctl reconfigure
4. 查看GitLab状态
# 查看服务是否在run状态
[root@localhost ~]# gitlab-ctl status
run: gitaly: (pid 27803) 117s; run: log: (pid 27346) 177s
run: gitlab-monitor: (pid 27828) 116s; run: log: (pid 27570) 149s
run: gitlab-workhorse: (pid 27791) 117s; run: log: (pid 27176) 190s
run: logrotate: (pid 27282) 183s; run: log: (pid 27281) 183s
run: nginx: (pid 27231) 189s; run: log: (pid 27230) 189s
run: node-exporter: (pid 27518) 155s; run: log: (pid 27517) 155s
run: postgres-exporter: (pid 27854) 114s; run: log: (pid 27730) 131s
run: postgresql: (pid 26796) 229s; run: log: (pid 26795) 229s
run: prometheus: (pid 27837) 115s; run: log: (pid 27670) 137s
run: redis: (pid 26671) 235s; run: log: (pid 26670) 235s
run: redis-exporter: (pid 27618) 143s; run: log: (pid 27617) 143s
run: sidekiq: (pid 27117) 197s; run: log: (pid 27116) 197s
run: unicorn: (pid 27048) 203s; run: log: (pid 27047) 203s
5.浏览
步骤一:设置密码
步骤二:登录(用户为root)
网友评论