+ Reply to Thread
Results 1 to 9 of 9

Thread: Subversion & WHM/Cpanel 11

  Share/Bookmark
  1. #1

    Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation
    contink's Avatar
    Join Date
    Jul 2006
    Location
    South Yorkshire
    Posts
    3,653
    Thank Post
    256
    Thanked 266 Times in 199 Posts
    Rep Power
    77

    Default Subversion & WHM/Cpanel 11

    Thought I'd store this here too as I spent the last four hours trying to figure out how to make WHM's Apache 2.x install work with subversion.

    With a little help from this thread:
    cPanel Forums

    I managed to re-work the information into something a bit more usable and easier to understand... Oh and get it all to work!


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

    mkdir -p /usr/local/src/subverison
    cd /usr/local/src/subversion
    wget http://subversion.tigris.org/downloa...-1.5.2.tar.bz2
    tar xfj subversion-1.5.2.tar.bz2

    cd subversion-1.5.2

    ./configure --with-apxs=/usr/local/apache/bin/apxs --with-apr=/usr/local/apache/bin/apr-1-config --with-apr-util=/home/cpeasyapache/src/httpd-2.2.9/srclib/apr-util
    make
    make install

    NB: You can ignore the warning about berkleydb that comes at the end of the ./configure command.

    Create the svn_custom.conf using the new EA3 feature as described here:
    cPanel - The Easy Apache Configuration System - Adding Custom Directives to httpd.conf
    /etc/httpd/conf/userdata/std/2/[username]/[subdomain?].[domain]

    eg: /etc/httpd/conf/userdata/std/2/contink/www.continuousink.info
    .. the www is required or can be any subdomain but note the exception to wildcard sub-domains in the reference above.

    <IfModule mod_dav_svn.c>
    <Location /[repos-folder]>
    DAV svn
    SVNPath /home/[username]/svn/[repos-name]
    AuthType Basic
    AuthName "[Repository Label]"
    AuthUserFile /home/[username]/svn/passwd
    Require valid-user
    </Location>
    </IfModule>
    The <IfModule.. > call helps avoid your apache falling over if there's a problem with the conf file so don't get rid of it!

    TEST the custom configuration before you commit it!
    /scripts/verify_vhost_includes

    Assuming all is well... commit the svn_custom.conf and restart the apache server:

    /scripts/ensure_vhost_includes --user=[username]

    /scripts/rebuildhttpdconf
    /scripts/restartsrv_httpd



    You also need to do the following
    WHM > Apache Setup > Include Editor > Pre-Main Include

    Add the lines:
    Code:
    LoadModule dav_svn_module modules/mod_dav_svn.so
    LoadModule authz_svn_module modules/mod_authz_svn.so
    
    .. then restart apache.



    One thing to watch out for... if you get an error like this:
    Invalid command 'AuthzSVNAccessFile', perhaps mis-spelled or defined by a module not included in the server configuration"
    ... it's because you forgot to add the LoadModule command for the authz_svn_module

    ... that little oversight caused me 45 minutes of head scratching so hopefully this will save some other poor s*d from the same fate.



    Anyhoo... hope that's useful and obviously this is a guide for NIX systems only. YMMV for Win32 systems.

  2. #2

    Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation
    contink's Avatar
    Join Date
    Jul 2006
    Location
    South Yorkshire
    Posts
    3,653
    Thank Post
    256
    Thanked 266 Times in 199 Posts
    Rep Power
    77

    Default

    Some more info to add to this in response to this post:
    Don't have a /usr/local/apache/conf/userdata folder - cPanel Forums


    1. If you don't have the directory:
    /usr/local/apache/conf/userdata


    You need to create it... (ensure ownership user:group is root:root)
    Same with the /usr/local/apache/conf/userdata/std/2/[account]/[subdom.domain]


    2. What do I chown the repository folders to?
    If you are using Mod SuPHP then you leave the repository owned by the account owner.. so it you ftp in under username "foo" then you need to make sure that the repository owner is "foo".

    However if you're not using Mod SuPHP that then you'll need to work out what account apache is running under (usually nobody:nobody).

    You then do either:
    - CHOWN nobody:nobody /path/to/repository -R
    ..or..
    - CHMOD 777 /path/to/repository -R


    Either will work.

  3. #3

    Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation
    contink's Avatar
    Join Date
    Jul 2006
    Location
    South Yorkshire
    Posts
    3,653
    Thank Post
    256
    Thanked 266 Times in 199 Posts
    Rep Power
    77

    Default

    Further to that lot here's another nugget..

    When you recompile Apache using Easy Apache you will need to do the following first:

    In WHM go to:
    1. Main >> Service Configuration >> Apache Configuration
    2. In the "Pre Main Include" select your current version
    3. Replace:
      Code:
       LoadModule dav_svn_module modules/mod_dav_svn.so
       LoadModule authz_svn_module modules/mod_authz_svn.so
      
      with:
      Code:
      # LoadModule dav_svn_module modules/mod_dav_svn.so
      # LoadModule authz_svn_module modules/mod_authz_svn.so
      
      (This disables the subversion repository)

    You can now recompile Apache successfully (remember to select "Dav" as one of the modules to include).

    If you don't do this you get an error and your build will fail.


    Once you've finished Easy apache successfully... Compile your Subversion against the new apache, etc...

    ie:
    cd subversion-1.6.2

    ./configure --with-apxs=/usr/local/apache/bin/apxs --with-apr=/usr/local/apache/bin/apr-1-config --with-apr-util=/home/cpeasyapache/src/httpd-2.2.11/srclib/apr-util
    make
    make install
    ** I've updated for the latest versions of Apache and Subversion so if your version of subversion is out of date now is a good time to update it.

    Once that is done you can then return to Main >> Service Configuration >> Apache Configuration and return the "Pre Main Include" code to what is was before.

    Works like a charm

  4. Thanks to contink from:

    Marci (19-06-2009)

  5. #4
    svn
    svn is offline

    Reputation

    Join Date
    Jul 2009
    Posts
    1
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    I follow step by step tutorial on this post and it's really helpful.. however, before I install the latest svn from this post, I already use yum found on another tutorial using svn 1.4.2. Now I have both version installed but when I type svn or svnadmin it still referring to the 1.4.2 version. How do I get rid of 1.4.2?

  6. #5

    Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation
    contink's Avatar
    Join Date
    Jul 2006
    Location
    South Yorkshire
    Posts
    3,653
    Thank Post
    256
    Thanked 266 Times in 199 Posts
    Rep Power
    77

    Default

    Well you did a YUM upgrade which isn't on the instructions so I'm afraid I don't know.

    You'll need to query forums/docs for your particular linux distro and get some help there... You should have no problems querying your source installed svn and svnadmin though using the full path eg:

    /usr/local/bin/svn --version

    Sorry I don't have anything for your specific scenario...

  7. #6

    Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation
    contink's Avatar
    Join Date
    Jul 2006
    Location
    South Yorkshire
    Posts
    3,653
    Thank Post
    256
    Thanked 266 Times in 199 Posts
    Rep Power
    77

    Default

    Updating this having found a small but possibly significant quirk in updating Apache to 2.2.14, PHP to 5.3.1 and SubVersion to 1.6.9

    This still applies
    In WHM go to:
    1. Main >> Service Configuration >> Apache Configuration
    2. In the "Pre Main Include" select your current version
    3. Replace:
      Code:
       LoadModule dav_svn_module modules/mod_dav_svn.so
       LoadModule authz_svn_module modules/mod_authz_svn.so
      
      with:
      Code:
      # LoadModule dav_svn_module modules/mod_dav_svn.so
      # LoadModule authz_svn_module modules/mod_authz_svn.so
      
      (This disables the subversion repository)

    You can now recompile Apache successfully (remember to select "Dav" as one of the modules to include).

    If you don't do this you get an error and your build will fail.


    Once you've finished Easy apache successfully...
    Compile your Subversion against the new apache, using:
    Code:
    configure --with-apxs=/usr/local/apache/bin/apxs --with-apr=/usr/local/apache/bin/apr-1-config --with-apr-util=/home/cpeasyapache/src/httpd-2.2.14/srclib/apr-util
    make clean
    make
    make install
    
    The make clean gets rid of incompatible libs that would otherwise cause errors during make and make install


    Once that is done you can then return to Main >> Service Configuration >> Apache Configuration and return the "Pre Main Include" code to what is was before.

  8. #7

    Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation
    contink's Avatar
    Join Date
    Jul 2006
    Location
    South Yorkshire
    Posts
    3,653
    Thank Post
    256
    Thanked 266 Times in 199 Posts
    Rep Power
    77

    Default

    Apache to 2.2.15, PHP to 5.3.2 and SubVersion to 1.6.9

    Compile your Subversion against the new apache, using:
    Code:
    configure --with-apxs=/usr/local/apache/bin/apxs --with-apr=/usr/local/apache/bin/apr-1-config --with-apr-util=/home/cpeasyapache/src/httpd-2.2.15/srclib/apr-util
    make clean
    make
    make install
    

  9. #8

    Reputation

    Join Date
    Jun 2010
    Posts
    1
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0

    Default With Thanks.

    Seen as this thread has helped me sooo many times:

    This is the same as above svn 1.6.11, apache 2.2.15 php 5.2.13 with ssl support and neon (so you can ass the svn locally using http:// instead of svn://)

    Code:
    cd /home/downloads/svn
    wget http://subversion.tigris.org/downloads/subversion-1.6.11.tar.gz
    wget http://subversion.tigris.org/downloads/subversion-deps-1.6.11.tar.gz
    tar xfvz subversion-1.6.11.tar.gz
    tar xfvz subversion-deps-1.6.11.tar.gz
    cd subversion-1.6.11/neon
    ./configure --prefix=/usr/local/neon
    make
    make install
    cd ..
    ./configure --with-apxs=/usr/local/apache/bin/apxs --with-apr=/usr/local/apache/bin/apr-1-config --with-apr-util=/home/cpeasyapache/src/httpd-2.2.15/srclib/apr-util --with-neon=/usr/local/neon/ --with-ssl
    make
    make install
    
    Should be able to copy and paste into your bash session and job done!

    I will make an automated bash installer in the future if enough people request it.

    Thanks,
    Chris

  10. Thanks to chrisjenx2001 from:

    contink (08-06-2010)

  11. #9

    Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation
    contink's Avatar
    Join Date
    Jul 2006
    Location
    South Yorkshire
    Posts
    3,653
    Thank Post
    256
    Thanked 266 Times in 199 Posts
    Rep Power
    77

    Default

    Cheers Chris... Welcome to EduGeek and thanks for sharing that nugget... It all helps

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Tip:: WHM transfer : files get written blank?
    By contink in forum Web Development
    Replies: 0
    Last Post: 24-09-2008, 09:59 PM
  2. Subversion
    By Jackd in forum Coding
    Replies: 4
    Last Post: 18-08-2008, 11:47 AM
  3. Replies: 6
    Last Post: 07-04-2008, 07:10 PM
  4. Cpanel 11 - spam assassin & memory
    By contink in forum *nix
    Replies: 6
    Last Post: 22-09-2007, 11:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts