Skip to content

Instantly share code, notes, and snippets.

@the-teacher
Last active August 29, 2015 13:57
Show Gist options
  • Save the-teacher/9563719 to your computer and use it in GitHub Desktop.
Save the-teacher/9563719 to your computer and use it in GitHub Desktop.
Digital ocean - Ubuntu Rails
ssh root@146.185.xxx.xxx
ssh rails@146.185.xxx.xxx
mkdir -p ~/.ssh
cat ~/.ssh/id_rsa.pub | ssh root@146.185.xxx.xxx 'cat >> ~/.ssh/authorized_keys'
cat ~/.ssh/id_rsa.pub | ssh rails@146.185.xxx.xxx 'cat >> ~/.ssh/authorized_keys'
User: rails
$ which nginx
/usr/sbin/nginx
$ which mysql
/usr/bin/mysql
$ which nodejs -v
/usr/bin/nodejs
$ nodejs -v
v0.6.19
$ which rvm
$ which psql
$ which convert
$ which searchd
$ which redis-server
@the-teacher
Copy link
Author

wget http://sphinxsearch.com/files/sphinx-2.1.6-release.tar.gz
tar xvzf sphinx-2.1.6-release.tar.gz
cd sphinx-2.1.6-release

./configure

checkinstall

which searchd
/usr/local/bin/searchd

@the-teacher
Copy link
Author

apt-get install libjpeg-dev libpng-dev libtiff-dev libgif-dev

wget https://webp.googlecode.com/files/libwebp-0.4.0.tar.gz
tar xvzf libwebp-0.4.0.tar.gz
cd libwebp-0.4.0/

./configure
checkinstall

wget http://www.imagemagick.org/download/ImageMagick.tar.gz
tar xvzf ImageMagick.tar.gz
cd ImageMagick-6.8.8-8

./configure
checkinstall

which convert
/usr/local/bin/convert

@the-teacher
Copy link
Author

sudo vi /etc/hosts

146.185.xxx.xxx site.com

http://site.com

@the-teacher
Copy link
Author

ps aux | grep unicorn | grep master

root 720 0.0 1.1 65728 11976 ? Sl Mar14 0:00 unicorn master -D -c /home/unicorn/unicorn.conf -E production

kill 720

@the-teacher
Copy link
Author

/etc/init.d/nginx restart

@the-teacher
Copy link
Author

set BASH SHELL for user rails

chsh -s /bin/bash

echo "source $HOME/.rvm/scripts/rvm" >> ~/.bashrc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment