1. Install SVN
sudo apt-get install subversion
2. Add users and user groups and group users into user groups
sudo adduser svnuser
sudo addgroup subversion
sudo addgroup svnuser Subversion
3. Create a project directory
sudo mkdir/home/svn
Cd/home/svn
sudo mkdir bicycle
sudo chown-r root:subversion Bicycle
sudo chmod-r g+rws Bicycle (Note this s)
4. Create SVN repository
sudo svnadmin create/home/svn/bicycle
5. Import the project files into SVN
sudo svn import-m-F. /wk File:///home/administrator/svn/myproject
6. Permissions and User Control
Modify/conf under svnserve.conf passwd authz three files
1) svnserve.conf
password-db = password----> Personal understanding is Specifying configuration passwd (user, group, and permission information defined in the file)
Authz-db = Authz
"Anon-access = Read
auth-access = Write
Password-db = passwd
Where anon-access and auth-access are anonymous and privileged user permissions, default to anonymous users read-only permissions, but if you want to deny
】
2) passwd file
[Users]
Mirze = 123456
Test1 = 123456
Test2 = 123456
3. authz file [pro-Test, find the way to use the Admin group may be problematic, preferably [/]HZUSER=RW, do not use groups]
Edit/home/svnuser/etc/authz as follows
[Groups]
admin = Mirze,test1
Test = Test2
[/]
@admin =RW
*=r
There are three users mirze,test1,test2 passwords are 123456.
where Mirze and test1 belong to the admin group, have read and write permissions, test2 belong to the test group only Read permission
7. Start SVN
Svnserve-d-R/HOME/SVN
Description Description:
-d means svnserver runs in daemon process mode
-r Specifies the root location of the file system (the repository's root directory) so that the client can access the repository without entering the full path
such as: svn://192.168.12.118/fitness
The SVN installation is now complete.
LAN access mode:
Example: SVN checkout svn://192.168.12.118/fitness--username Mirze--password 123456/var/www/fitness
Code uploads can be used with XSHELL+RZ tools + RAR Tools
PS. My factory is really non-mainstream, incredibly use Ubuntu to do Linux server ... is not generally red hat, Cenos?
Ubuntu Build SVN server