+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 25
*nix Thread, Subversion & WHM/Cpanel 11 in Technical; Thought I'd store this here too as I spent the last four hours trying to figure out how to make ...
  1. #1
    contink's Avatar
    Join Date
    Jul 2006
    Location
    South Yorkshire
    Posts
    3,791
    Thank Post
    303
    Thanked 327 Times in 233 Posts
    Rep Power
    118

    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. Thanks to contink from:

    Marci (29th July 2011)

  3. #2
    contink's Avatar
    Join Date
    Jul 2006
    Location
    South Yorkshire
    Posts
    3,791
    Thank Post
    303
    Thanked 327 Times in 233 Posts
    Rep Power
    118
    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.

  4. Thanks to contink from:

    Marci (29th July 2011)

  5. #3
    contink's Avatar
    Join Date
    Jul 2006
    Location
    South Yorkshire
    Posts
    3,791
    Thank Post
    303
    Thanked 327 Times in 233 Posts
    Rep Power
    118
    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

  6. Thanks to contink from:

    Marci (19th June 2009)

  7. #4
    svn
    svn is offline

    Join Date
    Jul 2009
    Posts
    1
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    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?

  8. #5
    contink's Avatar
    Join Date
    Jul 2006
    Location
    South Yorkshire
    Posts
    3,791
    Thank Post
    303
    Thanked 327 Times in 233 Posts
    Rep Power
    118
    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...

  9. #6
    contink's Avatar
    Join Date
    Jul 2006
    Location
    South Yorkshire
    Posts
    3,791
    Thank Post
    303
    Thanked 327 Times in 233 Posts
    Rep Power
    118
    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.

  10. Thanks to contink from:

    Marci (29th July 2011)

  11. #7
    contink's Avatar
    Join Date
    Jul 2006
    Location
    South Yorkshire
    Posts
    3,791
    Thank Post
    303
    Thanked 327 Times in 233 Posts
    Rep Power
    118
    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

  12. Thanks to contink from:

    Marci (29th July 2011)

  13. #8

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

    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

  14. 2 Thanks to chrisjenx2001:

    contink (8th June 2010), Marci (29th July 2011)

  15. #9
    contink's Avatar
    Join Date
    Jul 2006
    Location
    South Yorkshire
    Posts
    3,791
    Thank Post
    303
    Thanked 327 Times in 233 Posts
    Rep Power
    118
    Cheers Chris... Welcome to EduGeek and thanks for sharing that nugget... It all helps

  16. #10

    Join Date
    Oct 2010
    Posts
    2
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    A more detailed, step-by-step, tutorial can be found here:
    Subversion 1.6 on cPanel-WHM 11 with CentOS 5.5 and EasyApache 3.2

  17. #11

    Join Date
    Mar 2011
    Location
    Stafford
    Posts
    2
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Hi,
    I have setup third party SVN unfuddle with cPanel hosting as dev server, you could visit my blog, thanks.


    thanks

  18. #12

    Join Date
    Mar 2011
    Location
    Stafford
    Posts
    2
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Hi,
    sorry for floodig, I have setup third party SVN unfuddle with cPanel hosting as dev server, you could visit my blog, thanks.

    Here is the link:
    Linux, Open Source, Fedora, Ubuntu, BlackBerry, PPP Modem, Codefighters: unfuddle SVN setup with CPanel Shared hosting for small developer team

  19. #13
    contink's Avatar
    Join Date
    Jul 2006
    Location
    South Yorkshire
    Posts
    3,791
    Thank Post
    303
    Thanked 327 Times in 233 Posts
    Rep Power
    118
    Updated Chrisjenx2001 instructions for the version to date:

    Apache 2.2.19
    Subversion 1.6.17

    Code:
    cd /home/downloads/svn
    wget http://subversion.tigris.org/downloads/subversion-1.6.17.tar.gz
    wget http://subversion.tigris.org/downloads/subversion-deps-1.6.17.tar.gz
    tar xfvz subversion-1.6.17.tar.gz
    tar xfvz subversion-deps-1.6.17.tar.gz
    cd subversion-1.6.17/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.19/srclib/apr-util --with-neon=/usr/local/neon/ --with-ssl
    make
    make install

  20. Thanks to contink from:

    Marci (29th July 2011)

  21. #14

    Join Date
    Aug 2011
    Posts
    3
    Thank Post
    2
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Great thread. Thanks

    Just a note for anyone with the same issue I had.
    when doing make of subversion I got the error
    /usr/lib/libexpat.so: could not read symbols: File in wrong format
    The problem is that the make use the 32bit version of libexpat while I am running CentOS 64bit.
    Removing the 32bit libs solved the problem
    Code:
    yum remove glibc-devel.i386 expat-devel.i386

  22. #15

    Join Date
    Aug 2011
    Posts
    1
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    What do the permissions and owner need to be when running suPHP? Having it set for useraccount:useraccount does not work. I can create and import under root but it not with tortoise using http. I keep getting permision denied errors. I have tried many combinations of uid:grp but something always fails. I tried nobody:nobody, useraccount:nobody, root:root, and combinations of these.
    Environment is Centos 5.6 with latest WHM/Cpanel.

    Somebody please help, I know this will work because I have had it set up in the past. It is driving me nuts!



SHARE:
+ Post New Thread
Page 1 of 2 12 LastLast

Similar Threads

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

Thread Information

Users Browsing this Thread

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

Posting Permissions

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