Skip to content

Instantly share code, notes, and snippets.

@nkt
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nkt/6c44c0d836fe2ab98876 to your computer and use it in GitHub Desktop.
Save nkt/6c44c0d836fe2ab98876 to your computer and use it in GitHub Desktop.
#!/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