How to setup subersion on cPanel????

gflamerich

Well-Known Member
Jul 21, 2003
122
0
166
Hi

Can anyone reply this thread with a simple how-to install subversion???

There are some threads around, but no one has instructions or has deprecated info (now that Cpanel has apache2) ......

Thanks in advance
 

gflamerich

Well-Known Member
Jul 21, 2003
122
0
166
Maybe I wasn't specific enough, yes, subversion install is as simple as yum install, but apache modules for subversion aren't so easy to install. We are still trying to compile subversion modules with apache2 ... there is a thread that has some instructions, but we are not able to compile the modules with the instructions posted. (here is the post http://forums.cpanel.net/showthread.php?p=349890 )
 

hightekhosting

Active Member
Aug 12, 2007
27
0
51
We were only just actually wondering the same thing ourselves.

Is subversion and trac support going to be included in cPanel at all by default/compile into apache?
 

gflamerich

Well-Known Member
Jul 21, 2003
122
0
166
Hi, hightekhosting
We don't think this wont be possible in the near future. I'm posting the answer from cPanel support when asking for help on writing a rule to include subversion for the EA3.

I don't believe it's possible to add custom modules like this to easyapache at this time. While it's possible to specify custom configure flags or such, third-party modules like this will need to be built manually after easyapache is run or with a posteasyapache script.
So, we did it manually. Here are the instructions we follow.

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

cd subversion-1.5.0

./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

/scripts/ensure_vhost_includes --user=username
/scripts/rebuildhttpdconf
/scripts/restartsrv_httpd


We create a custom conf for the account using the new EA3 feature:
/etc/httpd/conf/userdata/std/2/username/svn.domain.com
La siguiente info:
<Location /Smarty>
DAV svn
SVNPath /home/username/svn/test
AuthType Basic
AuthName "test Repository"
AuthUserFile /home/username/svn/passwd
Require valid-user
</Location>
 

websnail.net

Active Member
Mar 24, 2002
40
1
308
Having looked through the instructions it seems some of this information is in the wrong order... I could be wrong... anyway.. re-written to be a bit clearer. Correction/comment welcome.

(snip stuff for installing subversion from source)

Create the svn_custom.conf using the new EA3 feature as described here:
http://www.cpanel.net/support/docs/ea/ea3/customdirectives.html
/etc/httpd/conf/userdata/std/2/[username]/[subdomain?].[domain]

<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



EDIT: One part left out completely...

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... otherwise it just won't work.

As I said... comment / correction welcome...
 
Last edited:

peconi

Active Member
Mar 27, 2005
28
0
151
I have one problem though,

/home/cpeasyapache/src/httpd-2.2.9/srclib/apr-util

does not exist.

I got no httpd source in this src directory... The only thing I got there is PHP.

Also, when put the last 2 directives into the apache include file - it cannot find the .so files associated with them (which is most likely due to inability to compile SVN without the apr-util)...

I also tried installing svn via yum install svn - but the dav .so were not there.
 

peconi

Active Member
Mar 27, 2005
28
0
151
Actually I figured out my previous problem, however this is the error I get when trying to Load modules into apache:

Code:
An error occurred while running: /usr/local/apache/bin/httpd -DSSL -t -f /usr/local/apache/conf/httpd.conf Exit signal was: 0 Exit value was: 1 Output was: --- httpd: Syntax error on line 29 of /usr/local/apache/conf/httpd.conf: Syntax error on line 1 of /usr/local/apache/conf/includes/pre_main_2.conf: Cannot load /usr/local/apache/modules/mod_dav_svn.so into server: /usr/local/apache/modules/mod_dav_svn.so: undefined symbol: dav_register_provider ---
Any help is appreciated ;)
 

markusikkk

Member
Sep 26, 2006
7
0
151
Poland
I have the very same thing problem.

ERROR:
An error occurred while running: /usr/local/apache/bin/httpd -DSSL -t -f /usr/local/apache/conf/httpd.conf Exit signal was: 0 Exit value was: 1 Output was: --- httpd: Syntax error on line 29 of /usr/local/apache/conf/httpd.conf: Syntax error on line 1 of /usr/local/apache/conf/includes/pre_main_2.conf: Cannot load /usr/local/apache/modules/mod_dav_svn.so into server: /usr/local/apache/modules/mod_dav_svn.so: undefined symbol: dav_register_provider ---
 

peconi

Active Member
Mar 27, 2005
28
0
151
I think you need to recompile Apache through Easy Apache 3 - and include mod_dav and mod_svn... Then it will know what they mean.
 

eljefe

Registered
Apr 2, 2009
2
0
51
Unable to compile with ra_dav module

I've installed Neon and I am trying to install Subversion to allow for ra_dav connections to Subversion, but I cannot seem to get this to work. CentOS 5.3 with cPanel:

Code:
cd /usr/local/src/

wget http://www.webdav.org/neon/neon-0.28.4.tar.gz

tar xvf neon-0.28.4.tar.gz

mv neon-0.28.4/ neon

cd neon

./configure --with-ssl --with-pic --enable-shared

make && make install

cd ../subversion-1.5.0

make clean

./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 --with-ssl --with-neon=/usr/local

make && make install

/usr/local/bin/svn --version
svn, version 1.5.0 (r31699)
   compiled Apr  3 2009, 10:16:27

Copyright (C) 2000-2008 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_svn : Module for accessing a repository using the svn network protocol.
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme
Can anyone tell me what I am doing wrong so that I can get the ra_dav to work?
 

joemaller

Registered
Apr 6, 2009
1
0
51
nyc
Unless it's your server and you're installing as an admin, you need the prefix. Otherwise make will attempt to install somewhere you don't have permission to write to. I'm surprised you're not seeing errors about that.

Try adding the prefix to all components of the installation and linking to the libraries you compiled in your own home folder.

Also, what you're doing here isn't installing Subversion for cPanel, you're installing a personal binary of Subversion that cPanel won't know anything about. There's nothing wrong with that, but this probably isn't the best place to be asking about it.
 

eljefe

Registered
Apr 2, 2009
2
0
51
Solved

SOLVED. Required "subversion-deps" apparently, which took me much to long to figure out:

As root:

cd /usr/local/src/subversion

wget http://subversion.tigris.org/downloads/subversion-deps-1.5.0.tar.bz2

tar -xvjf subversion-deps-1.5.0.tar.bz2

cd subversion-1.5.0

pwd
/usr/local/src/subversion/subversion-1.5.0/

make clean

./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 --with-ssl

make

make install

[email protected] [/usr/local/src/subverison/subversion-1.5.0]# svn --version
svn, version 1.5.0 (r31699)
compiled Apr 6 2009, 10:58:39

Copyright (C) 2000-2008 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
- handles 'http' scheme
- handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
- handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
- handles 'file' scheme
* ra_serf : Module for accessing a repository via WebDAV protocol using serf.
- handles 'http' scheme
- handles 'https' scheme
 

websnail.net

Active Member
Mar 24, 2002
40
1
308
Just a little nugget that I learned the hard way today..

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 :)
 

vonneffdoberman

Registered
Jun 29, 2009
1
0
51
okay everyone.. I am new to this, so please bear with me.

I have a script called phpfox and I need to install ffmpeg, mplayer, ,etc...

and I guess I need to install subversion to make this work.

The install directions I have are this:

Following are the steps to install FFmpeg + FFmpeg-PHP + Mplayer + Mencoder + flv2tool + LAME MP3 Encoder + Libog on a Linux server or VPS Hosting Manually. There are many automated scripts available which install these but its better to do it manually as in case of an error occuring during the installation process, we can stop the installation and fix them. These steps also include the common fixes for such errors.

Quote:
cd /usr/local/src/

DOWNLOAD MODULES

wget www3.mplayerhq.hu/MPlayer/releases/codecs/essential-20061022.tar.bz2
wget rubyforge.org/frs/download.php/9225/flvtool2_1.0.5_rc6.tgz
wget easynews.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz
wget superb-west.dl.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.5.1.tbz2
wget downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz
wget downloads.xiph.org/releases/vorbis/libvorbis-1.1.2.tar.gz

EXTRACT MODULES

tar zxvf lame-3.97.tar.gz
tar zxvf libogg-1.1.3.tar.gz
tar zxvf libvorbis-1.1.2.tar.gz
tar zxvf flvtool2_1.0.5_rc6.tgz
tar jxvf essential-20061022.tar.bz2
tar jxvf ffmpeg-php-0.5.1.tbz2

mkdir /usr/local/lib/codecs/

yum install gcc gmake make libcpp libgcc libstdc++ gcc4 gcc4-c++ gcc4-gfortran subversion ruby ncurses-devel -y

DOWNLOAD FFMPEG and MPLAYER

svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
cd /usr/local/src/mplayer

svn update

cd /usr/local/src/
mv /usr/local/src/essential-20061022/* /usr/local/lib/codecs/
chmod -R 755 /usr/local/lib/codecs/

LAME:

cd /usr/local/src/lame-3.97
./configure
make && make install

LIBOGG

cd /usr/local/src/
cd /usr/local/src/libogg-1.1.3
./configure --enable-shared && make && make install
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
export PKG_CONFIG_PATH

LIBVORBIS

cd /usr/local/src/
cd /usr/local/src/libvorbis-1.1.2
./configure && make && make install

FLVTOOL2

cd /usr/local/src/
cd /usr/local/src/flvtool2_1.0.5_rc6/
ruby setup.rb config
ruby setup.rb setup
ruby setup.rb install

MPLAYER

cd /usr/local/src/
cd /usr/local/src/mplayer
./configure && make && make install

cd /usr/local/src/

FFMPEG:

cd /usr/local/src/ffmpeg/
./configure --enable-libmp3lame --enable-libvorbis --disable-mmx --enable-shared
make
make install

export LD_LIBRARY_PATH=/usr/local/lib/

ln -s /usr/local/lib/libavformat.so.50 /usr/lib/libavformat.so.50
ln -s /usr/local/lib/libavcodec.so.51 /usr/lib/libavcodec.so.51
ln -s /usr/local/lib/libavutil.so.49 /usr/lib/libavutil.so.49
ln -s /usr/local/lib/libmp3lame.so.0 /usr/lib/libmp3lame.so.0
ln -s /usr/local/lib/libavformat.so.51 /usr/lib/libavformat.so.51

FFMPEG-PHP:

cd /usr/local/src/
cd /usr/local/src/ffmpeg-php-0.5.1/
phpize
./configure
make
make install


NOTICE: Make sure this is the correct php.ini for the box!!

echo 'extension=ffmpeg.so' >> /usr/local/Zend/etc/php.ini

NOTICE: Make sure this is the correct php.ini for the box!!

RESTART APACHE

service httpd restart

**********************************************************

Now when I try to install subversion (yum install subversion) I get this error:

[email protected] [~]# yum install subversion
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
* base: pubmirrors.reflected.net
* updates: mirror.skiplink.com
* addons: chi-10g-1-mirror.fastsoft.net
* extras: mirror.raystedman.net
base 100% |=========================| 1.1 kB 00:00
updates 100% |=========================| 951 B 00:00
addons 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
Excluding Packages in global exclude list
Finished
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package subversion.i386 0:1.4.2-4.el5 set to be updated
--> Processing Dependency: libneon.so.25 for package: subversion
--> Processing Dependency: perl(URI) >= 1.17 for package: subversion
--> Processing Dependency: neon >= 0.25.5-6.el5 for package: subversion
--> Running transaction check
---> Package neon.i386 0:0.25.5-10.el5 set to be updated
---> Package subversion.i386 0:1.4.2-4.el5 set to be updated
--> Processing Dependency: perl(URI) >= 1.17 for package: subversion
--> Finished Dependency Resolution
Error: Missing Dependency: perl(URI) >= 1.17 is needed by package subversion

*********************************************************

So what do I ned to do first, then what?

Please help, I can not find what I need to do, and want to be sure I am doing this correct, since I am learning..

Thanks in advance,

vonneffdobermans
 

Solokron

Well-Known Member
Aug 8, 2003
851
1
168
Seattle
cPanel Access Level
DataCenter Provider
Hmmm.... I am receiving the following from the 1.6.6 install:

configure: WARNING: we have configured without BDB filesystem support


You don't seem to have Berkeley DB version 4.0.14 or newer
installed and linked to APR-UTIL. We have created Makefiles which
will build without the Berkeley DB back-end; your repositories will
use FSFS as the default back-end. You can find the latest version of
Berkeley DB here:
Oracle Berkeley DB Downloads

I've installed it anyhow but it appears it may not be linked to APR-UTIL. What a headache.


Even using:

./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 --with-ssl --without-berkeley-db


results in the same error.

Tried installing apr-util perl module via WHM and received a flood of:

[ error] Can't find dir ''
Please provide the location of the Apache directory:
[ error] Can't find dir ''
Please provide the location of the Apache directory:
[ error] Can't find dir ''

installed via [/usr/src/apr-util-1.3.9]# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/

and then received:
checking for APR... configure: error: the --with-apr parameter is incorrect. It must specify an install prefix, a build directory, or an apr-config file.

wth?

Tried via RPM then in WHM.
apr-util.x86_64

Package apr-util-1.2.7-7.el5_3.2.x86_64 already installed and latest version
Nothing to do
Install Complete

lol what?!


**** Just a heads up.. looks like you can ignore the error and continue with the install anyhow. ****
 
Last edited: