Deploying SVN on Linux

Source: Internet
Author: User
Tags parent directory svn svn client svn update pkill egrep

deploying SVN on Linux

Author:headsen Chen 2017-10-16 16:45:04

Prerequisite: Install via Yum, must be centos6.5 desktop version. Otherwise, some of the installation packages will be incomplete, resulting in the installed SVN can not be used, and so on unknown error.
Individual originality, reprint must indicate the author, the source, or the legal liability according to law
  Server-side installation configuration: ......................................................................................................................... ....... 1,SVN Service-side Operation:  1, standalone server: Svn://www.snv.com/sadoc    # Sadoc Project   2, with apache:http://www.svn.com/ addoc  3, local direct access:file:///application/svn/sadoc   #两个//followed by absolute path 2,linux on Build step: Install:   yum-y Install subversion create the root directory and password permissions directory for the SVN repository:  mkdir-p/application/svndata mkdir-p/application/svnpasswd   Start, specify the root directory of SVN  svnserve-d-r/application/svndata     (-D: Background run,-r: path)   See if the process starts:  ps-ef | grep svn netstat-plnt |grep 3690   (SVN port number is 3690)  lsof-i tcp:3690   (or: lsof-i: 3690)   Build repository: &N Bsp;svnadmin Create/application/svndata/sadoc   (also can 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 svn own files)  tree/application/svndata/  (you will find a lot more content in Sadoc)   Modify configuration file:  cd/application/svndata/sadoc/ CONF CP svnserve.conf svnserve.conf.bak    &NBsp;  egrep "\-access|\-db=" svnserve.conf   (Egrep can filter two strings at the same time =grep-e)   change to: (All to shelf write the following content)      [general]     anon-access=none   do not allow anonymous access      auth-access=write   Allowed write      PASSWORD-DB =/application/svnpasswd/passwd   Specify user-password file      AUTHZ-DB =/ Application/svnpasswd/authz   Specify user rights for files      realm= This is Project 1 description: Anon-access = None #不允许匿名用户访问a uth-access = Write #通过验证的用户可以读和写password-db =/opt/svn/etc/svn-user.conf #用户保存文件authz-db =/opt/svn/etc/svn-authz.conf #权限管理文件realm = My First Repository #仓库名称   Modify password and privilege profile:  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 because SVN's password is clear)   VIM passwd   (last line Add)      oldboy = 111111     test = 111111     test = 222222  vim Authz &nbSP; (You can define group information here.) Attention. The members of this group must be defined in the passwd, not casually written, the group name can be casual)      ETT_SA = oldboy,test1     ( Define an operations group: Members: Oldboy and Test1)      ett_wangguan = Test     (define a network management group with member test)      [ sadoc:/]     (Define Project Amount permissions:   Project name Sadoc, which means all content under this item allows who can have what rights)       @ett_sa  = RW   ( If you want to allow a group Ett_sa to access, it is preceded by this symbol to identify the next)       @ett_wangguan = R (allows the network management Group to view)      test = R   &NB Sp (If the permission is given to a user, it is directly in the "username = permissions" format)   Restart svn  pkill svnserve   ps-ef |grep svn  svnserve-d-R/APLL Ication/svndata         (this directory is launched to Svndata, so at the end of the client-side question URL, continue to/sadoc, that is: Svn://192.168.115.80/sadoc )   Ps-ef |grep svn                             (When you add only 1 items, you can svnserve .../application/svndata/sadoc, at which point the client accesses the URL:   svn://192.168.115.80)     Add svn to boot edit rc.local file: Vi/etc/rc.d/rc.local Add the following start command:/usr/local/svn/bin/svnserve-d–listen-port 9999-r/OPT/SVN ......................................................................................................................... .......   Client Installation configuration:  install: Download Turtle svn installed on Windows, install the Chinese version of the language pack, It's all the way. Connect: Create a new folder in the D drive: SVN client---Right-click: select: Svn-checkout (check out, first action, only this)       Fill in the address of the server you just provisioned: svn://10.0.0.6 /sadoc/    Checkout's address W: D:SVN client     (recommended domain name, no IP) default: Full recursive (fully recursive)       Enter user identification and password: (can appear this step: prove can connect to the server): oldboy,1111111   (then there will be more folders, and there is a. svn hidden file)   SVN submission process: Create a new document (the. svn folder's sibling directory) in this folder (as a new code submission) to the parent directory (svncheckout generated directory): Right-click:, Commit ( Submit) to see if the server is committed: Right-click (svncheckout generated directory)-TortoiseSVN---> Repo-browser  linux client extract data and submit data export: SVN Chechkout svn://10.0.0.6/sadoc  /data/test  -------------------------enter username and password import: SVN import/data/oldboy/ Svn://10.0.0.6/sadoc-m "dddddddddddddd"  --------------------------enter username and password   or abbreviated as: SVN co svn://10.0.0.6/ sadoc/data/test            SVN cm/data/oldboy svn://10.0.0.6/sadoc  checkout are generally only used for the first time, Later to update to the latest version with update you can   see the data in SVN: 1,windows in the graphical interface can be directly viewed in 2,linux: SVN ls svn://10.0.0.6/sadoc   (LS  --- > List) (can only view a first-level directory)   ......................................................................................................................... ...........   Hooks:hooks      When the version is updated, the hook program can be triggered, such as sending a message, etc., or other actions, which can be triggered by events and programs   1,post-commitpost-commit: After the completion of the submission, the successful creation of the version, the execution of the hook, the submission has been completed, cannot be changed, so the return value of this script is fooled   example: CP Post-commit.tmpl Post-commit     VIM post-commit      comment out the last line, add:      Touch  /tmp/$ (date +%m%s) .log    chmod 755 post-commit    2,pre-commit will make some restrictions on your submission and the content of the script can be submitted. Non-compliant error   Hook application in the build Environment:  (1), restrict uploaded file extensions and sizes   (2), automatically notify when SVN updates, MSN or mail or SMS   (3), SVN update triggers rsync push, To update  &nbsp at the same time as the display version, ... ..... ... .... ... ..... ... ..... ..... ..... ..... ..... ..... ....................... ..... ..... ..... .............. ........... ... the SVN operation steps for deploying 4 projects on the  linux of the.? .....???????????:  [[email protected] ~]# yum-y install subversion[[email protected] ~]# svnserve--versionsvnserve, Version 1.6.11 (r934486)   ... [[email protected] ~]# mkdir-p/a/svn/[[email protected] ~]# mkdir/a/passwd[[email protected] ~]# Svnserve-d-r/a/svn[[email protected] ~]# svnadmin create/a/svn/repo1[[email protected] ~]# svnadmin Create /a/svn/repo2[[email protected] ~]# svnadmin create/a/svn/repo3[[email protected] ~]# svnadmin create/a/svn /repo4[[email protected] ~]# cp/a/svn/repo1/conf/passwd  /a/passwd/[[email protected] ~]# cp/a/svn/ Repo1/conf/authz  /a/passwd/[[email protected] ~]# vim/a/svn/repo1/conf/svnserve.conf [general] anon-access=noneauth-access=writepassword-db =/a/passwd/passwdauthz-db =/a/passwd/authzrealm= 1111111111111111111111111111111111111[[email protected] ~]# Mv/a/svn/repo2/conf/svnserve.conf/a/svn/repo2/conf/svnserve.conf.bak [[email protected] ~]# mv/a/svn/ Repo3/conf/svnserve.conf/a/svn/repo3/conf/svnserve.conf.bak [[email protected] ~]# mv/a/svn/repo4/conf /svnserve.conf/a/svn/repo4/conf/svnserve.conf.bak [[email protected] ~]# cp/a/svn/repo1/conf/ Svnserve.conf/a/svn/repo2/conf/svnserve.conf[[email protected] ~]# cp/a/svn/repo1/conf/svnserve.conf/a/svn/ Repo3/conf/svnserve.conf[[email protected] ~]# cp/a/svn/repo1/conf/svnserve.conf/a/svn/repo4/conf/ Svnserve.conf[[email protected] ~]# vim/a/passwd/passwd[users]chen=chen123lu=lu123zhang=zhang123wang= Wang123hua=hua123dong=dong123[[email protected] ~]# vim/a/passwd/authz [groups]java=chen,lu,zhangios= wangweb=huajishu=dong[repo1:/] @java =rw[repo2:/] @ios =rw[repo3:/] @web =rw[repo4:/] @jishu =rw[[email protected ] conf]# chmod 700/a/passwd/* [[email protected] ~]# pkill svnserve[[email protected] ~]# ps-ef |greP svnroot      2405  2106  0 18:59 pts/1    00:00:00 grep svn[[email protected] ~] # svnserve-d-r/a/svn/[[email protected] ~]# ps-ef |grep svnroot      2411     1  0 19:00?        00:00:00 svnserve-d-r/a/svn/root      2413  2106  0 19:00 pts/1 &nb Sp  00:00:00 grep svn[[email protected] ~]# 

Deploying SVN on Linux

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.