Subversion is a very good source control system, it supports the use of independent start-up and the combination of Apache use two service methods. Installation Subversion 1. Download the latest version of Setup from the Subversion home page 2. If it is a Windows platform, directly run the EXE installation program can be 3. If it is a generic Linux platform: 1 performs tar -ZXVF subversion.xxx.tar.gz for decompression 2 perform CD subversion.xxx switch to unpacked directory 3) execution./configure--prefix=/ Opt/subversion for configuration settings and indicates installation directory 4) execute make to compile 5 perform make install to install 4. If it is Fedora Linux, you can execute Yum directly Install Subversion for automatic installation (Fedora7 above version has its own) 5. If it is Ubuntu Linux, you can directly perform sudo apt-get install subversion for automatic installation II. Install Apache 1. Download the latest version of Setup from the Apache home page 2. If it is a Windows platform, run Setup 3 directly. If you are a typical Linux platform: 1 Perform TAR-ZXVF Httpd.xxx.tar.gz for decompression 2) perform CD httpd.xxx switch to unpacked directory 3./configure--prefix=/opt/httpd configuration settings, and indicate installation directory 4) execute make to compile 5 execute make install to install 4. If it is Fedora Linux, you can perform automatic installation of Yum install httpd directly (Fed Ora7 above version has been brought in 5. If it is Ubuntu Linux, you can directly perform sudo apt-get install apache2 for automatic installation Three, create a data Warehouse 1. Execute mkdir/var/gftech/ Number of Subversion/repos createdAccording to the warehouse Catalog 2. Execute svnadmin create/var/gftech/subversion/repos Create a data warehouse that will automatically generate several files and directories: /conf /db /hooks ... Four, independent start-up way is to be a separate service program, by default, through the local port 3690来 external service delivery. Start step: 1. Perform svnserve-d-r/var/gftech/subversion/repos run daemon, by default, anonymous Access 2. In Fedora, You can use Chkconfig to make Subversion a service program, with the system automatically start: 1 to log in as root account 2 to perform CD/ETC/RC.D/INIT.D switch to the service program directory 3 Execute VI svnd for file editing 4) Add the following content to the Svnd file: 5) Save exit 6 chmod a+x SVN D Make it executable 7 execute chkconfig--add svnd Add the service to the system 8) perform chkconfig--list svnd view the service 9) Execute serv Ice SVND start You can start the service 10 execute service SVND stop stops the service in the case of source control, the user's permissions need to be controlled for security purposes, primarily through three configuration files. Svnservice.conf, passwd, Authz, the first file indicates whether access control is required and the location of the second to third file, the second file holds the user account information, the third file holds the user's access rights, the specific configuration is as follows: 1. Open the svnserve.conf file and remove the # Auth-access=write in front of it so that the authorized user can write 2. Remove the # number in front of the password-db=passwd, indicating that the password file is passwd file 3 under the current directory. Put Auth-db=authThe # number in front of Z is removed, indicating that the user access rights file is Authz file 4 in the current directory. Open the passwd file and add the required account at the end of the line, such as: test=123456 5. Open Authz file, add TEST=RW below [/] line, Indicates that all directories under the root directory of the Data Warehouse, test can be read and write 6. Add another line of *=r, indicating that other accounts can be read-only operation 7. In this file, you can also group users, add them to [groups] below, for example: ADMIN=SINBOY,OTHERS=U1, U2 8. You can also have specific permissions control on subdirectories under the root directory, just add the appropriate directories, such as: [/web] u1=rw *= indicates that the Web subdirectory only allows the U1 account to read and write, and prohibits other account access Its disadvantages are: 1. External service delivery, may be blocked by firewalls, resulting in services can not access 2. And its password file is clear text display, No MD5 encryption, there are security risks 3. You can only start a data warehouse, if you want to create multiple data warehouses, you must start more than one Svnserve service process Five, the combination of Apache method combined with Apache way to overcome the shortcomings of the Svnserve method, Users can browse the source code directly through the browser, you can also access to the browser for SSL encryption control, better improve security 1.Apache itself does not support SVN, you need to install MOD_DAV_SVN Module 2. Under Fedora, execute yum install mod_dav_ SVN for automatic installation 3. Ensure that the/etc/httpd/moudles directory has mod_dav_svn.so and mod_authz_svn.so 4. Open/etc/httpd/conf/httpd.conf file in LoadModule Dav_module modules/mod_dav.so
Add the following two lines below one line: LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule Authz_svn_module modules/mod_authz_svn.so
5. Add the following: <Location/svn>
DAV SVN
Svnpath/var/gftech/subversion/repos
Authzsvnaccessfile/var/gftech/subversion/repos/conf/access.auth
Satisfy any
Require Valid-user
AuthType Basic
AuthName "Subversion repositories"
Authuserfile/var/gftech/subversion/repos/conf/users.auth
Require Valid-user
</Location> 6. Switch to/var/gftech/subversion/repos/conf directory 7. Execute HTPASSWD-CB Users.auth Test 123456 Create account file 8. Add Users again, Remove the parameter c: Htpasswd-b users.auth test2 123456 9. Perform service httpd restart boot Apache 10. Enter HTTP://HOST/SVN in the browser to open the SVN warehouse. Enter username password to access six, SVN client recommended to use TORTOISESVN Vii. other articles recommended 1.Apache and Subversion integrated installation and configuration