Build CentOS 6 Server (+)-CVS, SVN, Git

Source: Internet
Author: User

(a) CVS
Installing XINETD

Shell Code
    1. # rpm-q XINETD
    2. # yum Install xinetd
    3. # Chkconfig xinetd on
    4. #/etc/init.d/xinetd Start



Installing CVS

Shell Code
    1. # rpm-q CVS
    2. cvs-1.11. 23-15.el6.x86_64 (CentOS comes with)
    3. # yum Install CVS



Create user

Shell Code
    1. # Groupadd Cvsgroup
    2. # useradd-g Wheel,cvsgroup Cvsuser
    3. # passwd Cvsuser



Set up

Shell Code
  1. # Mkdir/usr/local/cvsrepo
  2. # Cd/usr/local/cvsrepo
  3. # CVS Init
  4. # Chown-r Root:cvsgroup/usr/local/cvsrepo
  5. # chmod–r 775/usr/local/cvsrepo
  6. # Touch/etc/xinetd.d/cvs
  7. # Vi/etc/xinetd.d/cvs
  8. Service Cvspserver
  9. {
  10. disable = no # <-
  11. Port = 2401
  12. Socket_type = Stream
  13. protocol = TCP
  14. wait = no
  15. user = root
  16. Passenv = PATH
  17. Server =/usr/bin/cvs
  18. env = Home=/usr/local/cvsrepo
  19. Server_args =-F--allow-root=/usr/local/cvsrepo pserver
  20. }
  21. # chmod 644/etc/xinetd.d/cvs
  22. #/etc/init.d/xinetd Restart



Confirm

Shell Code
    1. # cvs-d ':p server:[email protected]:/usr/local/cvsrepo ' login
    2. # cvs-d ':p server:[email protected]:/usr/local/cvsrepo ' logout



(ii) SVN
Installation

Shell Code
    1. # Yum List | grep "^subversion"
    2. # CD/USR/LOCAL/SRC
    3. # wget http://apache.fayea.com/subversion/subversion-1.8. 13.tar.gz
    4. # TAR-ZXVF subversion-1.8. 13.tar.gz
    5. # CD subversion-1.8. -
    6. #./configure--PRIFIX=/USR/LOCAL/SVN
    7. # make
    8. # make Install
    9. # Svnserve--version



Set up

Shell Code
  1. # mkdir-p/usr/local/svndata
  2. # svnadmin create/usr/local/svndata/myproj/
  3. # cd/usr/local/svndata/myproj/
  4. # ls-l
  5. # CD Conf
  6. # ls-l
  7. # VI Svnserve.conf
  8. [General]
  9. Anon-access = None
  10. auth-access = Write
  11. Password-db =/usr/local/svndata/myproj/conf/passwd
  12. Authz-db =/usr/local/svndata/myproj/conf/authz
  13. # VI passwd
  14. [Users]
  15. Username=password
  16. # VI Authz
  17. [Groups]
  18. project_p = PM
  19. [project:/]
  20. @project_p = RW
  21. * =



Start the service

Shell Code
    1. # svnserve-d-r/usr/local/svndata/myproj/



Stop Service

Shell Code
    1. # Ps-aux|grep Svnserve
    2. # Kill-9 ID number



Confirm

Shell Code
    1. # SVN Co svn://localhost/myproj



(c) Git
Installation

Shell Code
    1. # Yum List | grep "^git"
    2. # CD/USR/LOCAL/SRC
    3. # wget https://www.kernel.org/pub/software/scm/git/git-2.3. 2.tar.gz
    4. # TAR-ZXVF git-2.3. 2.tar.gz
    5. # CD git-2.3. 2
    6. #./configure
    7. # make
    8. # make Install
    9. # git--version



Set up

Shell Code
  1. # Touch/etc/xinetd.d/git-daemon
  2. # Vi/etc/xinetd.d/git-daemon
  3. Service git
  4. {
  5. disable = no # <-
  6. Socket_type = Stream
  7. wait = no
  8. user = Nobody
  9. Server =/usr/libexec/git-core/git-daemon
  10. Server_args =--base-path=/var/lib/git--export-all--user-path=public_git--syslog--inetd--verbose
  11. Log_on_failure + = USERID
  12. }
  13. #/etc/init.d/xinetd Restart



Create repository

Shell Code
    1. # mkdir-p/var/lib/git/public_git/test.git/
    2. # cd/var/lib/git/public_git/test.git/
    3. # git--bare init--shared
    4. # Groupadd Gitgroup
    5. # usermod-g Wheel,gitgroup Gituser
    6. # passwd Gituser
    7. # Chown-r gituser:gitgroup/var/lib/git/



Client Acknowledgement

Shell Code
      1. # CD/HOME/GITUSER/SRC
      2. # mkdir Test
      3. # CD Test
      4. # echo "Git Test." > Test.txt
      5. # git Init
      6. # git add test.txt
      7. # git commit-m "first Commit"
      8. # git remote add Test ssh://[email protected]:56722/var/lib/git/public_git/test.git
      9. # Git push Origin Master

Build CentOS 6 Server (+)-CVS, SVN, Git

Related Article

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.