gitlab安装配置

1. 安装配置依赖项

如想使用Postfix来发送邮件,在安装期间请选择’Internet Site’. 您也可以用sendmai或者 配置SMTP服务 并 使用SMTP发送邮件.
在 Centos 6 系统上, 下面的命令将在系统防火墙里面开放HTTP和SSH端口.

sudo yum install curl openssh-server openssh-clients postfix cronie -y
sudo service postfix start
sudo chkconfig postfix on
sudo lokkit -s http -s ssh

2. 添加GitLab仓库,并安装到服务器上

curl -sS http://packages.gitlab.cc/install/gitlab-ce/script.rpm.sh | sudo bash
sudo yum install gitlab-ce
如果你不习惯使用命令管道的安装方式, 你可以在这里下载 安装脚本 或者 手动下载您使用的系统相应的安装包(RPM/Deb) 然后安装

wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-XXX.rpm
rpm -ivh gitlab-ce-XXX.rpm
说明:个人平时喜欢采用如上方式的rpm安装
centos (内核7.x)https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7
centos (内核6.x)https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6,选择需要的版本进行安装。
老版本用习惯了,用的是一种情怀,有些功能新版本不是很喜欢用,请根据自己个人喜好来安装。

3. 启动GitLab
sudo gitlab-ctl reconfigure

下边就可以访问了:


修改vim /etc/gitlab/gitlab.rb

posted on 2017-09-19 15:45  Floki  阅读(170)  评论(0编辑  收藏  举报