Yum–y Install Subversion
Build the Repository Directory
Mkdir–p/mnt/svn
build svn repository
Svnadmin Create/mnt/svn/delieato
Start svn:
Svnserve–d–r/mnt/svn
for each library, There are three configuration files (Authz,passwd,svnserve.conf) in the Conf directory
1, authz, set user groups and user rights
[Group]
Smsyun = DDL,SHL// Create a Smsyun group and develop two user DDL and SHL
[/]//The permissions under the custom directory / All resources under the Representative directory
@smsyun =RW//smsyun user group permissions are read and write
*=r// other users have read access only
2, passwd
[Users]
dd1=123// username = password
Dd2=123
3, svnserve.conf, the following four lines before the # removed
# anon-access = read// remove # and change read to none, anonymous user access not allowed
# auth-access = write// authenticated user can read and write
# password-db = passwd// user save file
# realm = Smsyun// warehouse name
Note: There must be no space in front of the modified file, otherwise there is an error starting SVN server
4, set the boot automatically start
Vi/etc/rc.local
Add a line below touch/var/lock/subsys/local
Svnserve–d–r/usr/local/svnrepo/first
1. Set The web directory to /var/yii
2,Checkout a copy to the Web directory
SVN Co svn://localhost/smsyun/var/yii
3. Create a synchronization script
Create a new post-commit file under the /mnt/delieato/hooks directory
In the file, add:
#!/bin/sh
Repos= "$"
rev= "$"
Exportlang=en_us. UTF-8
Svn=/usr/bin/svn
Web=/var/yii
$SVN update $WEB--username dd1--password 123--no-auth-cache
then give the post-commit script Execute Permissions
Chmod +x Post-commit
The last action is to close the service and then open
Close:killall svnserve
Open:svnserve–d–r/mnt/delieato/svn
CentOS Install and sync to web directory under SVN