Installing and configuring SVN methods in Linux

Source: Internet
Author: User
Tags commit documentation svn svn update

1. Installation software

The code is as follows Copy Code
[Root@bogon ~]# Yum Install subversion-y

2, the establishment of version library directory

The code is as follows Copy Code
[Root@bogon ~]# Mkdir/svnroot//Build version Library Directory
[Root@bogon ~]# svnserve-d-r/svnroot//-r represents/svnroot as the root directory, and-D says Svnseve will be able to seat a service program running in the background
Build a version library to create a new SVN project
[Root@bogon ~]# svnadmin Create/svnroot/app

3, configuration

The code is as follows Copy Code
[Root@bogon ~]# cd/svnroot/app/
[Root@bogon app]# ls
Conf db format Hooks Locks README.txt
[Root@bogon app]# CD conf
[Root@bogon conf]# ls//configuration file storage location
Authz passwd svnserve.conf
[Root@bogon conf]# VI svnserve.conf
Anon-access = None
# Anonymous user has no permissions
auth-access = Write
#权限用户可写
Password-db = passwd
#用户密码存放文件
Authz-db = Authz
#用户权限文件
[Root@bogon conf]# VI Authz
......
[Groups]
# harry_and_sally = harry,sally
# Harry_sally_and_joe = Harry,sally,&joe
Group = Qhy
......
[/]
Qhy = RW
* =
[Root@bogon conf]# VI passwd
[Users]
# Harry = Harryssecret
# sally = Sallyssecret
Qhy = 123456
[Root@bogon conf]# SVN Co svn://127.0.0.1/app
Certification field: <svn://127.0.0.1:3690> b44df301-1065-4582-8133-70b14c19286e
Password for "root":
Certification field: <svn://127.0.0.1:3690> b44df301-1065-4582-8133-70b14c19286e

User name: Qhy
Password for "Qhy":
-----------------------------------------------------------------------
Attention! Your password, for the authentication domain:
<svn://127.0.0.1:3690> b44df301-1065-4582-8133-70b14c19286e
Can only be saved in plaintext on disk! If possible, consider configuring your system so that Subversion
You can save the encrypted password. Please refer to the documentation for more information.
You can set the option "Store-plaintext-passwords" to "yes" or "no" in "/root/.subversion/servers".
To prevent this warning from appearing again.
-----------------------------------------------------------------------
Save an unencrypted password (yes/no)? Yes
Remove version 0.

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

Client:
The client needs to install subversion.
Error 1:SVN: Unable to connect host "172.16.10.63": no route to host
The reason is the server firewall is not off, you can turn off the firewall, or Vi/etc/sysconfig/iptables plus a
-A input-m state--state new-m tcp-p TCP--dport 3690-j ACCEPT
Reboot the firewall, OK.
The first landing of the SVN server will store the password information under the. Subversion folder under the user's path, the path is/root/.subversion/.
[Root@bogon ~]# SVN Co svn://172.16.10.63/app
The abbreviation of CO for checkout, i.e. extraction
Certification field: <svn://172.16.10.63:3690> b44df301-1065-4582-8133-70b14c19286e
Password for "root":
Certification field: <svn://172.16.10.63:3690> b44df301-1065-4582-8133-70b14c19286e
User name: Qhy
Password for "Qhy":
-----------------------------------------------------------------------
Attention! Your password, for the authentication domain:
<svn://172.16.10.63:3690> b44df301-1065-4582-8133-70b14c19286e
Can only be saved in plaintext on disk! If possible, consider configuring your system so that Subversion
You can save the encrypted password. Please refer to the documentation for more information.
You can set the option "Store-plaintext-passwords" to "yes" or "no" in "/root/.subversion/servers".
To prevent this warning from appearing again.
-----------------------------------------------------------------------
Save an unencrypted password (yes/no)? Yes
Remove version 0.
[Root@bogon ~]# ls
App
The app directory will be generated in the current directory after successful operation
[Root@bogon ~]# CP 1.sql app///copy of files requiring control version to checkout project directory
[Root@bogon ~]# CD App
[Root@bogon app]# svn add 1.sql//Add 1.sql to version Library
A 1.sql
Modify and update files
[Root@bogon app]# echo "#apptest" >>1.sql
[Root@bogon app]# SVN update
Update the last version to the local
Version 0.
[Root@bogon app]# svn commit-m "First.test" 1.sql
Submit the latest local version to the server and become the latest version of the server comment First.test,commit can be abbreviated to CI
Add 1.sql
Transfer file data.
The submitted version is 1.

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

[Root@bogon app]# svn update-r 1
Download first version to local
Version 1.
[Root@bogon app]# echo "#twotest" >>1.sql
[Root@bogon app]# SVN update
Version 1.
[Root@bogon app]# svn commit-m "Two.test" 1.sql
Sending 1.sql
Transfer file data.
The submitted version is 2.

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

Windows Client

Http://xiazai.xiazaiba.com/Soft/T/TortoiseSVN_1.7.11.23600_x86_XiaZaiBa.zip

Specific operation and Linux similar directory URL is: Svn://172.16.10.63/app

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

Maintenance phase:
[Root@bogon conf]# VI Authz
......
[Groups]
# harry_and_sally = harry,sally
# Harry_sally_and_joe = Harry,sally,&joe
Group = Qhy
......
[/]
Qhy = RW
* =
[Root@bogon conf]# VI passwd
[Users]
# Harry = Harryssecret
# sally = Sallyssecret
Qhy = 123456
Svnserve.conf
The configuration line format in the General configuration section is as follows:
< configuration item > = < value >
passwd
The configuration line format for the [users] configuration segment is as follows:
< username > = < password >
Note: The password in the configuration line is plaintext without any processing.
Authz
The configuration line format in the [Groups] configuration section is as follows:
< user Group > = < user list >
The segment name of the version library path permission segment is formatted as follows:
[< version Library name >:< path
There are three types of configuration row formats in the version library path permission segment:
< user name > = < permissions >
< user Group > = < permissions >
* = < Permissions >

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.