1、安装
此处为centos7中安装gitlab,其他系统此处不做讲述,官网对各种系统安装gitlab基本都有讲解,具体见
https://about.gitlab.com/install/#centos-7?version=ce
gitlab主要分为企业版和社区版,即ee和ce,两者安装方式区别不大,本文以ce版进行安装
废话不多说,开始:
sudo yum install -y curl policycoreutils-python openssh-server openssh-clients
sudo systemctl enable sshd
sudo systemctl start sshd
sudo firewall-cmd --permanent --add-service=http
sudo systemctl reload firewalld
#安装postfix,用于发邮件
sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
sudo EXTERNAL_URL="https://gitlab.example.com" yum install -y gitlab-ce
执行完上述操作后需要对gitlab.rb进行修改,vim /etc/gitlab/gitlab.rb
external_url 'http://193.168.72.129:8081'
此处为指定gitlab的登录地址
重新编译
gitlab-ctl reconfigure
启动
gitlab-ctl start
gitlab初始默认以root登录,首次登录需要设置密码
登录后首页

2、创建project


3、创建用户

创建成功后通过右侧的按钮可以进行密码设置


4、创建ssh秘钥

会生成id_rsa和id_rsa.pub两个文件

5、添加sshkey


网友评论