PDA

View Full Version : Setting up Subversion on Bluehost


birdsnare
02-21-2008, 07:28 PM
I know this has been discussed before, but I wanted to post the following code for getting Subversion up and running on Bluehost. If you have ssh access, simply cut and paste the following code, and it should create an src directory in your home directory, download the appropriate packages, and install apr, apr-util, neon, and subversion.

Remember to hit enter after the last 'make install" is pasted.


cd ~
mkdir src
cd ~/src
wget http://www.gtlib.gatech.edu/pub/apache/apr/apr-util-1.2.12.tar.gz
wget http://www.gtlib.gatech.edu/pub/apache/apr/apr-1.2.12.tar.gz
wget http://subversion.tigris.org/downloads/subversion-1.4.6.tar.gz
wget http://www.webdav.org/neon/neon-0.28.0.tar.gz
tar -xzf apr-util-1.2.12.tar.gz
tar -xzf apr-1.2.12.tar.gz
tar -xzf subversion-1.4.6.tar.gz
tar -xzf neon-0.28.0.tar.gz
cd ~/src/apr-1.2.12
./configure --prefix=$HOME LDFLAGS="-L/lib64"
make
make install
cd ~/src/apr-util-1.2.12
./configure --prefix=$HOME --with-apr=$HOME LDFLAGS="-L/lib64"
make
make install
cd ~/src/neon-0.28.0
./configure --enable-shared --prefix=$HOME LDFLAGS="-L/lib64"
make
make install
cd ~/src/subversion-1.4.6
./configure --prefix=$HOME --without-berkeley-db --with-zlib --with-ssl LDFLAGS="-L/lib64"
make
make install

Believer
02-22-2008, 06:59 AM
Thanks, thats great. I just setup CentOS 5 on an extra machine at home to mirror my bluehost site and give myself a real dev server other than xampp (which is great also by the way). The next step was going to be subversion ....
~ Cheers!
:D

birdsnare
02-22-2008, 10:15 AM
Thanks, thats great. I just setup CentOS 5 on an extra machine at home to mirror my bluehost site and give myself a real dev server other than xampp (which is great also by the way). The next step was going to be subversion ....
~ Cheers!
:D

I will give a caution. I installed it once, on one server, and it worked. I tried it another time on another server for a friend of mine, and apr-util broke on the ldflags. So, use with caution...

datnus
02-23-2008, 07:20 PM
Thanks so much, birdsnare.
It works!!! :D

MarcoBarbosa
03-14-2008, 12:37 AM
nice! :D



so now what?

subversion is installed..and...
how can i link a project in /www to it?

where's the svn link?

I'm trying to figure it out here ^^

EDIT: Ok, so i did the create and imported after a lot of struggle
still doesn't commit but that's another story =P
Thanks for the post

PromoPlays
03-14-2008, 04:56 AM
Thanks! Works Great

jhuerta
04-03-2008, 09:23 PM
nice! :D

so now what?

subversion is installed..and...
how can i link a project in /www to it?

where's the svn link?

I'm trying to figure it out here ^^

EDIT: Ok, so i did the create and imported after a lot of struggle
still doesn't commit but that's another story =P
Thanks for the post

Hi,
I have SVN installed and a repository created! :D

My question is ... how to checkout my repository?

- svn --version

svn, version 1.4.6 (r28521)
compiled Apr 3 2008, 20:43:14

Then, these are the steps I did to get my repository done and protected:
- htpasswd -c /home/Path_to_password_file newuser
With this I created a password file to give access to my SVN Folder
- svnadmin create /home/path_to_my_repository
With this, I created my repository
- Now, Im trying to include this in my .httaccess to access my repository (using tortoise of any other client):

<Location /svn>
DAV svn
SVNPath /home/path_to_repository
AuthType Basic
AuthName "Subversion Repository!"
AuthUserFile /home/path_to_password_file
Require valid-user
</Location>

Anyway ... this is not working (it messed the whole site actually). I havent been able to checkout my repository (nor commit, but that will come later) ...

Any help? How to access my repository once it is created?

thanks,

Juan

mepp
04-24-2008, 09:39 PM
Thanks for the detailed and accurate instructions birdsnare! They worked fine.

However, I ended up with a svn client that could not access a repository stored on another server (no support for repository URLs that use http protocol). So, I dug around and found this message in the build:

You have neon version 0.28.0,
but Subversion needs neon 0.25.5.

I changed the instructions to use version 0.25.5, and now I have a svn client that can use my repository. Here are the steps I used:

cd ~
mkdir src
cd ~/src
wget http://www.gtlib.gatech.edu/pub/apache/apr/apr-util-1.2.12.tar.gz
wget http://www.gtlib.gatech.edu/pub/apache/apr/apr-1.2.12.tar.gz
wget http://subversion.tigris.org/downloads/subversion-1.4.6.tar.gz
wget http://www.webdav.org/neon/neon-0.25.5.tar.gz
tar -xzf apr-util-1.2.12.tar.gz
tar -xzf apr-1.2.12.tar.gz
tar -xzf subversion-1.4.6.tar.gz
tar -xzf neon-0.25.5.tar.gz
cd ~/src/apr-1.2.12
./configure --prefix=$HOME LDFLAGS="-L/lib64"
make
make install
cd ~/src/apr-util-1.2.12
./configure --prefix=$HOME --with-apr=$HOME LDFLAGS="-L/lib64"
make
make install
cd ~/src/neon-0.25.5
./configure --enable-shared --prefix=$HOME LDFLAGS="-L/lib64"
make
make install
cd ~/src/subversion-1.4.6
./configure --prefix=$HOME --without-berkeley-db --with-zlib --with-ssl LDFLAGS="-L/lib64"
make
make install

swamy
05-15-2008, 08:47 AM
Hi Birdsnare,

I am swamy, I have one doubt in subversion , I installed the subversion in my centos5,it is accessed by the apache , whenever I do ing some configuration and run the apache i got below error "Syntax error on line of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/mod_dav_svn.so into server: /usr/lib/libsvn_fs_base-1.so.0: undefined symbol: db_create" I searched for this in net but i am not getting any solution, if u know the solution please send , it is very urgent.


Thanks

hardy101
07-24-2008, 07:52 PM
I had to get rid of --with-zlib before the .configure command would execute properly. Kept getting the error: "--with-zlib requires an argument". Once I got rid of that switch, it worked! Thanks everyone!

emorikawa
07-25-2008, 10:13 PM
As many of you are quickly finding out, merely installing subversion is not the end of the story to creating a robust, sharable, source-controlled experience on BlueHost. I have scoured through the internet and found numerous extremely good resources that can help you get things running smoothly from start to finish.

First of all, here's an overview of what we hope to accomplish and why:

Install Subversion on BlueHost via SSH access -- This will allow us to both use svn commands from within the BlueHost shell and allow us to serve our repository to the outside world.
Setup and svn+ssh tunnel to our Subversion server -- Since BlueHost doesn't natively support serving subversion repositories to the outside world through Apache, we are going to have to access our repositories through an ssh tunnel
Import existing projects into repository -- We will take our existing projects and import them into subversion so that they can be source controlled.
Setup synchronization between our repository and live site -- Since subversion places its source-controlled files in its own special directories, we need a way to push changes to the directory to the live site (the one in public_html) automatically. We do this through Subversion's post-commit hook.
(In a following post) Setup commit emails to notify users when commits happen to the repository -- We all want to know when our source changes. By using subversion's mailer.py, we can email ourselves commit logs.


By the time we are done, you will be able to checkout your BlueHost repository to your local computer, edit your files locally, check them in, and see your changes instantly on the internet; all with the wonderful magic of Subversion source control!

Okay, enough long-winded introduction. Here we go.

1. Install Subversion on BlueHost
This is the part that this post (and others on bluehostforums) have answered very very well.

Bottom line, GO HERE (However, you should install subversion 1.5 instead of 1.4): http://www.tabruyn.com/site/life/55-tortoisesvn-subversion-and-bluehost
This guy is AMAZING! He gets you all the way to checkout and adding files from BlueHost through Subversion.

NOTE: You should get subversion 1.5 instead of 1.4.6. You should also read Tom's comment at the bottom of the page if things aren't working properly.


2. Get Connected to Your BlueHost Subversion Repository
Once again, tabruyn.com has all the answers for this one!
http://www.tabruyn.com/site/life/55-tortoisesvn-subversion-and-bluehost


3. Import Existing Projects Into Repository
This, unfortunately is where tabruyn.com is of no more help.

I am assuming that you will have existing projects that you wish to put under source control. Luckily, subversion makes this very easy via the import command. Just run the following command in a terminal on your BlueHost account.

If you want to import a specific project, subdomain, or addon domain into the repository, you can do something like this:
svn import /home/USER/public_html/MYWEBSITE file:///home/USER/svn/MYREPOSITORY/MYWEBSITE --message="Importing mywebsite"

You could also source control your entire public_html folder. If you wanted to do that, you could type in something like this:
svn import /home/USER/public_html/ file:///home/USER/svn/MYREPOSITORY/ --message="Importing mywebsite"


4. Synchronize Repository and Live Site
Now we have a problem where we want to update our live site automatically whenever we commit to our repository. (Remember the actual repository files will not be in your public_html directory) To do this, we will utilize Subversion's hooks; specifically the post-commit hooks. To read more about hooks, see the links at the bottom of this sub-section.

Here is how I got the hooks working properly on BlueHost:
BACKUP YOUR ENTIRE SITE BEFORE YOU DO ATTEMPT THIS SECTION.

What we will do now is go into our public_html folder and delete anything that has already been imported into subversion. We will then checkout all of that stuff. That way, public_html will be a subversion controlled image of our actual repository. We can then update public_html through a hook script whenever we commit to the repository.

Make sure that your website folder is imported into subversion (see previous sub section). For this tutorial, let's assume that I put ~/public_html/MYWEBSITE into subversion. When, I did this, I told subversion to place the contents of MYWEBSITE in an svn project located at /home/USER/svn/MYREPOSITORY/MYWEBSITE

Delete anything in public_html that I added to subversion:

cd ~/public_html
rm -rf MYWEBSITE

Now run svn checkout:

svn checkout file:///home/USER/svn/MYREPOSITORY/MYWEBSITE /home/USER/public_html/MYWEBSITE

If you put your entire public_html folder under source control, you can execute pretty much the same thing, except you don't specifiy MYWEBSITE.

To test to see if this is working, navigate into your public_html/MYWEBSITE folder and run svn info

Okay, now that we have that configured, we need a way to essentially run svn update from within your public_html folder everytime someone commits something. To do this, we will use a commit hook.

navigate to the hooks directory of your svn repository:

cd ~/svn/MYREPOSITORY/hooks

In here you will find template files for various types of hooks you can enable. We are interested in post-commit.tmpl. The .tmpl files are just templates, they are not the actual hooks. To make the actual hook, simply do the following:

cp post-commit.tmpl post-commit

Now we need to edit post-commit. Open it up in some shell text editor. You can use something like vi, vim, or nano.

Scroll down to the bottom and comment in (add a '#' character) the commit-email.pl and the log-commit.py lines. The entire file should be completely commented in.

Now we are going to add the line that updates our source-controlled live site. Since the hooks REMOVE ALL ENVIRONMENT VARIABLES, we need to give an absolute path to the svn command (which should be installed in a bin directory within your /home/USER folder) and the absolute path to your live site that you wish to update. The following is an example line that assumes I am updating a single project folder on my live site.
/home/USER/bin/svn update /home/USER/public_html/MYWEBSITE

Save the file. Be sure it is executable. If it is not, you can type:chmod a+x post-commit.

To test it, manually execute the script and pass it some arguments:
./post-commit /home/USER/svn/MYREPOSITORY 1
You should also change something in your repository by updating something from your local machine and committing it. If it automatically updated your live site as well, then your hook is working properly.

Here are a bunch of resources on SVN hooks, that really helped me out:
http://subversion.tigris.org/faq.html#website-auto-update
http://svnbook.red-bean.com/nightly/en/svn.reposadmin.create.html#svn.reposadmin.create.h ooks

In a post immediately following this, I will explain how to setup a commit email. I couldn't fit it in this post because I exceeded the 10,000 character limit :)


Final Thoughts:
PLEASE POST UPDATES TO THIS POST IF SOMETHING IS INCORRECT.

I hope this helps everyone out there on BlueHost get subversion up and running. It is a significantly better and more robust way to code and I think you'll find it will make your life better.

As a side note, I also recommend setting up a local testing server to try out your new stuff before committing. In this setup, commits go directly to your live website. If your a bit crazy (like me) then you can manually install and configure PHP, Apache, and MySQL on your local machine. Otherwise if you're running windows you can just use XAMPP (http://www.apachefriends.org/en/xampp.html)

You can also modify this setup to have the automatic commit hook update a dev site. You can then manually trigger an update on your live site when dev looks good. If you want a well documented alternative to how subversion is done on shared hosting plans, look here:
http://wiki.dreamhost.com/Subversion

emorikawa
07-25-2008, 10:18 PM
In my post titled "Setting up Subversion from START to FINISH and all the steps in between", I promised explaining how to send automatic commit emails. Well here it is. PLEASE REPLY TO THE POST IF ANYTHING IS INCORRECT.


5. Automatically Send Commit Emails
One final cool thing you can do with the post-commit hook is send yourself or other collaborators emails whenever a commit happens to the repository. The way you used to do this was with the commit-email.pl script, but this has been deprecated and replaced by mailer.py.

You need to get these scripts and place them somewhere in your home directory. I put them into a folder in my home directory called hook-scripts:

mkdir ~/hook-scripts
cd ~/hook-scripts
wget http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/mailer/mailer.py
wget http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/mailer/mailer.conf.example

Copy the mailer.conf.example and modify it:
cp mailer.conf.example mailer.conf

Open up mailer.conf and do the following things:

uncomment (remove '#') the line that says: mail_command = /user/sbin/sendmail
modify the from_addr field
modify the to_addr field

Close and save the file when you're done

Test the mailer.py file by running the script like this:
python mailer.py commit /home/USER/svn/MYREPOSITORY 1 mailer.conf

If it works, awesome! Skip to the bottom of the section where we edit the post-commit file again.

When I tried to run it, I got an error message that said "You need version 1.5.0 or better of the Subversion Python bindings."

To fix this Python bindings problem, I navigated to where I unzipped subversion (in my case it was ~/src/subversion-1.5.0) and ran the following commands:

make swig-py
make check-swig-py
make install-swig-py

The output of this installation told me that it dumped a bunch of python source in /home/USER/lib/svn-python. In order for python to properly load those files, we need to set our PYTHONPATH environment variable. I did this with the following line (be sure to include the standard library in the path):

export PYTHONPATH=/usr/lib64/python2.3:/home/USER/lib/svn-python

Now test the mailer.py again. It should not spit out errors and you should get an email in your email that you set in the mailer.conf file.

Okay, last step. Now we need to add this to our post-commit file.

Navigate to your post-commit file again
cd ~/svn/MYREPOSITORY/hooks

Edit it and add the following lines to the bottom of the file:

export PYTHONPATH=/usr/lib64/python2.3:/home/USER/lib/svn-python
/bin/python /home/USER/SCRIPTDIR/mailer.py commit "$REPOS" "$REV" /home/USER/SCRIPTDIR/mailer.conf

Remember that post-commit clears all environment variables before it runs.

Okay, change some stuff on your repository, commit it, check to see whether your live-site updated and check to see whether you have an email.

If you did everything correctly it all (knock on wood) should work!

mhJr_
09-09-2008, 08:58 PM
http://www.avxf.com/img18.jpg Emorikawa,
Thank you so much! I was about to go stir crazy. :D

dgonzalez9207
09-15-2008, 05:36 PM
Hello,
I tried your code on my bluehost account but i get the following error when it gets to the last commands cd ~/src/subversion-1.4.6
./configure --prefix=$HOME --without-berkeley-db --with-zlib --with-ssl LDFLAGS="-L/lib64"
make
make install

I get this error
[usportsp@box457 ~]$ cd ~/src/apr-util-1.2.12
[usportsp@box457 apr-util-1.2.12]$ ./configure --prefix=$HOME --with-apr=$HOME LDFLAGS="-L/lib64"
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking for working mkdir -p... yes
APR-util Version: 1.2.12
checking for chosen layout... apr-util
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
Applying apr-util hints file rules for x86_64-unknown-linux-gnu
checking for APR... yes
setting CPP to "gcc -E"
adding "-pthread" to CFLAGS
setting CPPFLAGS to " -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE"
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /ramdisk/bin/grep
checking for egrep... /ramdisk/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for ldap support...
checking for default DBM... sdbm (default)
checking libpq-fe.h usability... yes
checking libpq-fe.h presence... yes
checking for libpq-fe.h... yes
checking for PQsendQueryPrepared in -lpq... yes
setting APRUTIL_EXPORT_LIBS to "-lpq"
setting APRUTIL_LIBS to "-lpq"
checking sqlite3.h usability... yes
checking sqlite3.h presence... yes
checking for sqlite3.h... yes
checking for sqlite3_open in -lsqlite3... yes
adding "-lsqlite3" to APRUTIL_EXPORT_LIBS
adding "-lsqlite3" to APRUTIL_LIBS
checking sqlite.h usability... no
checking sqlite.h presence... no
checking for sqlite.h... no
checking Expat 1.95.x... yes
adding "-lexpat" to APRUTIL_EXPORT_LIBS
adding "-lexpat" to APRUTIL_LIBS
checking iconv.h usability... yes
checking iconv.h presence... yes
checking for iconv.h... yes
checking for type of inbuf parameter to iconv... char **
checking for iconv.h... (cached) yes
checking langinfo.h usability... yes
checking langinfo.h presence... yes
checking for langinfo.h... yes
checking for nl_langinfo... yes
checking for CODESET in langinfo.h... yes
checking for library containing crypt... -lcrypt
checking if system crypt() function is threadsafe... no
checking for crypt_r... yes
checking style of crypt_r... struct_crypt_data
adding "/home1/usportsp/lib/libapr-1.la" to APRUTIL_LIBS
adding "-luuid" to APRUTIL_LIBS
adding "-lrt" to APRUTIL_LIBS
adding "-lcrypt" to APRUTIL_LIBS
adding "-lpthread" to APRUTIL_LIBS
adding "-ldl" to APRUTIL_LIBS
configure: creating ./config.status
config.status: creating Makefile
config.status: creating export_vars.sh
config.status: creating build/pkg/pkginfo
config.status: creating apr-util.pc
config.status: creating apu-1-config
config.status: creating include/private/apu_select_dbm.h
config.status: creating include/apr_ldap.h
config.status: creating include/apu.h
config.status: creating include/apu_want.h
config.status: creating test/Makefile
config.status: creating include/private/apu_config.h
config.status: include/private/apu_config.h is unchanged
config.status: executing default commands
[usportsp@box457 apr-util-1.2.12]$ make
make[1]: Entering directory `/home1/usportsp/src/apr-util-1.2.12'
/bin/sh /home1/usportsp/build-1/libtool --silent --mode=link gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -I/home1/usportsp/src/apr-util-1.2.12/include -I/home1/usportsp/src/apr-util-1.2.12/include/private -I/home1/usportsp/include/apr-1 -version-info 2:12:2 -L/lib64 -o libaprutil-1.la -rpath /home1/usportsp/lib buckets/apr_buckets_pipe.lo buckets/apr_buckets_flush.lo buckets/apr_buckets_alloc.lo buckets/apr_buckets_pool.lo buckets/apr_buckets_socket.lo buckets/apr_buckets_heap.lo buckets/apr_buckets_simple.lo buckets/apr_buckets_file.lo buckets/apr_buckets.lo buckets/apr_buckets_mmap.lo buckets/apr_buckets_eos.lo buckets/apr_brigade.lo buckets/apr_buckets_refcount.lo crypto/apr_sha1.lo crypto/uuid.lo crypto/getuuid.lo crypto/apr_md5.lo crypto/apr_md4.lo dbm/apr_dbm.lo dbm/apr_dbm_berkeleydb.lo dbm/apr_dbm_gdbm.lo dbm/apr_dbm_ndbm.lo dbm/apr_dbm_sdbm.lo dbm/sdbm/sdbm_pair.lo dbm/sdbm/sdbm.lo dbm/sdbm/sdbm_hash.lo dbm/sdbm/sdbm_lock.lo encoding/apr_base64.lo hooks/apr_hooks.lo ldap/apr_ldap_url.lo ldap/apr_ldap_option.lo ldap/apr_ldap_init.lo misc/apr_reslist.lo misc/apu_version.lo misc/apr_date.lo misc/apr_rmm.lo misc/apr_queue.lo uri/apr_uri.lo xml/apr_xml.lo strmatch/apr_strmatch.lo xlate/xlate.lo dbd/apr_dbd.lo dbd/apr_dbd_mysql.lo dbd/apr_dbd_sqlite2.lo dbd/apr_dbd_sqlite3.lo dbd/apr_dbd_pgsql.lo -luuid -lrt -lcrypt -lpthread -ldl -lpq -lsqlite3 -lexpat /home1/usportsp/lib/libapr-1.la -luuid -lrt -lcrypt -lpthread -ldl
/usr/lib/libexpat.so: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make[1]: *** [libaprutil-1.la] Error 1
make[1]: Leaving directory `/home1/usportsp/src/apr-util-1.2.12'
make: *** [all-recursive] Error 1
[usportsp@box457 apr-util-1.2.12]$ cd ~/src/subversion-1.4.6
[usportsp@box457 subversion-1.4.6]$ ./configure --prefix=$HOME --without-berkeley-db --with-zlib --with-ssl LDFLAGS="-L/lib64"
configure: Configuring Subversion 1.4.6
configure: creating config.nice
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for egrep... grep -E
checking whether ln -s works... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for static Apache module support... no
checking for Apache module support via DSO through APXS... found at /usr/local/apache/bin/apxs
checking httpd version... recent enough
configure: Apache Portable Runtime (APR) library configuration
checking for APR... yes
checking APR version... 1.2.12
configure: Apache Portable Runtime Utility (APRUTIL) library configuration
checking for APR-util... no
configure: WARNING: APRUTIL not found
The Apache Portable Runtime Utility (APRUTIL) library cannot be found.
Either install APRUTIL on this system and supply the appropriate
--with-apr-util option

or

get it with SVN and put it in a subdirectory of this source:

svn co \
http://svn.apache.org/repos/asf/apr/apr-util/branches/0.9.x \
apr-util

Run that right here in the top level of the Subversion tree,
then run autogen.sh again.

configure: error: no suitable APRUTIL found


What should I do at this point??
Thanks

mouly
09-20-2008, 12:31 PM
I'm also getting the error "/usr/lib/libexpat.so: could not read symbols: File in wrong format" while attempting to install SVN.

I ran the exact code given in the first post of this thread. In the final step, when I run make install, I get the error message.

Any help is appreciated.

badreligion
10-09-2008, 01:29 AM
I came to a solution for this:

append

--with-expat=builtin

EDIT: The above will only work up until Subversion. I am still working at that but I think the answer is going to be compiling expat src.

cd $HOME
wget http://downloads.sourceforge.net/expat/expat-2.0.1.tar.gz?modtime=1181083143&big_mirror=0
tar xzf expat-2.0.1.tar.gz
cd expat-2.0.1
./configure --prefix=$HOME LDFLAGS="-L/lib64"
make; make install

Although I prefer to use ~/usr/local. Keeps the home directory cleaner, and makes things a bit more natural.

Still trying to figure out how to get Subversion to compile using these expat libraries as there is no --with-expat argument.

I'll post if I resolve this! Jeez all this and all I want is client functionality! Maybe I should just make an rsync script :rolleyes:

EDIT: Ok kiddos here it is!

Do everything I said above with expat, then go back into subversion-1.4.6

./configure --prefix=${HOME}
cp libtool libtool.backup
sed 's/sys_lib_search_path_spec=" /sys_lib_search_path_spec=" ${HOME}/lib /1' libtool.backup > libtool
make; make install

If you get errors about apache or apxs at the end and you do not need to integrate subversion with apache then try this:

./configure --prefix=${HOME} --without-apache --without-apxs --disable-mod-activation

Then don't forget to rerun that sed command!

Because I'm a vi addict I also did --with-editor=vim :D

If you are like me and didn't throw all this to your home directory, then just replace each ${HOME} with the directory name you are using like ~/usr/local(but expand the path). Just make sure you preserve the spaces in the sed script. Like this:

sed 's/sys_lib_search_path_spec=" /sys_lib_search_path_spec=" /home1/username/usr/local/lib /1'

I'll be glad to answer and questions but I can't be responsible for anyone that doesn't read thoroughly or only knows how to copy paste.

BadReligion

VictorR
10-10-2008, 07:28 AM
Does anyone have one big script for all these commands. It is always easier to upload and just run.

chufuong
10-11-2008, 07:02 PM
Does anyone have one big script for all these commands. It is always easier to upload and just run.http://top5choices.com/wh_bh.jpg

it's probably better to do them 1 by 1 so that you can watch for errors, or you could just put them all in notepad, then copy and paste it into the shell and it will run all of it anyways.

Abel1337
10-22-2008, 02:30 PM
Remember to hit enter after the last 'make install" is pasted.



I was almost pulling my hair out until I remembered this^^. Thanks!
http://images.mydetaileddetail.com/img/491/a08f1005jpfv/tongue.gif

VictorR
10-23-2008, 11:12 AM
Thanks a lot for tutorial.
I installed svn and was able to create repository. It works with keys and TortoiseSVN. I have the following question:
I want several developers to be able to use my repository. But I don't want to give them access to all of my my hosting account via ssh. Is it possible?

WebWorker
10-25-2008, 10:51 PM
Just some notes as I am working my way through getting SVN working on my account. I followed the tutorial located here (http://www.tabruyn.com/site/life/55-tortoisesvn-subversion-and-bluehost)

Here is my edited code which installs the most updated version of SVN

cd ~
mkdir src
cd ~/src
wget http://www.gtlib.gatech.edu/pub/apache/apr/apr-util-1.2.12.tar.gz
wget http://www.gtlib.gatech.edu/pub/apache/apr/apr-1.2.12.tar.gz
wget http://subversion.tigris.org/downloads/subversion-1.5.4.tar.gz
wget http://www.webdav.org/neon/neon-0.28.0.tar.gz
tar -xzf apr-util-1.2.12.tar.gz
tar -xzf apr-1.2.12.tar.gz
tar -xzf subversion-1.5.4.tar.gz
tar -xzf neon-0.28.0.tar.gz
cd ~/src/apr-1.2.12
./configure --prefix=$HOME LDFLAGS="-L/lib64"
make
make install
cd ~/src/apr-util-1.2.12
./configure --prefix=$HOME --with-apr=$HOME LDFLAGS="-L/lib64"
make
make install
cd ~/src/neon-0.28.0
./configure --enable-shared --prefix=$HOME LDFLAGS="-L/lib64"
make
make install
cd ~/src/subversion-1.5.4
./configure --prefix=$HOME --without-berkeley-db --with-ssl LDFLAGS="-L/lib64"
make
make install


I also removed the "--with-zlib" option because it was causing an error on my box.

The command I used to create my repository

svnadmin create $HOME/svn/myrepositoryname


The command I used to check my repository (The verbose flag will actually list something even though your repository is empty at this point)

svn list --verbose svn+ssh://username@domain.com/home/homedir/svn/myrepositoryname


Instead of needing to install WinSCP, you can also use Filezilla (http://filezilla-project.org/) as your SSH/FTP client to download the keys.

I have been using SuperVersion (http://www.superversion.org) because it was easy to learn and install on a Windows machine, but now I want to learn a real CVS. Anyway, here is a cheatsheet I found for SVN commands (http://www.abbeyworkshop.com/howto/misc/svn01/)

PS Thanks emorikawa for the help on how to import existing code into the repository! (http://forums.bluehost.com/showpost.php?p=57878&postcount=11)

mikedelgrosso
11-18-2008, 08:27 AM
Thanks a lot for tutorial.
I installed svn and was able to create repository. It works with keys and TortoiseSVN. I have the following question:
I want several developers to be able to use my repository. But I don't want to give them access to all of my my hosting account via ssh. Is it possible?

I'm interested in this as well. There should be a way to set up access to the repos by a url like http://svn.mydomain.com/svn/myproject and setting up authorized users with a name and pwd. I think this would involve work to be done on the account outside of what we have access to. This is a guess. If anyone has any info on this, please respond.

Thanks!