Setup SVN in Hostmonster Shared Hosting
I’ve had my fair share of installs in shared hosting, but sometimes simple things like SVN can get very tricky with hosting providers like Hostmonster or BlueHost. I hope that this shell will work as well for you as it has for me. Just copy the code and paste into a file on your server (i called mine svninstall.sh) and then to run just execute . .svninstall.sh and you’re off! Comment here if you get and errors and I’d be glad to help. Also if you get stuck, take into consideration that there are other inexpensive web hosting and cloud server hosting companies that you can work with, so before smashing your head against the wall, look around for a better solution.
#!/bin/sh export svn=1.6.9 export ipath=$HOME/tools64/ export dev=$HOME/dev/svn mkdir -p $ipath mkdir -p $dev cd $dev if [ ! -f $dev/subversion-deps-$svn/__download ] ; then rm subversion-deps-$svn.tar.bz2* wget http://subversion.tigris.org/downloads/subversion-deps-$svn.tar.bz2 && \ tar -xjf subversion-deps-$svn.tar.bz2 && \ mv subversion-$svn subversion-deps-$svn && \ touch subversion-deps-$svn/__download rm subversion-deps-$svn.tar.bz2.* fi if [ ! -f $dev/subversion-$svn/__download ] ; then rm subversion-$svn.tar.bz2* wget http://subversion.tigris.org/downloads/subversion-$svn.tar.bz2 && \ tar -xjf subversion-$svn.tar.bz2 && \ touch subversion-$svn/__download rm subversion-$svn.tar.bz2* fi export o=" --prefix=$ipath LDFLAGS="-L$ipath/lib" CPPFLAGS="-I$ipath/include" CFLAGS="-I$ipath/include" " export oapr=" --with-apr=$ipath/bin/apr-1-config " export oapu=" --with-apr-util=$ipath/bin/apu-1-config " export pdep=$dev/subversion-deps-$svn export psvn=$dev/subversion-$svn export PATH=$ipath/bin:$PATH #compile zlib cd $pdep/zlib export CFLAGS='-fPIC' if [ ! -f _done ] ; then make clean ./configure --prefix=$ipath make && touch _done fi make install # compile APR cd $pdep/apr if [ ! -f _done ] ; then make clean ./configure $o make && touch _done fi make install # compile neon cd $pdep/neon if [ ! -f _done ] ; then make clean ./configure $o $oapr make && touch _done fi make install #compile sqlite cd $pdep/sqlite-amalgamation if [ ! -f _done ] ; then make clean ./configure $o $oapr make && touch _done fi make install # compile Berkeley DB cd $pdep if [ ! -f db-5.0.21/__download ] ; then rm db-5.0.21.tar.gz* wget http://download.oracle.com/berkeley-db/db-5.0.21.tar.gz && \ tar -xzf db-5.0.21.tar.gz && \ touch db-5.0.21/__download rm db-5.0.21.tar.gz* fi cd $pdep/db-5.0.21/build_unix if [ ! -f _done ] ; then make clean ../dist/configure $o $oapr make && touch _done fi make install # compile APR-util after Berkeley. This way svn find berkeley automatically cd $pdep/apr-util if [ ! -f _done ] ; then make clean ./configure $o $oapr --with-berkeley-db=$ipath/include:$ipath/lib make && touch _done fi make install # compile serf cd $pdep/serf if [ ! -f _done ] ; then make clean ./configure $o $oapr $oapu make && touch _done fi make install # finaly, build svn cd $psvn if [ ! -f _done ] ; then make clean ./configure $o $oapr make && touch _done fi make install |
