gitlabhq/gitlabhq — Issue #285: Installation Guide for Debian Squeeze
Author: farazyashar
Created: 2012-01-12 00:03:10+00:00
State: open

There might be a few dependencies I'm forgetting... but otherwise this worked perfectly. :)

1. Setup sudo

```bash
su
apt-get install sudo
# Run visudo to check for '%sudo ALL=(ALL) ALL'
usermod -a -G sudo [username]
exit
```
2. Install ruby 1.9.2-p290 as a self-built package

```bash
sudo apt-get install -y wget curl gcc checkinstall libxml2-dev libxslt-dev sqlite3 libsqlite3-dev libcurl4-openssl-dev libc6-dev libssl-dev libmysql++-dev make build-essential zlib1g-dev autoconf readline-common openssl
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p290.tar.gz
tar xfvz ruby-1.9.2-p290.tar.gz
cd ruby-1.9.2-p290
autoconf
./configure --prefix=/usr/local --with-openssl-dir=/usr --with-readline-dir=/usr --with-zlib-dir=/usr
make
sudo checkinstall -D make install
```

Answer the prompts as you find fit.
Verify that the correct version of Ruby is installed `ruby --version`
You can uninstall ruby easily with `dpkg -r ruby-1.9.2`

3. Install Gitolite
Generate an ssh key: `ssh-keygen -t rsa`

Then follow directions at https://github.com/gitlabhq/gitlabhq/wiki/Gitolite

4. Install Packages for gitlabhq

```bash
sudo apt-get install python-dev python-pip sendmail-bin sendmail redis-server libicu-dev
sudo pip install pygments
sudo gem install bundler
```

The default sendmail.mc file in Squeeze causes errors when generating a configuration file. Replace /etc/mail/sendmail.mc with this [gist](https://gist.github.com/1597385) and run `sudo sendmailconfig` as necessary.

5. Following the steps 4-7 on the [gitlabhq Ubuntu installation wiki](https://github.com/gitlabhq/gitlabhq/wiki/Ubuntu)

Create a new project, say yes at the prompt; and we have a winner. :)