Gitlab 安装

 

选择系统版本:

https://about.gitlab.com/downloads/#centos6

 

1、安装配置依赖

sudo yum install curl openssh-server openssh-clients postfix cronie

sudo service postfix start

sudo chkconfig postfix on

sudo lokkit -s http -s ssh

2、加安装包到安装的server

curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bashsudo yum install gitlab-ce

自己之定义版本:

curl -LJO https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/6/gitlab-ce-XXX.rpm/downloadrpm -i gitlab-ce-XXX.rpm

3、配置

sudo gitlab-ctl reconfigure

4、浏览登录

 

On your first visit, you’ll be redirected to a password reset screen to provide the password for the initial administrator account. Enter your desired password and you’ll be redirected back to the login screen.

The default account’s username is root. Provide the password you created earlier and login. After login you can change the username if you wish

 

配置,重启:

 

主机IP更换后需要修改:

vi /var/opt/gitlab/gitlab-rails/etc/gitlab.yml

HOST  XXX

 

修改后重启gitlab,命令如下:

 

gitlab-ctl restart

sleep 3

gitlab-ctl restart nginx

sleep 1

gitlab-ctl status

发表评论