RedHat/centos 6.3 git/gitosis/gitweb detailed process (2)

Source: Internet
Author: User

1. gitweb Installation

Note: The RedHat ISO source does not have the gitweb installation package, but the centos source exists. Article To get RedHat to use the centos source, you only need to use the following command to install it.


    1. # Yum install gitweb

2. gitweb Configuration

Gitweb is installed under/var/www/git by default, and its configuration file is in/etc/gitweb. conf. In addition, the httpd configuration file/etc/httpd/CONF. d/git. conf. (1) Modify/etc/gitweb. conf
    1. $ Projectroot = "/var/www/git" // change projectroot to/var/www/git

(2) Modify/etc/httpd/CONF. d/git. conf


  1. Alias/git/var/www/git
  2. <Directory/var/www/git>
  3. Allow from all
  4. AllowOverride all
  5. Order allow, deny
  6. Options + execcgi
  7. Addhandler CGI-script. cgi
  8. Directoryindex gitweb. cgi
  9. Setenv gitweb_config/etc/gitweb. conf
  10. Dav on
  11. Rewriteengine off
  12. </Directory>

(3) Restart httpd

    1. /Etc/init. d/httpd restart

(4) connect the gitosis repository to/var/www/git to complete Web display.

    1. Ln-S/home/git/repositories/test_repo.git/var/www/git/
(5) browser browsing

Http: // xxxx/git/


Note: If the GIT clone http: // xxx/git/test_repo.git error occurs, run the GIT Update-server-Info command in the test_repos.git directory (under the corresponding repository of the gitosis server ).
3. Create a New git Repository Run the following command in the/home/git/Repository directory of the GIT Server:
  1. Mkdir test. Git
  2. CD test. Git
  3. Git init -- bare
  4. // You can add the source file here or after the client side is cloned.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.