Install the svn client and configure the environment in Linux

Source: Internet
Author: User
Tags svn client

I. SVNClient installation and environment configuration.

If the svn client is not installed on the Linux machine, first install the svn client:

1. subversion-1.4.3.tar.bz2 subversion-deps-1.4.3.tar.bz2

2. Use

Tar xvfj subversion-1.4.3.tar.bz2
Tar xvfj subversion-deps-1.4.3.tar.bz2

Decompress these two files (do not mess up the order). The subversion-1.4.3 folder will appear in the current directory,

3. Go to the subversion-1.4.3 Folder:

# Cd subversion-1.4.3
#./Configure
# Make # compile. If an error is prompted, the root permission may be required.
# Make install # installation, which may require Root User Permissions

After the client is installed, the default installation directory is/usr/local/subversion.

4. link the svn command to the/usr/local/bin directory (root permission required ):

Ln-S/usr/local/subversion/bin/SVN/usr/local/bin

Test whether SVN can be used in the user directory:

If the command list is displayed for SVN help, the connection is successful.

5. Run the CHMOD command to grant the execution permission to the list checkout commit script:

Chmod 777 list checkout commit
CP list checkout commit/usr/bin

SVN client installed successfully

Ii. SVNCommand operation

Assume that the svn server has the following directory:

Not Displayed...

Steven has the workplace directory in his user directory. He wants to check out demoproject to his workplace directory and perform the following operations:

0. Go to the workplace directory and run the checkout command to check out:

CD workplace
Checkout demoproject

Note: If the user you log on to the Linux terminal has the same name as your SVN user (for example, Steven), you will be prompted to enter the svn user password, otherwise, you will be prompted to enter the Linux terminal user password, and then you will be prompted to enter the svn operation user name and password

After the preceding operations, the demoproject directory appears in the workplace directory.

1. operations on a single file (hello. cpp) Go To The demoproject/src/demo directory.

A) update to local

SVN up

B) Submit the modification to the database

Commit hello. cpp
SVN up

C) Add a file to the Library (go to the src/include directory)

SVN up # update the local working directory
SVN add hello. h # Add to library
Commit hello. h # submit hello. H to the database
SVN up # update the local working directory

D) delete the file on the Library (go to the src/demo directory)

# SVN del hello. cpp Delete the hello. cpp file in the library
# Commit hello. cpp submit to library
# SVN up update local working directory

2. Folder operations (here you need to consider the folder with subfolders) (src directory)

A) update the specified folder to a local directory (go to The demoproject directory)

# SVN up SRC // update the src directory and all subfolders in the directory to the demoproject directory.

B) Submit the modified entire folder to the Library (modified the folder include

# SVN up
# Commit include
# SVN up

C) Add a folder to the Library (demoproject/LIB)

Go to the demoproject directory:

# Create a lib package using SVN mkdir lib
# Submit commit lib to the library
# SVN up update local working directory

D) Delete the folder (DEMO) on the library and enter the demoproject/src/directory.

# SVN up update local working directory

# SVN del demo Delete demo folder

# Commit demo will delete and submit it to the database

3. Local and Database Operations

A) view the directory structure on the database (view the demoproject directory structure)

# List demoproject

B) compare a local file with a library or the entire folder (go to the src/demo directory ):

# SVN diff hello. cpp

C) view the submission record of a file in the database (when and who submitted it)

# SVN log-V hello. cpp

4. Other operations

A) Check the file status in the src/demo directory (whether the file is not submitted after modification)

# SVN St

If your hello. cpp file has not been submitted after modification, the state of Hello. cpp is displayed as m in the first column of SVN St, indicating that the project has been modified but not submitted to the database.

B) view SVN Command help

# SVN help update: view the update command help.

C) Conflict during submission (file modification without updating the local working directory leads to conflict:

(1) If you want to use the version in the project repository, discard the modification of local copy:

# SVN revert hello. cpp

# SVN up

(2) If you want to retain the modification of the local copy of work, and discard the modification of the version in the project Repository:

# You can use resolved after resolving conflicting files

# SVN resolved

# SVN commit hello. cpp

D) old version of the checkout Database

First check the old demoproject version you need to checkout, and then checkout:

# Check the old version of SVN log demoproject, for example, version 4330.

# Checkout demoproject-r 4330

 

--------------------------------------------------------------------------

Official website of zlib:
Http://www.zlib.net
Download the source code to install the zlib package.
The latest zlib version is zlib1.2.3. The installation starts;
$ Wget http://www.zlib.net/zlib-1.2.3.tar.gz
$ Tar-xvzf zlib-1.2.3.tar.gz
$ Zlib-1.2.3.tar.gz CD
$./Configure
$ Make
$ Sudo make install

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.