Skip to content

Instantly share code, notes, and snippets.

View portertech's full-sized avatar

Sean Porter portertech

View GitHub Profile
sudo nano /etc/unicorn.conf
# Rails error pages
location = /500.html {
root /path/to/your/application/current/public;
}
# path for static files
root /path/to/your/application/current/public;
# listen 80 default deferred; # for Linux
# listen 80 default accept_filter=httpready; # for FreeBSD
listen 80 default;
events {
worker_connections 1024; # increase if you have lots of clients
accept_mutex off; # "on" if nginx worker_processes > 1
# use epoll; # enable for Linux 2.6+
# use kqueue; # enable for FreeBSD, OSX
}
sudo nano /etc/nginx/nginx.conf
cd /etc
sudo wget http://dl.dropbox.com/u/2975681/unicorn.conf
sudo wget http://dl.dropbox.com/u/2975681/god.conf
cd /etc/nginx
sudo mv nginx.conf nginx.conf.old
sudo wget http://dl.dropbox.com/u/2975681/nginx.conf
sudo chmod -R 777 /usr/local/src
cd /usr/local/src
wget http://nginx.org/download/nginx-0.7.64.tar.gz
tar -xvzf nginx-0.7.64.tar.gz
cd nginx-0.7.64
./configure --sbin-path=/usr/local/sbin --with-http_ssl_module
make
sudo make install
sudo ln -s /usr/local/nginx/conf /etc/nginx
sudo gem install god unicorn
sudo umount /mnt/raid
sudo mdadm --stop /dev/md0
sudo mdadm --remove /dev/md0
for (( i = 1; i <= 6; i++ )); do sudo mdadm --zero-superblock /dev/sdx${i}; done