官方上面说并不推荐在CentOS上面安装GitLab,无奈公司的服务器都是CentOS的系统。不过,好在经历了三天才算把GitLab搭建起来,查了N多参考教程,发现一个问题,并不是每个教程都是通用的、总会遇到某些未知的错误是其他作者没有碰到的,毕竟每台服务器的环境是不一样的,问题百出,很是让人很是头痛。
下面总结了自己在CentOS搭建GitLab的教程以及某些错误的解决办法,算是对自己的总结吧!或许那天就用到了......
——安装前准备工作
1)添加epel源
[root@Git ~]# mkdir /tmp/soft/
[root@Git ~]# cd /tmp/soft/
[root@Git soft]# wget Fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
[root@Git soft]# rpm -ivh epel-release-6-8.noarch.rpm
warning: epel-release-6-8.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing... ########################################### [100%]
1:epel-release ########################################### [100%]
2)配置epel源
[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
#download.fedoraproject.org域名已经失效
#去掉#号将download.fedoraproject.org变更为dl.fedoraproject.org
baseurl=http://dl.fedoraproject.org/pub/epel/6/$basearch
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
3)执行yum makecache 更新
[root@Git soft]# yum makecache
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.ustc.edu.cn
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
base | 3.7 kB 00:00
base/group_gz | 220 kB 00:00
base/filelists_db | 5.9 MB 00:03
base/other_db | 2.8 MB 00:01
epel | 4.4 kB 00:00
epel/group_gz | 237 kB 00:05
epel/filelists_db | 8.4 MB 05:56
epel/primary_db | 6.1 MB 03:36
epel/other_db | 3.6 MB 01:22
epel/updateinfo | 780 kB 00:11
extras | 3.4 kB 00:00
extras/filelists_db | 11 kB 00:00
extras/prestodelta | 907 B 00:00
extras/other_db | 5.8 kB 00:00
mariadb | 1.9 kB 00:00
mariadb/filelists_db | 47 kB 00:01
mariadb/primary_db | 15 kB 00:00
mariadb/other_db | 1.2 kB 00:00
updates | 3.4 kB 00:00
updates/filelists_db | 1.7 MB 00:01
updates/prestodelta | 249 kB 00:00
updates/primary_db | 2.6 MB 00:02
updates/other_db | 21 MB 00:15
epel/pkgtags | 1.0 MB 00:36
Metadata Cache Created