Marci (29th July 2011)
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.
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!<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>
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:
.. then restart apache.Code:LoadModule dav_svn_module modules/mod_dav_svn.so LoadModule authz_svn_module modules/mod_authz_svn.so
One thing to watch out for... if you get an error like this:
... it's because you forgot to add the LoadModule command for the authz_svn_moduleInvalid command 'AuthzSVNAccessFile', perhaps mis-spelled or defined by a module not included in the server configuration"
... 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.
Marci (29th July 2011)
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.
Marci (29th July 2011)
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:
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)Code:# LoadModule dav_svn_module modules/mod_dav_svn.so # LoadModule authz_svn_module modules/mod_authz_svn.so
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:
** 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.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
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![]()
Marci (19th June 2009)
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?
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...
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:
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)Code:# LoadModule dav_svn_module modules/mod_dav_svn.so # LoadModule authz_svn_module modules/mod_authz_svn.so
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:
The make clean gets rid of incompatible libs that would otherwise cause errors during make and make installCode: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
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.
Marci (29th July 2011)
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
Marci (29th July 2011)
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://)
Should be able to copy and paste into your bash session and job done!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
I will make an automated bash installer in the future if enough people request it.
Thanks,
Chris
Cheers Chris... Welcome to EduGeek and thanks for sharing that nugget... It all helps![]()
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
Hi,
I have setup third party SVN unfuddle with cPanel hosting as dev server, you could visit my blog, thanks.
thanks
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
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
Marci (29th July 2011)
Great thread. Thanks
Just a note for anyone with the same issue I had.
when doing make of subversion I got the errorThe problem is that the make use the 32bit version of libexpat while I am running CentOS 64bit./usr/lib/libexpat.so: could not read symbols: File in wrong format
Removing the 32bit libs solved the problem
Code:yum remove glibc-devel.i386 expat-devel.i386
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!
There are currently 1 users browsing this thread. (0 members and 1 guests)