Install subversion in linux

Source: Internet
Author: User
Tags svn update
Install subversion in linux-Linux Enterprise Application-Linux server application information. For details, refer to the following section. SVN is a version control software, similar to CVS, but SVN is a bit open-source, and the version control capability of SVN is much stronger for CVS.

SVN can be used for project management and version synchronization.

Download: http://subversion.tigris.org

Current stable version SVN1.32http: // subversion.tigris.org/downloads/subversion-1.3.2.tar.gz

Installation:

Unzip: #: tar zxvf subversion-1.3.2.tar.gz

Enter./configure, make, and make install in sequence to complete compilation and installation.

Enable the SVN service: svnserve-d

Check whether the service is enabled: netstat-ntlp. If the port 3690 is enabled, it indicates that SVN is enabled.

Official Use:
First, we need to build a SVN project. Most people think that only one file is needed to create a project. Before I use SVN for the first time, I think that folders need to be created to create a project in SVN.

Run the "svnadmin create project_name" command to create a project.
After the creation is complete, project_name is a folder and you can see a conf folder. Go to the folder and you will see two files (if there is no passwd file, you can create it with vi). Edit svnserve. conf and set anon-access = read, auth_access = write
Also, remove the comments of password-db = passwd and [general.
Vi passwd file. If it is a new file, enter:
[User]
Your_name = your_password
Your_name is your username and your_password is your password. This is a necessary pass to access SVN.

Now we have finished the preparation. We can use it below.
Resume A Temporary Folder in which three folders are created to load the version information of the SVN Project or the branch version.
Mkdir temp
Mkdir temp/trunk
Mkdir temp/tags
Mkdir temp/branches
After creation
Input the command svn import temp/svn: // localhost/projectname-m "Hello world! ";

First, find the source code folder of your project and run the following command:
Cd your project
In your project dircetory
Use: svn co/home/project_name -- username = your_name -- password = your_password

Now, you can use the following command on the client to obtain the project source code file you want.
Svn co svn: // home/project_name -- username = your_name -- password = your_password

Add the added svn file to the svn database:
Svn add/home/your_project/*. * -- username = your_name -- password = your_password

Submit the file:
Svn commit/home/your_project/*. * -- username = your_name -- password = your_password

Update file: svn update/home/your_project/*. * -- username = your_name -- password = your_password

Of course, you can edit a script file to complete all operations at one time:
Vi svnupdate. sh

#! /Bin/sh
Svn add/home/your_project/*. * -- username = your_name -- password = your_password
Svn commit/home/your_project/*. * -- username = your_name -- password = your_password
Svn update/home/your_project/*. * -- username = your_name -- password = your_password

Chmod + x svnupdate. sh

Finish
Related Article

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.