Centos7 64 gitlab安装 非常简单
1.设置清华镜像
新建
/etc/yum.repos.d/gitlab-ce.repo
这里需要创建gitlab-ce.repo文件用vi命令来创建
vi gitlab-ce.repo
内容复制后,
内容为
[gitlab-ce]
name=gitlab-ce
baseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7
repo_gpgcheck=0
gpgcheck=0
enabled=1
gpgkey=https://packages.gitlab.com/gpg.key
用vi退出命令
:x
保存并退出
再执行
sudo yum makecache
sudo yum install gitlab-ce
由于Linux本身的源速度太慢,这里更新为国内的源,有很多的选择有网易的,开源中国,等等
更新阿里云 Centos 7 源 ,更新源前需要备份一下之前的源 精简版的Centos 没有安装wget先用yum安装wget
cd /etc/yum.repos.d
mv CentOS-Base.repo CentOS-Base.repo.backup
yum makecache
//安装wget
yum install -y wget
//安装解压工具包
yum install -y unzip
wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
安装必须的软件包
yum -y install libicu-devel patch gcc-c++ readline-devel zlib-devel libffi-devel openssl-devel make autoconf automake libtool bison libxml2-devel libxslt-devel libyaml-devel zlib-devel openssl-devel cpio expat-devel gettext-devel curl-devel perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker
在Centos 6和7上, 下面的命令也会配置系统防火墙,把HTTP和SSH端口开放.
sudo yum install curl openssh-server
sudo systemctl enable sshd
sudo systemctl start sshd
sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix
sudo firewall-cmd --permanent --add-service=http
sudo systemctl reload firewalld
添加并安装GitLab软件包
//curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
sudo yum install gitlab-ce
配置并启动GitLab
sudo gitlab-ctl reconfigure
gitlab错误处理
502
Whoops, GitLab is taking too much time to respond.
Try refreshing the page, or going back and attempting the action again.
Please contact your GitLab administrator if this problem persists.
查看gitlab的控制台信息:指令
gitlab-ctl tail
查看postgressql数据库是否运行
ps aux | grep postgres