linux-radhat-gitlab服务搭建

1.安装gitlab的依赖项

sudo yum install -y curl policycoreutils-python openssh-server cronie

2.设置防火墙

sudo lokkit -s http -s ssh

3.启动postfix,并设置为开机启动 

sudo yum install postfix
sudo service postfix start
sudo chkconfig postfix on

4.添加gitlab库及安装包(gitlab-ce是社区版-免费、gitlab-ee是企业版-收费)

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

如果网速较慢也可以选择离线安装,下载gitlab的rpm包,地址:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6/

然后上传至服务器,我的上传到了、opt/software/目录下,然后我在opt目录下执行:

yum -y /opt/software/gitlab-ce-10.8.3-ce.0.el6.x86_64.rpm

5.自动配置gitlab

gitlab-ctl reconfigure

这个时间较长,成功以后,访问本机ip(gitlab默认占用80端口)

6.设置管理员密码

首次登陆需要修改管理员密码,值得注意的是修改的密码用户名为root而不是administrator

7.修改配置文件

扫描二维码关注公众号,回复: 1528628 查看本文章
vim /etc/gitlab/gitlab.rb

修改成服务器IP

更新配置并重启

gitlab-ctl reconfigure
gitlab-ctl restart

7.汉化





猜你喜欢

转载自www.cnblogs.com/syuf/p/9156114.html