Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Linux SVN client usage and server configuration tutorial

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the "Linux SVN client use and server configuration tutorial" related knowledge, in the actual case operation process, many people will encounter such a dilemma, then let the editor lead you to learn how to deal with these situations! I hope you can read it carefully and be able to achieve something!

Configuration of SVN

1. Configure yum and check the subversion installation package [root@svn ~] # yum list | grep subversion subversion.i386 1.4.2-4.el5_3.1 base subversion-devel.i386 1.4.2-4.el5_3.1 base

Subversion-javahl.i386 1.4.2-4.el5_3.1 base

Subversion-perl.i386 1.4.2-4.el5_3.1 base

Subversion-ruby.i386 1.4.2-4.el5_3.1 base

[root@svn ~] # yum-y install subversion test whether the installation is successful:

Svnserve-- version enter shows that the version description has been installed successfully

[root@svn ~] # netstat-nat to see if the default TCP 3690 port is listening.

2. Create a svn version library [root@svn /] # mkdir-p / data/svndata [root@svn /] # svnadmin create / data/svndata/winne winne is the name of the version library

3Die svnserve configuration file Overview svnserve.conf-svn service configuration file, under the conf directory of the file version library directory. Passwd-the user name password file, which is specified in the file svnserve.conf and defaults to the same directory. Authz-the permission configuration file, which is also specified in the file svnserve.conf and defaults to the same directory.

Conf/svnserve.conf file

The configuration items are divided into the following five items: anon-access controls the permissions of non-authenticated users to access the version library. Auth-access controls the permissions of authenticated users to access the version library. Password-db specifies the username password file name. Authz-db specifies the permissions profile name through which path-based access control can be implemented. Realm specifies the authentication domain of the version library, that is, the authentication domain name that is prompted at login. If the authentication domain of the two version libraries is the same, it is recommended to use the same username password data file

Note: version 1.4 anon-access = bug of the read parameter. When anon-access = read, there will be Not authorized to open root of edit operation "error when client Checkout (extract). Change to none parameter is normal, conf / Passwd file user1 = user1 user2 = user2

Conf / authz file [groups] setting group admin = user1 [/] root directory permission setting (that is, "svndata" this folder) user1 = rw user 1 permissions are: readable user2 = r user 2 permissions are: readable, non-writable @ admin = rw set group permissions [svndata:/winne] set permissions for the "winne" folder under the root directory user1 = rw user2 = r... and so on

4. Start and stop SVN service start SVN service: [root@svn ~] # svnserve-d-r / data/svndata/-d means to run in the background-r specify the root directory is / data/svndata/ stop the SVN service: ps-aux | kill the grep svn kill-9 process

The use of Windows client TortoiseSVN

1, installation of TortoiseSVN client

The test selected TortoiseSVN 1.6.5 client to pay the Chinese language package.

2. Update the files of the client to the server (user1 operation) to create an empty directory, and right-click Checkout (extract) svn://192.168.103.26/winne to enter the authorized user account in the passwd file

Add some file tests to the directory. Then right-click TortoiseSVN- > ADD in the empty space to add the list to the server. At this time, it is not really copied to the server. It needs to be copied in the Commit (submit) operation.

You can see the file you just submitted in the version library browser, and the submitted version is 1. 0.

3. The client pulls the read data (user2 operation) User2 on the server to create an empty directory user2 on the machine, right-click Checkout (extract) and fill in the address: svn://192.168.103.26/winne output to G:\ user2 to determine the addition of a new.txt file, and then Commit (submit) prompts an error in permission. User2 does not have write permission, and the submission can be successfully changed to the identity of user1.

The operation flow of Linux client is generally as follows: user A: checkout (extract)-> add (add new file)-> commit (submit) user B: SVN log (View updates)-> update (newer version) 1. Install yun-y install subversion 2 Linux svn common commands () for command abbreviations. Checkout (co) extract commit (ci) submit update (up) update list (ls) list

3, checkout (co) extract files (user1) from svn server operation flow [root@TEST ~] # svn co svn://192.168.103.26/winne Authentication realm: My First Repository Password for 'root':

Authentication realm: My First Repository Username: user1 / enter username Password for 'user1': / enter password A winne/Cosmic Ride-BeFour.lrc A winne/20070716171657126.pdf A winne/svnbook.pdf revision 1. / checkout (co) extracted successfully See Checked out version 1 Note: access with user name and password can be used: svn co-- username user1-- password user1 svn://192.168.103.26/winne [root@TEST ~] # ll drwxr-xr-x 3 root root 4096 Sep 23 09:02 winne / winne directory is SVN automatically generated drwxr-xr-x 2 root root 4096 Jul 30 02:06 tasks [root@TEST ~] # cd winne [root@TEST winne] # ll total 2868-rw-r -- root root-1 root root 1566968 Sep 23 08:53 20070716171657126.pdf-rw-r--r-- 1 root root 2397 Sep 23 08:53 Cosmic Ride-BeFour.lrc-rw-r--r-- 1 root root 1354300 Sep 23 08:53 svnbook.pdf

4 testsvn.txt user1 modify the file and submit [root@TEST winne] # vi testsvn.txt [root@TEST winne] # svn add testsvn.txt / add testsvn.txt to the library A testsvn.txt [root@TEST winne] # svn commit-m "test" testsvn.txt / comment as test Adding testsvn.txt Transmitting file data. Committed revision 2. / version 2 is updated to 2

5 window user2 back the updated version of the Windows client to see the log, the version has been updated to 2, comment test, the client update can be updated to the new version.

6. Windows client version rollback Select update to verisiom in the menu and select version 1.

7 rollback operation for Linux version: [root@TEST winne] # svn up-r 1

This is the end of the tutorial on Linux SVN client use and server configuration. Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report