标签:克隆 xtu ble x64 dem bash 目录修改 active passwd
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
yum install gcc perl-ExtUtils-MakeMaker
一次选择Yes
cd /usr/local/src
/usr/local/src
文件夹里wget https://www.kernel.org/pub/software/scm/git/git-2.10.0.tar.gz
3.解压和编译
tar -zvxf git-2.10.0.tar.gz
cd git-2.10.0
make all prefix=/usr/local/git
make install prefix=/usr/local/git
4.将 git 目录加入 PATH
echo ‘export PATH=$PATH:/usr/local/git/bin‘ >> /etc/bashrc
source /etc/bashrc
git --version
安装成功
5.创建 git 账号
useradd -m gituser
passwd gituser
6.
mkdir -p /data/repositories
cd /data/repositories/ && git init --bare test.git
7.配置用户权限
chown -R gituser:gituser /data/repositories
chmod 755 /data/repositories
gituser
的登录 shell 配置改为 git-shell 的目录
如下gituser:x:500:500::/home/gituser:/usr/local/git/bin/git-shell
8.使用搭建好的 Git 服务
cd ~ && git clone gituser@139.199.166.111:/data/reposito
标签:克隆 xtu ble x64 dem bash 目录修改 active passwd
原文地址:http://www.cnblogs.com/liaohongbin/p/7680215.html