centos6.8下搭建git和gitlab版本库

安装依赖:

yum -y install curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-devel
git安装
  下载git安装包:

wget https://www.kernel.org/pub/software/scm/git/git-2.9.0.tar.gz
  解压安装:

tar -zxvf git-2.9.0.tar.gz
cd git-2.9.0
make prefix=/usr/local all
  编译时出现如下异常:

libgit.a(utf8.o): In function `reencode_string_iconv‘:
/root/git-2.9.0/utf8.c:463: undefined reference to `libiconv‘
libgit.a(utf8.o): In function `reencode_string_len‘:
/root/git-2.9.0/utf8.c:502: undefined reference to `libiconv_open‘
/root/git-2.9.0/utf8.c:521: undefined reference to `libiconv_close‘
/root/git-2.9.0/utf8.c:515: undefined reference to `libiconv_open‘
collect2: ld 返回 1
make: *** [git-credential-store] 错误 1
  下载并安装libiconv

cd ..
wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
tar -zxvf libiconv-1.14.tar.gz
cd libiconv-1.14
./configure --prefix=/usr/local/libiconv && make && make install
  返回git再次编译安装

cd ../git-2.9.0
make prefix=/usr/local/git all
# make prefix=/usr/local/git install
# echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
# source /etc/bashrc
  查看安装是否正确及安装的版本

# git --version
git version 2.9.0

 

      安装gitlab

vi /etc/yum.repos.d/gitlab-ce.repo
添加如下内容
[gitlab-ce]
name=gitlab-ce
baseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6
repo_gpgcheck=0
gpgcheck=0
enabled=1
gpgkey=https://packages.gitlab.com/gpg.key

执行
yum makecache
yum install gitlab-ce

安装成功后修改配置文件,修改访问url等

 编辑/etc/gitlab/gitlab.rb,将其修改为你的ip和url如:

external_url "http://你的ip/gitlab"
修改后运行
gitlab-ctl reconfigure
 gitlab-ctl restart
最后通过:http://你的ip/gitlab,看能否正常运行。初次运行时需要重置root用户密码。

 

转载于:https://www.cnblogs.com/zuikeol/p/6856526.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值