Skip to content

Instantly share code, notes, and snippets.

@nkt
Last active Aug 29, 2015
Embed
What would you like to do?
#!/bin/bash
apt-get update -y
apt-get upgrade -y
apt-get install sudo -y
sudo apt-get install -y vim
sudo update-alternatives --set editor /usr/bin/vim.basic
sudo apt-get install -y build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev curl openssh-server redis-server checkinstall libxml2-dev libxslt-dev libcurl4-openssl-dev libicu-dev logrotate python-docutils pkg-config cmake
sudo apt-get install -y git-core
sudo apt-get -y remove ruby1.8
mkdir /tmp/ruby && cd /tmp/ruby
curl -L --progress ftp://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz | tar xz
cd ruby-2.1.2
./configure --disable-install-rdoc
make
sudo make install
sudo gem install bundler --no-ri --no-rdoc
sudo adduser --disabled-login --gecos 'GitLab' git
# https://github.com/gitlabhq/gitlabhq/blob/master/doc/install/installation.md#4-database
sudo apt-get install -y postgresql postgresql-client libpq-dev
# https://github.com/gitlabhq/gitlabhq/blob/master/doc/install/installation.md#5-redis
sudo apt-get install redis-server
# Configure redis to use sockets
sudo cp /etc/redis/redis.conf /etc/redis/redis.conf.orig
# Disable Redis listening on TCP by setting 'port' to 0
sed 's/^port .*/port 0/' /etc/redis/redis.conf.orig | sudo tee /etc/redis/redis.conf
# Enable Redis socket for default Debian / Ubuntu path
echo 'unixsocket /var/run/redis/redis.sock' | sudo tee -a /etc/redis/redis.conf
# Activate the changes to redis.conf
sudo service redis-server restart
# Add git to the redis group
sudo usermod -aG redis git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment