In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the relevant knowledge of "how to deploy a SVN server under Linux". The editor shows you the operation process through an actual case. The operation method is simple, fast and practical. I hope this article "how to deploy a SVN server under Linux" can help you solve the problem.
SVN is an open source version control system, through the efficient management of branch management system, in short, it is used for multiple people to jointly develop the same project, to achieve shared resources, to achieve the final centralized management.
Premise: to install through yum, it must be the desktop version of centos6.5. Otherwise, some installation packages will be incomplete, resulting in the installed svn can not be used, and other unknown errors.
Server installation configuration: 1.svn server operation mode: 1, stand-alone server: svn://www.snv.com/sadoc # sadoc project 2, with the help of Apache: http://www.svn.com/addoc 3 Local direct access: file:///application/svn/sadoc # two / / is the absolute path 2.Linux build steps: install: yum-y install subversion create svn version library root directory and password permission directory: mkdir-p / application/svndatamkdir-p / application/svnpasswd start, specify the root directory of svn svnserve-d-r / application/svndata (- d: run in the background -r: path) check whether the process is started: ps-ef | grep svnnetstat-plnt | grep 3690 (port number of svn is 3690) lsof-I tcp:3690 (or: lsof-I: 3690) build version library: svnadmin create / application/svndata/sadoc (it can also be understood as a project, this directory cannot be created with mkdir, because svn has its own way of running Will create a lot of files belonging to svn) tree / application/svndata/ (at this time you will find that there will be a lot more content in sadoc) modify the configuration file: cd / application/svndata/sadoc/confcp svnserve.conf svnserve.conf.bak egrep "\-access |\-db=" svnserve.conf (egrep can filter two strings = grep-E at the same time) change it to: (write the following at the top) [general] anon-access=none Do not allow anonymous access to auth-access=write allowed files that can write password-db = / application/svnpasswd/passwd specified user-password authz-db = / application/svnpasswd/authz specified user permissions realm= this is project 1 description: anon-access = none # do not allow anonymous users to access auth-access=write # authenticated users can read and write password-db = / opt/svn/etc/svn- User.conf # user saves file authz-db = / opt/svn/etc/svn-authz.conf # Rights management file realm = My First Repository # Warehouse name change password and permissions configuration file: cp / apllication/svndata/sadoc/conf/passwd / apllication/svndata/sadoc/conf/authz / apllication/svnpasswd/ cd / apllication/svnpasswd/ chmod 700 * (the original permission is 644 Because anyone can see it, because the password for svn is in clear text) vim passwd (add on the last line) oldboy = 111111 test = 111111 test = 222222 vim authz (group information can be defined here. Be careful. The members of the group here must be defined in passwd, not written randomly, and the group name can be picked up at will) ett_sa = oldboy,test1 (define an operation and maintenance group: members are: oldboy and test1) ett_wangguan = test (define a network management group Member is test) [sadoc:/] (define project quota permissions: project name sadoc, indicating who is allowed to have what permissions for all content under the project) @ ett_sa = rw (if a group ett_sa is allowed to access, the symbol should be preceded by the @ symbol) @ ett_wangguan = r (allow network management group to view) test = r (if permission is given to a user Restart svn: pkill svnserve ps-ef | grep svn svnserve-d-r / apllication/svndata (boot to the svndata directory here, so connect / sadoc at the end of the URL asked by the customer, that is, svn://192.168.115.80/sadoc) ps-ef | grep svn (when only one project is joined) You can svnserve... / application/svndata/sadoc, then add svn to boot to edit the rc.local file in URL: svn://192.168.115.80): vi / etc/rc.d/rc.local add the following startup command: / usr/local/svn/bin/svnserve-d-listen-port 9999-r / opt/svn client installation configuration: install: download tortoise svn install on Windows, install the Chinese version of the language pack All the way to the next step to solve the connection: create a new folder in the d disk: svn client-right click: select: svn-checkout (check out, the first operation, only this) fill in the address of the newly configured server: svn://10.0.0.6/sadoc/ checkout address W is: d:svn client (domain name is recommended) Without ip) default: full recursive (completely recursive) enter user ID and password: (can occur this step: prove that you can connect to the server): oldboy,1111111 (then there will be an extra folder with hidden files in .svn) svn submission process: create a new document in this folder (the sibling directory of the .svn folder) (submit as new code) Will go to the parent directory (directory generated by svncheckout): right-click: Commit (submit) to check whether it is submitted on the server: right-click (directory generated by svncheckout)-- > TortoiseSVN-- > extract data and submit data on Repo-browserlinux client Export: svn chechkout svn://10.0.0.6/sadoc / data/test-enter user name and password Import: svn import / data/oldboy/ Svn://10.0.0.6/sadoc-m "dddddddddddddd"-enter a user name and password or abbreviated as: svn co svn://10.0.0.6/sadoc / data/test svn cm / data/oldboy svn://10.0.0.6/sadoccheckout is usually used only for the first time Later, to update to the latest version and use update, you can view the data in svn: the graphical interface in 1.Windows can directly view the 2.Linux: svn ls svn://10.0.0.6/sadoc (ls-- > list) (can only view first-level directories) Hook: hooks when the version is updated, the hook program can be triggered, such as sending an email, etc., or other operations. Is an event and program 1.post-commitpost-commit that can be triggered: after the submission is completed and the version is created successfully, execute the hook program. The submission has been completed and cannot be changed, so the return value of this script is hoodwinked. Example: cp post-commit.tmpl post-commit vim post-commit comments out the last line Add: touch / tmp/$ (date +% M% S) .log chmod 755post-commit2.pre-commit will impose some restrictions when you submit, and only those that match the content of the script can be submitted. Application of incorrect hooks in the generation environment: (1) limit the extension and size of uploaded files (2) automatically inform when svn updates, MSN or email or SMS, etc. (3) trigger rsync push when svn updates, and update the display version at the same time
The steps to deploy svn for 4 projects on Linux:
[root@localhost] # yum-y install subversion [root@localhost ~] # svnserve-- versionsvnserve Version 1.6.11 (r934486). [root@localhost ~] # mkdir-p / a/svn/ [root@localhost ~] # mkdir / a/passwd [root@localhost ~] # svnserve-d-r / a/svn [root@localhost ~] # svnadmin create / a/svn/repo1 [root@localhost ~] # svnadmin create / a/svn/repo2 [root@localhost] # svnadmin create / a/svn/repo3 [root@localhost ~] # svnadmin create / a/svn/repo4 [ Root@localhost ~] # cp / a/svn/repo1/conf/passwd / a/passwd/ [root@localhost ~] # cp / a/svn/repo1/conf/authz / a/passwd/ [root@localhost ~] # vim / a/svn/repo1/conf/ svnserve.conf[ general] anon-access=noneauth-access=writepassword-db = / a/passwd/passwdauthz-db = / a/passwd/authzrealm=1111111111111111111111111111111111111 [root@localhost ~] # mv / a/svn/repo2/conf/svnserve.conf / a/svn/repo2/ Conf/svnserve.conf.bak [root@localhost ~] # mv / a/svn/repo3/conf/svnserve.conf / a/svn/repo3/conf/svnserve.conf.bak [root@localhost ~] # mv / a/svn/repo4/conf/svnserve.conf / a/svn/repo4/conf/svnserve.conf.bak [root@localhost ~] # cp / a/svn/repo1/conf/svnserve.conf / a/svn/repo2/conf/svnserve.conf [root@localhost ~] # cp / a/svn/ Repo1/conf/svnserve.conf / a/svn/repo3/conf/svnserve.conf [root@localhost ~] # cp / a/svn/repo1/conf/svnserve.conf / a/svn/repo4/conf/svnserve.conf [root@localhost] # vim / a/passwd/ passwd [users] chen=chen123lu=lu123zhang=zhang123wang=wang123hua=hua123dong=dong123 [root@localhost ~] # vim / a/passwd/ authz [groups] java=chen Lu Zhangios=wangweb=huajishu= dongs [repo1: /] @ java= RW [repo2: /] @ web= RW [repo4: /] @ jishu= RW [root @ localhost conf] # chmod 700 / a chmod ef * [root@localhost ~] # pkill svnserve [root@localhost ~] # ps-ef | grep svnroot 2405 2106 0 18:59 grep svn [root@localhost ~] # repo3-r / a/svn/ [root@localhost ~] # ps-ef | grep svnroot 2411 10 19:00? 00:00:00 svnserve-d-r / a/svn/root 2413 2106 0 19:00 pts/1 00:00:00 grep svn [root@localhost ~] # that's all for "how to deploy a SVN server under Linux" Thank you for your reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.