1. Installation
Yum install Svnserver, for the source code installation is more complex, it is recommended that Yum to install it
Yum-y Install Subversion
I executed this command, did not install successfully, Yum Search subversion did not, all installed Subversion-devel results OK
2. Create a version library
Mkdir/var/svn/svnrepos
Svnadmin Create/var/svn/svnrepos/mlms
Directory
Drwxr-xr-x.2Root root4096May - One: -CONFDRWXR-sr-x.6Root root4096May - A: -DB-r--r--r--.1Root root2May - One: -FORMATDRWXR-xr-x.2Root root4096May - A: -HOOKSDRWXR-xr-x.2Root root4096May - One: -Locks-rw-r--r--.1Root root229May - One: -README.txt
3. Configuration
Cd/var/svn/svnrepos/mlms/conf
Authz: Responsible for account permissions management, control account whether read and write permissions
passwd: User list management for account and password
SVNSERVE.CONF:SVN Server configuration file
3.1 Vim Authz
Finally add
MLMS=RW # account = read/write
3.2 Vim passwd
mlms=1234 #账户 = password
3.3 Vim svnserve.conf
Just remove these notes.
4. Firewall turned on
Iptables the knowledge in this area separately
Iptables-f (Clear all protocols)
5. Start the SVN server
Svnserve-d-r/var/svn/svnrepos
6. Client access to SVN
Window Address: Svn://192.168.28.134/mlms I did not add the port number, also OK
7. Automatic Server update
7.1 SVN Server
Cd/var/www/html
SVN checkout Svn://192.168.28.134/mlms
7.2 Automatic Updates
Touch/var/svn/svnrepos/mlms/hooks/post-commit
#!/bin/shexport Lang=en_us. UTF-8SVN=/USR/BIN/SVNWEB=/VAR/WWW/HTML$SVN update $WEB--username mlms--password 1234
The code in the/var/www/html directory is automatically updated when the client commits
Reference: http://www.cnblogs.com/mymelon/p/5483215.html
Linux SVN Server Setup