Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

Server Setup

ryanb edited this page Sep 14, 2011 · 14 revisions

These are the steps I took to set up the RailsCasts site on a Linode with Ubuntu 10.04 LTS installed.

Initial Setup

passwd
aptitude update
locale-gen en_US.UTF-8
/usr/sbin/update-locale LANG=en_US.UTF-8
aptitude safe-upgrade
aptitude full-upgrade
aptitude install build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libxml2-dev libxslt-dev autoconf libexpat1 ssl-cert libcurl4-openssl-dev libaprutil1-dev libapr1-dev mysql mysql-server apache2 apache2.2-common apache2-mpm-prefork apache2-utils apache2-prefork-dev

User Setup

adduser rbates
visudo # rbates   ALL=(ALL) ALL
mkdir -p /var/apps
chown -R rbates:rbates /var/apps
mkdir /home/rbates/.ssh
chown -R rbates:rbates /home/rbates/.ssh
chmod 700 /home/rbates/.ssh
exit

On Local

ssh-copy-id railscasts.com
ssh railscasts.com

Ruby Installation

mkdir ~/src
cd ~/src
wget ftp://ftp.ruby-lang.org//pub/ruby/1.9/ruby-1.9.2-p290.tar.gz
tar -xvzf ruby-1.9.2-p290.tar.gz
cd ruby-1.9.2-p290/
./configure --prefix=/usr/local
make
sudo make install
sudo gem install bundler --no-ri --no-rdoc

Passenger Install

sudo gem install passenger --no-ri --no-rdoc
sudo passenger-install-apache2-module
sudo vim /etc/apache2/apache2.conf # copy as instructed by installer

Sphinx

cd ~/src
wget http://www.sphinxsearch.com/downloads/sphinx-0.9.9.tar.gz
tar xzvf sphinx-0.9.9.tar.gz
cd sphinx-0.9.9
./configure --with-mysql-includes=/usr/include/mysql --with-mysql-libs=/usr/lib/mysql
make
sudo make install

ZSH & Dotfiles

git clone git://github.com/ryanb/dotfiles ~/.dotfiles
cd ~/.dotfiles
rake install
sudo aptitude install zsh
chsh -s /bin/zsh

Postfix Mail Server

sudo aptitude install telnet postfix # choose "Internet Site", leave system mail name at default

Deployment

Then move on to Deployment

Clone this wiki locally