Level two domain name configuration
Git.dbpoo.com point to git repositories this directory/mnt/git/repositories
Gitweb.dbpoo.com directory pointing to Gitweb/usr/share/gitweb
Can be configured via Apache VirtualHost
First, install Git
centos6.5 with git1.7.1, you can upgrade to 1.7.12 by using the method below
1. View server version (server)
Cat/etc/redhat-release
2, install rpmforge source and update git version (server)
Find the RMP version you want to upgrade according to the version, http://pkgs.repoforge.org/rpmforge-release/
My CentOS is CentOS-6.5 64 bit to find the latest version is http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
With the command Yum–enablerepo=rpmforge-extras provides git to find the latest source git-1.7.12.4-1.el6.rfx.x86_64 for Git on rpmforge, then install.
RPM-IVH http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
Yum--enablerepo=rpmforge-extras provides git
Yum--enablerepo=rpmforge-extras Install git-1.7.12.4-1.el6.rfx.x86_64
Check to see git current version number by command git–version
Second, install Gitosis
1, install gitosis (server)
Yum Install Python Python-setuptools
git clone git://github.com/res0nat0r/gitosis.git
CD gitosis
Python setup.py Install
2. Generate key and upload server (admin machine)
ssh-keygen-t RSA #不需要密码, all the way to the line (local operation)
SCP ~/.ssh/id_rsa.pub root@xxx:/tmp/
3. Initialize Gitosis (server)
AddUser git # new git user (add user group Groupadd git first)
Su git # switch down git user
Gitosis-init </tmp/id_rsa.pub # id_rsa.pub is just passing through, note that the/TMP directory is mainly due to the permissions of everyone in this directory.
Rm/tmp/id_rsa.pub # id_rsa.pub is useless and can be deleted.
4. Get and configure Gitosis-admin (admin machine)
git clone git@xxx:gitosis-admin.git # switches to root and executes locally, obtaining gitosis admin project, which will produce a gitosis-admin directory with configuration files gitosis.conf and a Keydir directory, Keydir directory mainly store git user name
Vim gitosis-admin/gitosis.conf # Edit gitosis-admin configuration file
Configuration Instructions
# increased at the bottom of the gitosis.conf
[Group name]
writable = project Name
Members = user # Here's the name of the user to be consistent with the file name under Keydir
Submit git after new configuration
git Add.
Git commit-a-m ' Add user '
Git push Origin Master
Iii. installation of Gitweb
Yum Install Gitweb
The default installation is/var/www/git, if you upgrade git through the first step, the Gitweb will be upgraded and the installation directory will change to/usr/share/gitweb
The main effect is the VirtualHost path, the configuration of the site is also displayed.
Supplement: Common Path
CD. SSH
cd/etc/httpd/conf/
cd/etc/httpd/conf.d/
Vim/etc/gitweb.conf