安裝依賴:
yum -y install curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-devel
wget
解壓安裝:
tar -zxvf git-2.9.0.tar.gzcd 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
返回git在此編譯安裝
cd ../git-2.9.0make
clean
./configure --prefix=/usr/local --with-iconv=/usr/local/libiconv/
make
install
檢視安裝是否正確及安裝的版本:
# git --versiongit version
2.9.0
此時說明git已經安裝成功
更新源,參考:
vi /etc/yum.repos.d/gitlab-ce.repo
新增如下內容
執行
sudoyummakecache
sudo
yuminstall gitlab-ce
安裝成功後修改配置檔案,修改訪問url等
external_url "http://你的ip/gitlab
"
修改後執行
sudo gitlab-ctl reconfiguresudo gitlab-ctl restart
參考:最後通過:http://你的ip/gitlab,看能否正常執行。初次執行時需要重置root使用者密碼。
CentOS7下搭建Git伺服器
如果有安裝git 移除命令 yum remove git 安裝依賴庫 1 yum install curl devel expat devel gettext devel openssl devel zlib devel 2 yum install gcc perl extutils makemak...
Git 遠端服務搭建 CentOS7
root localhost yum install curl devel expat devel gettext devel openssl devel zlib devel perl devel root localhost yum install git 建立乙個 git 使用者組和使用者,用...
CentOS7下PHP環境搭建
1 安裝 2 修改配置檔案,開放訪問 安裝成功後,預設情況下,是禁止外部ip訪問的,需要進行設定 找到 allowoverride none require all denied 修改為 allowoverride none require all granted 3 開放80埠 firewall ...