首页 > 系统服务 > 详细

linux安装git服务器

时间:2014-11-02 22:09:28      阅读:380      评论:0      收藏:0      [点我收藏+]

http://www.centoscn.com/CentosServer/ftp/2014/0414/2789.html

http://www.111cn.net/sys/CentOS/55849.htm

 

wget https://www.kernel.org/pub/software/scm/git/git-1.9.0.tar.gz tar


yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-devel
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-devel

 

#yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-devel
#wget http://git-core.googlecode.com/files/git-1.9.0.tar.gz
#tar zxvf git-1.9.0.tar.gz
#cd git-1.9.0
#make prefix=/usr/local/git all
#make prefix=/usr/local/git install #root用户运行

如果编译时提示错误:
LINK git-credential-store
libgit.a(utf8.o): In function `reencode_string_iconv’:
/opt/git-master/utf8.c:530: undefined reference to `libiconv’
libgit.a(utf8.o): In function `reencode_string_len’:
/opt/git-master/utf8.c:569: undefined reference to `libiconv_open’
/opt/git-master/utf8.c:588: undefined reference to `libiconv_close’
/opt/git-master/utf8.c:582: undefined reference to `libiconv_open’
collect2: ld 返回 1
make: *** [git-credential-store] 错误 1


cd /usr/local/src/
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


cd /usr/local/src/git-1.9.0
./configure --prefix=/usr/local/git --with-iconv=/usr/local/libiconv
make
make install


/usr/local/git/bin/git --version
git version 1.9.0

 

vi /etc/profile

在最后添加export PATH=$PATH:/usr/local/git/bin
source /etc/profile


git --version
git version 1.9.0

 

linux安装git服务器

原文:http://www.cnblogs.com/gxldan/p/4069956.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!