gitlab-ce安装-使用国内源

来源:https://blog.csdn.net/qwlovedzm/article/details/80312302

GitLab是一个利用 Ruby on Rails 开发的开源应用程序,实现一个自托管的Git项目仓库,可通过Web界面进行访问公开的或者私人项目。
        GitLab拥有与Github类似的功能,能够浏览源代码,管理缺陷和注释。可以管理团队对仓库的访问,它非常易于浏览提交过的版本并提供一个文件历史库。它还提供一个代码片段收集功能可以轻松实现代码复用,便于日后有需要的时候进行查找。
       1.基础环境准备

[[email protected] ~]# yum install curl policycoreutils openssh-server openssh-clients postfix
[[email protected] ~]# systemctl start postfix

    2.安装gitlab-ce

curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
[[email protected] ~]# yum install -y gitlab-ce

 


注:由于网络问题,国内用户,建议使用清华大学的镜像源进行安装:

 

[[email protected] ~]# vim /etc/yum.repos.d/gitlab-ce.repo
#在编辑器中输入如下内容保存
[gitlab-ce]
name=gitlab-ce
baseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7
repo_gpgcheck=0
gpgcheck=0
enabled=1
gpgkey=https://packages.gitlab.com/gpg.key
[[email protected] ~]# yum makecache
[[email protected] ~]# yum install gitlab-ce

3.配置并启动gitlab-ce

[[email protected] ~]# gitlab-ctl reconfigure

可以使用gitlab-ctl管理gitlab,例如查看gitlab状态:

[[email protected] ~]# gitlab-ctl status
run: gitlab-workhorse: (pid 12171) 231s; run: log: (pid 7817) 555s
run: logrotate: (pid 12175) 230s; run: log: (pid 7832) 548s
run: nginx: (pid 12181) 230s; run: log: (pid 7823) 549s
run: postgresql: (pid 12186) 229s; run: log: (pid 7683) 587s
run: redis: (pid 12194) 229s; run: log: (pid 7600) 592s
run: sidekiq: (pid 12198) 229s; run: log: (pid 7806) 558s
run: unicorn: (pid 14967) 6s; run: log: (pid 7774) 560s
关闭gitlab:[[email protected] ~]# gitlab-ctl stop
启动gitlab:[[email protected] ~]# gitlab-ctl start
重启gitlab:[[email protected] ~]# gitlab-ctl restart

登录gitlab
      第一次登录gitlab,需要为root用户修改密码,root用户也是gitlab的超级管理员。
 

gitlab-ce安装-使用国内源



管理gitlab
    使用root用户和刚才创建的密码登录后,你就可以探索gitlab的奥秘了,可以点击图中红框的按钮进入管理区域。
 

gitlab-ce安装-使用国内源

 

转自:https://www.unixhot.com/article/48