Upgrading gitlab to latest stable version

This is based on the gitlab installation described here. cd /home/git/gitlab sudo -u git -H git pull sudo -u git -H git branch -a This should give you a list of available branches. You should probably checkout the latest stable branch: sudo -u git -H git checkout 6-7-stable Install the gems: sudo -i git -H bundle install –deployment –without […]

Grow ext4 or xfs partitions to its maximum size

For EXT4 partitions: resize2fs /dev/xvda1 For XFS: xfs_growfs -d /dev/xvda1 Replace xvda1 with the partition of your choice! I ran into this problem using AWS instances in which I had to increase the size of the root partitions of an EBS volume. Type df -h to show your currently mounted partitions and disk usage.

Installing Gitlab on Debian

First install these packages to resolve all dependancies: apt-get install -y build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev curl git-core openssh-server redis-server checkinstall libxml2-dev libxslt-dev libcurl4-openssl-dev libicu-dev logrotate python python-docutils Install Ruby 2.0: cd /tmp wget tar -xvpf ruby-2.0.0-p247.tar.gz cd ruby-2.0.0-p247 ./configure make make install Install Bundler: gem install bundler Create the git […]

Calculating the size of your S3 bucket using Python

For the following script you need to have installed Python >= 2.6 and Boto: apt-get install -y python-boto Next create a file ~/.boto containing the following lines: [Credentials] region = us-east-1 aws_access_key_id = YOUR_ACCESS_KEY_ID aws_secret_access_key = YOUR_SECRET_ACCCESS_KEY Put in the AWS credentials to access your bucket Then create the script, replace NAME_OF_YOU_BUCKET with your actual […]

Segmentation Fault using Zend Server with SSL and Curl

Using the apache module mod_ssl and the php extension curl may result in apache not running. Usually there's something like this in the logs: seg fault or similar nasty error detected in the parent process It took me quite a while to figure out how to get this working nevertheless, perhaps I can save someone else's time!! […]

Installing libssl0.9.8 on Debian Wheezy

Sometimes you run into the problem that libraries or packages are linked against libssl0.9.8, but the default version on Wheezy is libssl1.0.0. You can simply install the Squeeze package on Debian Wheezy like this (also having already installed libssl1.0.0): wget dpkg -i libssl0.9.8_0.9.8o-4squeeze14_amd64.deb

Using automysqlbackup to create regular backups of your database

This works on Debian and Ubuntu, but also on other distributions. The package can be installed via apt: apt-get install automysqlbackup For yum (Fedora, CentOS, RedHat, etc.) there's usually also a package provided. Next you need to edit the configuration file /etc/default/automysqlbackup. There are other options, the most important ones are: USERNAME=root PASSWORD=…….. DBHOST=localhost DBNAMES=`mysql –defaults-file=/etc/mysql/debian.cnf […]

Backups to S3 using Duplicity

First install Duplicity with its dependancies: apt-get install haveged python-paramiko python-boto python-gobject-2 duplicity Then generate a gpg key: gpg −−gen-key The output might be like this (just confirm everything with return and keep aside the password you'll have to enter): gpg (GnuPG) 1.4.12; Copyright (C) 2012 Free Software Foundation, Inc. This is free software: you […]

Configuring Nginx for WordPress

A typical Vhost file (for example /etc/nginx/sites-available/default) would look like this: server {   listen   80;   server_name  YOUR_SERVER_NAME;   access_log  /var/log/nginx/access.log;   root /var/www;   index index.php;   location / {    index index.php;    try_files $uri $uri/ /index.php?q=$uri&$args;   }   location ~ \.php$ {               […]