git服务器搭建
--------------------------------------------------------git安装------------------------------------------------------------------
1、mnt下创建git路径
mkdir git
2、上传压缩包到git路径下并解压,下载地址 https://github.com/git/git/releases
tar vxzf git-2.25.0-rc2.tar.gz
3、安装编译源码所需依赖
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker
4、卸载旧git
yum remove git
5、进入解压后的文件
cd git-2.25.0-rc2
6、编译
make prefix=/mnt/git all
7、安装
make prefix=/mnt/git install
8、修改环境变量并刷新
vim /etc/profile
PATH=$PATH:/mnt/git/bin
source /etc/profile
9、查看版本
git --version
----------------------------------------------git搭建--------------------------------------------------------------
1、新建用户分组
groupadd testgroupp
2、新建用户
useradd testuser -g testgroupp
3、修改用户密码
passwd testuser
4、修改用户登陆权限
vim /etc/passwd
testuser:x:1003:1003::/home/testgroup:/mnt/git/bin/git-shell(git安装路径下的bin下面的git-shell)
5、建仓库
git init --bare /mnt/git/github
6、修改仓库所属用户组
chgrp -R testgroup /mnt/git/github
7、修改文件夹权限
chmod -R 777 /mnt/git/github/
相关推荐
formula 2020-11-12
huhongfei 2020-11-05
乾坤一碼農 2020-10-27
liumengyanysu 2020-10-22
E哥的aws认证攻略 2020-10-15
tianyafengxin 2020-10-08
guying 2020-10-05
好脑筋不如烂笔头 2020-09-17
nebulali 2020-09-11
佛系程序员J 2020-09-15
fenggit 2020-09-15
JustHaveTry 2020-09-11
兄dei努力赚钱吧 2020-09-06
IngeniousIT 2020-08-25
liumengyanysu 2020-08-17
guying 2020-08-16