1. Git Server Setup
1. Environment deployment
System environment: Server side: CentOS 6.5, ip:192.168.56.1
Client: CentOS 6.5, ip:192.168.56.101
Software version: Server-side: source code compiled and installed, git-1.9.0.tar.gz
Client: Yum Online installation mechanism
2. Installation
2.1 Server side:
#Yum InstallCurl-devel expat-devel gettext-devel openssl-devel zlib-develPerl-devel#wgethttp//git-core.googlecode.com/files/git-1.9.0.tar.gz#TarZXVF git-1.9.0.Tar. GZ#CD git-1.9.0# Makeprefix=/usr/local/git all# MakePrefix=/usr/local/gitInstall#root用户运行
———————————————————
If you are prompted with errors at compile time:
LINK git-credential-storelibgit.a (UTF8.O): infunction' Reencode_string_iconv ':/OPT/GIT-MASTER/UTF8.C:530: Undefined reference to ' Libiconv ' Libgit.a (UTF8.O): infunction' 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:LDReturn1 Make: * * * [Git-credential-store] Error1
Workaround:
cd/usr/local/src/wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz Tar -zxvf libiconv-1.14. Tar . GZCD Libiconv-1.14. /configure--prefix=/usr/local/libiconv && make do Install
Then go back to Git and continue compiling:
cd/usr/local/src/git-1.9. 0 Make Configure. /configure--prefix=/usr/local/git--with-iconv=/usr/local/libiconv make make Install
View version number: Git--version
git version 1.7.1
Transferred from: http://www.centoscn.com/CentosServer/ftp/2014/0414/2789.html
Build a git server under CentOS 6.5