I’ve been tasked to add some features (subversion is one of them) under a Virtual Private Server (cPanel WHM) on a Hosting site.

image.axd

First I downloaded and unarchived subversion:

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

Since the last versions are requiring SQLite, I had to download and copy one file from sqlite folder to subversion folder:

cd ..  
wget http://www.sqlite.org/sqlite-amalgamation-3.6.13.tar.gz
tar -xvf sqlite-amalgamation-3.6.13.tar.gz
mkdir subversion-1.6.9/sqlite-amalgamation
cp sqlite-3.6.13/sqlite3.c subversion-1.6.9/sqlite-amalgamation/sqlite3.c
cd subversion-1.6.9
 

Configure, make and install:

./configure –with-apxs=/usr/local/apache/bin/apxs –with-apr=/usr/local/apache/bin/apr-config –with-apr-util=/home/cpeasyapache/src/httpd-2.2.9/srclib/apr-util   \
make    
make install
 

Then creating a repository:

cd /
mkdir svn && cd svn
svnadmin create –fs-type fsfs <repo_name>
 

Create a template for my projects and initialize repository:

mkdir /svntemp
cd /svntemp

mkdir website1
mkdir website1/trunk
mkdir website1/branches
mkdir website1/tags

svn import /svntemp file:///svn/<repo-name> –message "Creating initial repo."

svn list –verbose file:///svn/<repo-name>
 

Create users inside authz file and add them to svnserve.conf. You might want to set anonymous permissions to none.

Access your svn via internet with:

svn://<IP_ADDRESS/HOSTNAME>/svn/<repo_name>/website1/trunk

Voila!

Related posts:

Tags: , , , , ,
4 Responses to “Install subversion for VPS (cPanel) under CentOS”
  1. Setup SVN repository on a shared server | Priyabrata Sarkar says:
  2. Mostanser BillahNo Gravatar says:

    Hi,
    I have setup third party SVN unfuddle with cPanel hosting as dev server, you could visit my blog, thanks.
    Here is the link:
    http://codefighters.blogspot.com/2011/03/unfuddle-svn-setup-with-cpanel-shared.html

  3. andreiashNo Gravatar says:

    @Montaser: backlink approved 😉

Trackbacks
  1. Coupon says:

    Dreamhost…

    […]Install subversion for VPS (cPanel) under CentOS – Andrei DANEASA[…]…

Leave a Reply