Thursday, 15 September 2011

INSTALL GITORIOUS ON UBUNTU

Another install script, this time to automate the install of Gitorious on Ubuntu 11.04 Server. This is based on the instructions at coding-journal, if it wasn't for Lucas I'd be completely lost with this installation.

As always, this should be run on a bare-bones install of Ubuntu 11.04. There's not a lot of error catching here, and it will require some interaction on your part -so read through the script to make sure you understand what's happening before you continue. You should really do this with any script you haven't written yourself anyway.

It's best to install the server, then ssh in and run the script because there's a couple of steps
that'll be much easier if you can copy/paste.

Running this script as root (sudo sh <scriptname>) against a base 11.04 server install should
have you up and running without any additional fiddling around. Let me know if you see a better way
to do this, or find any glaring errors.

3 comments:

Elie said...

Thanks a lot for your script, it worked almost directly.

I had to install

"sudo apt-get install libxslt-dev libxml2-dev"

otherwise a gem wouldn't build.

After that I had to run

bundle install
bundle pack
bundle install –path vender/cache

in gitorious directory.

I had to redo the db:migrate part too.

Now it works like a charm, thank you.

Bill Crossley said...

I'm trying to get this up and going today on a VMware image. Taking your suggestions seems to help so far, and I'm going to incorporate them into the script.

Also found it helpful to install openssh package with ubuntu server at the beginning.

How did you handle the Postfix configuration?

Jonathan said...

I'm getting the following errors.
I'm new to most of this, so if you answer, please explain a bit, thanks :)

******************************************************************************
ERROR: cannot find MySQL include files.

Check that you do have MySQL include files installed.
The package name is typically 'mysql-devel'.

If include files are installed on your system, but you are still getting
this message, you should do one of the following:

1) either specify includes location explicitly, using --with-mysql-includes;
2) or specify MySQL installation root location explicitly, using --with-mysql;
3) or make sure that the path to 'mysql_config' program is listed in
your PATH environment variable.

To disable MySQL support, use --without-mysql option.
******************************************************************************

gitorious_install: 90: git: not found
cd: 98: can't cd to /var/www/gitorious/doc/templates/ubuntu/
update-rc.d: /etc/init.d/git-daemon: file does not exist

gitorious_install: 110: gem: not found