The easiest way to create svn in ubuntu

Source: Internet
Author: User
Lihn1987, the easiest way to establish svn In ubuntu (reposted to the famous author, thank you)


Recently I am studying opengl and have written some code, but I am afraid that the Code will be lost and the code will be modified by mistake. What should I do? So I thought of using the version management tool.
In linux, it is most appropriate to use svn.
Method
First, prepare software tools. ubuntu is quite convenient to install software.
Sudo apt-get install subversion
OK

Create a repository folder:

Cd/home

Sudo mkdir svn

/Usr/local/svn # sudo chown-R 777 svn

/Usr/local/svn # sudo chmod-R 777 svn

The last command grants the group members the corresponding permissions on all files added to the file warehouse.

The permission should have been added to the corresponding group, but since it is the simplest method, it is omitted.

 

Create a repository

Sudo svnadmin create/home/svn

Modify the conf/svnserve. conf file under svn

Remove # Before [general]
[General]
# Anonymous access permission, which can be read, write, or none. The default value is read.
Anon-access = none
# Authenticate the user's permissions, which can be read, write, or none. The default value is write.
Auth-access = write
# Remove the path of the password database #
Password-DB = passwd

Modify the configuration file passwd
If modified
[Users]
Fly li = 123456

Then start the svn Service
Svnserve-d-r/home/SVN

Finally, import the svn Project
SVN import-M "New Import"/home/test SVN: // localhost/SVN
In this way, the project in the/home/test folder is imported into SVN, and the-M parameter indicates that the message is what we will see when viewing the svn log in the future.

Then let's test it.
Sudo mkdir/home/svn_down
CD/home/svn_down
Sudo SVN Co SVN: // localhost/SVN

Check whether the files in SVN have been downloaded?

Haha, I wish you a successful configuration.
If you encounter problems, you can leave a message or contact lihn1987@gmail.com

Finally, thank you for visiting benboha.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.