git环境搭建

服务器端:

Git安装:

# rpm -qa | grep zlib-devel 

如果没有安装,我们先要安装这些依赖包

# yum -y install zlib-devel openssl-devel perl cpio expat-devel gettext-devel 
# yum install curl-devel
# yum install autoconf

下载git安装包:https://www.kernel.org/pub/software/scm/git/

将安装包复制到/opt/git/gitinstall下面,并解压

# cd /opt/git/gitinstall/git-2.5.0

# autoconf 
# ./configure --with-curl=/opt/git 

# make 
# make install

git –version

gitlab安装:

#sudo yum install openssh-server

#sudo yum install postfix

#sudo service postfix start

#sudo chkconfig postfix on

#sudo rpm -i gitlab-7.2.1_omnibus-1.el6.x86_64.rpm

#sudo -e /etc/gitlab/gitlab.rb 添加主机域名

#sudo gitlab-ctl reconfigure

#sudo lokkit -s http -s ssh

Username: root

Password: 5iveL!fe 默认密码

客户端:

Linux系统: yum install git

客户端的/etc/hosts文件中加入服务器的IP地址和域名

原文地址:https://www.cnblogs.com/gaohong/p/4800490.html