Subversion on shared hosting

Wed, 08/08/2012 - 23:31 -- Arisen

I found this script that has been compiled by several people over the years and different version that will install subversion on a shared hosting server.


### installation ###
mkdir src
cd src

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

tar -xjvf subversion-1.6.11.tar.bz2
tar -xjvf subversion-deps-1.6.11.tar.bz2
cd subversion-1.6.11

cd apr
./configure -enable-shared -prefix=$HOME
make
make install

cd ../apr-util
./configure -enable-shared -prefix=$HOME -with-expat=builtin -with-apr=$HOME -without-berkeley-db
make
make install

cd ../neon
./configure -enable-shared -prefix=$HOME -with-libs=$HOME -with-ssl
make
make install

cd ../
./configure -prefix=$HOME -without-berkeley-db -with-apr=$HOME -with-apr-util=$HOME -with-neon=$HOME -without-apxs -without-apache
make
make install

### add PATH of SVN to your user/account ###

cd ~
echo "PATH=\$PATH:\$HOME/bin/" >> .bashrc
echo "export PATH" >> .bashrc
source .bashrc

### create folder structure ###

mkdir svn
cd ~/svn
mkdir tmpdir
cd tmpdir
mkdir trunk
mkdir branches
mkdir tags

### create repository ###
svnadmin create /{HOME DIRECTORY}/{YOUR ACCOUNT NAME}/svn -fs-type fsfs
svn import . file:///{HOME DIRECTORY}/{YOUR ACCOUNT NAME}/svn -message ‘Initial repository structure’
rm -rf tmpdir

### grab user creation script ###
#cd ~
#wget www.sharpstep.com/Articles/HostMonster-svn/create_svn_user.sh
#chmod a+x create_svn_user.sh

#### create SVN user ###
#./create_svn_user username user_public_key

# clean up source
rm -rf src

* Reminder to change: {HOME DIRECTORY} to your directory ie: home6 and {YOUR ACCOUNT NAME} to your account name ie: johnsmith