1.1
1、GitLab是什么?
1. GitLab实现一个自托管的Git项目仓库,可通过Web界面进行访问公开的或者私人项目。
2. GitLab拥有与Github类似的功能,能够浏览源代码,管理缺陷和注释。
3. 可以管理团队对仓库的访问,它非常易于浏览提交过的版本并提供一个文件历史库。
4. 它还提供一个代码片段收集功能可以轻松实现代码复用,便于日后有需要的时候进行查找
2、gitlab安装
'''1. 初始化环境 '''
[root@linux-node2 ~]# yum install curl policycoreutils openssh-server openssh-clients postfix
[root@linux-node2 ~]# systemctl start postfix
'''2. 由于网络问题,国内用户,建议使用清华大学的镜像源进行安装'''
[root@linux-node2 ~]# 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
'''
[root@linux-node2 ~]# curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
[root@linux-node2 ~]# yum makecache
[root@linux-node2 ~]# yum install -y gitlab-ce-10.8.7
'''3.配置并启动gitlab-ce'''
[root@linux-node2 ~]# gitlab-ctl reconfigure # 把一些过去的config还原,使用是要小心
[root@linux-node2 ~]# gitlab-ctl status
[root@linux-node2 ~]# gitlab-ctl start # 启动gitlab
[root@linux-node2 ~]# gitlab-ctl stop # 关闭gitlab
[root@linux-node2 ~]# gitlab-ctl restart # 重启gitlab
# 注:安装启动gitlab后访问, http://192.168.56.12/
知识兔'''4.在浏览器中访问gitlab-ce'''
1. 安装启动gitlab后访问, http://192.168.56.12/
2. 第一次登录gitlab,需要为root用户修改密码,root用户也是gitlab的超级管理员