*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 ...
-
4th November 2008, 06:06 PM #1 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.
-
-
IDG Tech News
-
19th June 2009, 04:13 PM #2 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.
-
-
19th June 2009, 06:34 PM #3 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:
- Main >> Service Configuration >> Apache Configuration
- In the "Pre Main Include" select your current version
- 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
-
-
28th July 2009, 08:14 AM #4
- 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?
-
-
28th July 2009, 06:22 PM #5 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...
-
-
8th February 2010, 11:44 PM #6 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:
- Main >> Service Configuration >> Apache Configuration
- In the "Pre Main Include" select your current version
- 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.
-
-
27th March 2010, 10:23 PM #7 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
-
-
8th June 2010, 01:06 AM #8
- 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
-
2 Thanks to chrisjenx2001:
contink (8th June 2010), Marci (29th July 2011)
-
8th June 2010, 01:17 AM #9 Cheers Chris... Welcome to EduGeek and thanks for sharing that nugget... It all helps
-
-
22nd October 2010, 07:48 AM #10
- Rep Power
- 0
-
-
19th March 2011, 06:36 AM #11
- Rep Power
- 0
Hi,
I have setup third party SVN unfuddle with cPanel hosting as dev server, you could visit my blog, thanks.
thanks
-
-
19th March 2011, 06:37 AM #12
- 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
-
-
26th July 2011, 06:15 PM #13 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
-
-
15th August 2011, 10:10 AM #14
- 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
-
-
24th August 2011, 08:13 PM #15
- 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: 
Similar Threads
-
By contink in forum Web Development
Replies: 0
Last Post: 24th September 2008, 09:59 PM
-
Replies: 4
Last Post: 18th August 2008, 11:47 AM
-
By contink in forum Hardware
Replies: 6
Last Post: 7th April 2008, 07:10 PM
-
Replies: 6
Last Post: 22nd September 2007, 11:58 PM
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
-
Forum Rules