前一篇文章我们已经知道Git人人都是中心,那他们怎么交互数据呢?
• 使用GitHub或者码云等公共代码仓库
• 使用GitLab私有仓库
目录
一、安装配置gitlab
安装
安装依赖,并启动ssh、防火墙开启相应端口、postfix
yum install -y curl policycoreutils-python openssh-server perl
gitlab版本选择地 Index of /gitlab-ce/yum/el7/ | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror 选择对应的版本安装动
yum -y install https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-16.0.3-ce.0.el7.x86_64.rpm
安装完成后他会自动启动
初始化
vim /etc/gitlab/gitlab.rb
#找到下行并修改自己的ip
external_url 'http://10.12.153.72'
执行下面的初始化命令
gitlab-ctl reconfigure
这里初始化完成以后需要记住一个初始密码
cat /etc/gitlab/initial_root_password
查看状态
gitlab-ctl status
二、使用浏览器访问,进行web界面操作
输入账号密码登录