- Setup for a new DigitalOcean/AWS EC2/Linode server.
sudo apt-get update
sudo apt-get install htop
sudo apt-get install tmux
sudo apt-get install vim
sudo apt-get install git
cd
git config --global user.name "Your Name"
git config --global user.email [email protected]
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev
Install Rbenv (Info)
cd
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
exec $SHELL
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bash_profile
exec $SHELL
. .bashrc
. .bash_profile
git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash
rbenv install 2.2.3
rbenv global 2.2.3
ruby -v
echo "gem: --no-ri --no-rdoc" > ~/.gemrc
dpkg --get-selections | grep node
sudo apt-get purge nodejs npm
curl -sL https://deb.nodesource.com/setup | sudo bash -
sudo apt-get install -y nodejs
node -v
npm -v
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
gem install rails -v 4.2.5
rbenv rehash
ruby -v
rails -v
node -v
npm -v
gem install pry
gem install ag
cd
sudo apt-get install postgresql postgresql-contrib libpq-dev
sudo -u postgres createuser -s user_name
sudo -u postgres psql
\password user_name
\q
sudo apt-get update
sudo apt-get install tcl8.5
wget http://download.redis.io/releases/redis-stable.tar.gz
tar xzf redis-stable.tar.gz
cd redis-stable
make
make test
sudo make install
cd utils
sudo ./install_server.sh
You will be prompted to enter some settings for redis configuration. Just hit enter each time to accept the defaults.
redis-cli ping
service redis_6379 start
service redis_6379 stop
apt-get update && aptitude dist-upgrade -y && apt-get autoremove -y
sudo reboot
RAILS_ENV=production rails s -d -b [servers_ip_address] -p 80
cat ~/.ssh/id_rsa.pub | pbcopy
cat ~/.ssh/id_rsa.pub | ssh user_name@your_server_ip 'cat >> .ssh/authorized_keys'
Content hijacked from: