Linux SVN is a common system, so I learned how to use Linux SVN. Here I will introduce the application of Linux SVN in detail and hope it will be useful to you. Build a powerful Linux SVN version control system in 10 minutes.
Recently, POBO explained to me the Linux SVN version control system. I would like to share with you some information about it. Original: http://www.gaojinbo.com /? P = 32 requirement: Create a linux svn server in Linux and automatically synchronize the server to the WEB directory to instantly modify the WEB content through SVN.
1. Environment
Centos5.3
2. install Linux SVN
Yum-y install subversion
3. Linux SVN Configuration
Create a version library directory
Mkdir/svn
Svnserve-d-r/svn
4. Create a version library for Linux SVN
Create a new Subversion Project
Svnadmin create/svn/www.gaojinbo.com
Configure to allow rsync access
Cd/svn/www.gaojinbo.com/conf
- vi svnserve.conf
- anon-access=none
- auth-access=write
- password-db=passwd
Note: there must be no space before the modified file; otherwise, an error occurred while starting the svn server.
- Vi passwd
- [Users]
- #<User 1>=<Password 1>
- #<User 2>=<Password 2>
- RsyncRsync= Rsync
5. Linux SVN Client Connection
Svn co svn: // ip/www.gaojinbo.com
Username and password: rsync
6. implement synchronization between Linux SVN and WEB
1) set the root directory of the WEB server to/www/www.gaojinbo.com.
2) checkout SVN
Svn co svn: // localhost/www.gaojinbo.com/www/www.gaojinbo.com
Modify permissions to WEB users
Chown-R apache: apache/www/www.gaojinbo.com/
3) create a synchronization script
Cd/svn/www.gaojinbo.com/hooks/
Cppost-commit.tmpl post-commit
Edit post-commit and add the following content at the end of the file:
- export LANG=en_US.UTF-8
- SVN=/usr/bin/svn
- WEB=/www/www.gaojinbo.com/
- $SVN update $WEB –username rsync –password rsync
- chown -R apache:apache $WEB
Add the script execution permission chmod + x post-commit! How far a person can go depends on who he is
- Folder to be created for installing Linux SVN
- Access Mode for Linux SVN installation and startup
- Create a Linux SVN repository file and install and configure it
- Linux Oracle 10 Gb software installation database
- Folder to be created for installing Linux SVN