git服务器搭建(Git server build).docVIP

  • 29
  • 0
  • 约3.68千字
  • 约 10页
  • 2017-07-24 发布于河南
  • 举报
git服务器搭建(Git server build)

git服务器搭建(Git server build) 1. environmental deployment System environment: Server: CentOS 6.5, ip: Client: CentOS 6.5, ip:01 Software version: server side: source code, installation, git-1.9.0.tar.gz Client: Yum online installation mechanism 2. installation 2.1 server side: #yum, install, curl-devel, expat-devel, gettext-devel, openssl-devel, zlib-devel, perl-devel #wget /files/git-1.9.0.tar.gz #tar zxvf git-1.9.0.tar.gz #cd git-1.9.0 #make prefix=/usr/local all #make prefix=/usr/local install #root user operation View version number: git --version Git version 1.9.0 Install gitosis:gitosis for the Git user rights management system, through the management of the servers /home/git/.ssh/authorized_key file to execute user rights management, is a python module package #yum install Python python-setuptools #git clone git:///res0nat0r/gitosis.git #cd gitosis/ #python setup.py install Show Finished processing dependencies for gitosis==0.2 means success 2.2 client installation: #yum install Git #git --version Git version 1.7.1 3. SSH settings The client produces the key and uploads it to the server: #ssh-keygen -t RSA #scp ~/.ssh/id_rsa.pub root@:~/ The server looks at the keys that have been uploaded: ls to /id_rsa.pub 4. git users are generated on the server, using the GIT user and initializing the gitosis Add user git: #useradd, -r, -s, /bin/sh, -c,git, version, control,, -d, /home/git, GIT Set permissions: #mkdir -p /home/git #chown git:git /home/git Generating a management library on the server side: #sudo, -H, -u, GIT, gitosis-init /id_rsa.pub Initialized, empty, Git, repository, in, /home/git//repositories/gitosis-admin.git/, Reinitialized, existing, Git,, repository, in, /home/git/repositories/gitosis-admin.git/ Annotations: 1., the generated gitosis-admin is the user access management library for Git, and gitosis manages access rights for all git libraries through the GIT library. 2. by executing initialization, the owner of the public key can modify the particul

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档