标签:useradd user ati pen col lease open etc git
[root@zabbix ~]# cat /etc/redhat-release CentOS Linux release 7.3.1611 (Core) [root@zabbix ~]# uname -r 3.10.0-514.el7.x86_64
[root@zabbix ~]# rpm -qa git
git-1.8.3.1-13.el7.x86_64
[root@zabbix ~]# yum remove git
[root@zabbix ~]# yum install gcc gcc-c++ -y
[root@zabbix ~]# yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-ExtUtils-MakeMaker -y
[root@zabbix ~]# mkdir -p /server/tools
[root@zabbix ~]# cd /server/tools/
[root@zabbix tools]# wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.9.0.tar.gz
[root@zabbix tools]# tar xf git-2.9.0.tar.gz
[root@zabbix tools]# cd git-2.9.0
[root@zabbix git-2.9.0]# make prefix=/application/git
[root@zabbix git-2.9.0]# make prefix=/application/git install
[root@zabbix git]# echo ‘export PATH=/application/git/bin:$PATH‘ >>/etc/profile
[root@zabbix git]# source /etc/profile
[root@zabbix bin]# git --version
git version 2.9.0
[root@zabbix bin]# useradd git
[root@zabbix bin]# echo password|passwd --stdin git
更改用户 git 的密码 。
passwd:所有的身份验证令牌已经成功更新。
[root@zabbix bin]# sed -i ‘s#git:x:1000:1000::/home/git:/bin/bash#git:x:1000:1000::/home/git:/application/git/bin/git-shell#g‘ /etc/passwd
标签:useradd user ati pen col lease open etc git
原文地址:https://www.cnblogs.com/suffergtf/p/9168383.html