Ubuntu under SVN Server Installation Configuration 1. installation package
sudo apt-get install subversion
2. Add SVN Admin user and Subversion Group
$ sudo adduser svnuser add user
$ sudo addgroup subversion Add user group
$ sudo addgroup svnuser Subversion add user to Group
3. Create a project directory
sudo mkdir/home/svn creating a file
Cd/home/svn
sudo mkdir myproject create SVN service directory
sudo chown-r root:subversion myproject change user genus Master Group
sudo chmod-r g+rws myproject Add Group Write permission
4. Create the SVN file repository
sudo svnadmin create/home/svn/myproject
5. Access mode and Project import:
To set access mode:
SVN Co file:///home/svn/myproject
Or
SVN Co file://localhost/home/svn/myproject
Note
If you are unsure of the name of the host, you must use three slashes (///), and if you specify the name of the host, you must use two slashes (//).
To import a project into the SVN file repository:
SVN import-m "New import"/home/svn/myproject file:///home/svnuser/src/myproject
Be sure to indicate the import information
6. Access Rights settings
Modified/home/svn/myproject under: svnserve.conf, passwd, Authz
Note: Three files, no spaces allowed at the front of the line
Edit conf /svnserve.conf
Uncomment the following two lines
password-db = password
Authz-db = Authz
# [General] Supplemental notes
Anon-access = Read
auth-access = Write
Password-db = passwd
Where anon-access and auth-access are anonymous and privileged user permissions, default to the anonymous user read-only permissions, but if you want to deny access to anonymous users, simply change the read to none to achieve the purpose.
Edit conf /passwd
[Users]
Mirze = 123456
Test1 = 123456
Test2 = 123456
Edit conf /authz
[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 the SVN service
Svnserve-d-r/home/svn/myproject
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/myproject
The SVN installation is now complete.
LAN access mode:
Example: SVN checkout svn://192.168.12.118/myproject--username Mirze--password 123456/var/www/myproject
This method uses Subversion Bring your own Svnserve configuration, for the local area network has been applied, want to WLan Apply to apply on Apache mode configuration.
8. Export and import of the entire library
Svnadmin dump Myrepos > dumpfile; Executing this command in the case of starting the library exports the library to DumpFile, myrepos the library's directory.
Svnadmin load Newrepos < dumpfile; Launch the library you created, and execute this command to import the contents of the original library into the new library. Newrepos is the directory of the new library
List of issues (1) svnserve.conf:xxx:Option exected
This is because the configuration in the svnserve.conf file does not have shelf write, the configuration file svnserve.conf requires that there is no space in front of the configuration item, remove the blank space at the beginning of the comment item
(2) Can ' t open file '/home/svn/fitness/db/txn-current-lock ': Permission denied
Since the repository is created with root privileges, SVN users will not be able to update the files in the db/directory (since the submission updates the db/directory in the repository on the SVN server). The solution is to delegate the files in the db/directory to the operating user. The operation is as follows:
sudo chmod-r g_rws myproject/db
(3) SVN: ' xxxxx ' isn ' t in the same repository as ' xxxxx '
When we created the repository, we used the following command
sudo svnadmin create/home/svn/myproject
In the Conf/authz configuration file we set the corresponding
[/] @admin =RW *=r
And if we use the following command to create a repository:
sudo svnadmin create/home/svn
At this point, when you log in to the repository, you are not prompted for the same repository. To set the Conf/authz to
[myproject:/] @admin =RW *=r
Ubuntu under SVN Server installation configuration