Last active
January 8, 2017 01:58
-
-
Save abelorian/76017c3582cde30b1630347f28bc37c6 to your computer and use it in GitHub Desktop.
Nuevo Server for Rails 5 on Ubuntu 16.04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Dependencias | |
sudo apt-get update | |
sudo apt-get install build-essential libssl-dev curl libcurl3 libreadline-dev libcurl4-openssl-dev libffi-dev libgdbm3 libgdbm-dev nginx | |
# Install Java | |
sudo apt-get install default-jre | |
# NodeJS | |
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - | |
sudo apt-get install -y nodejs | |
# Ruby | |
cd | |
wget http://ftp.ruby-lang.org/pub/ruby/2.3/ruby-2.3.3.tar.gz | |
tar -xzvf ruby-2.3.3.tar.gz | |
cd ruby-2.3.3/ | |
./configure | |
make | |
sudo make install | |
ruby -v | |
#### | |
#[Deprecation Notice] `set :scm, "git"` is deprecated. | |
#To ensure your project is compatible with future versions of Capistrano, | |
#remove the :scm setting and instead add these lines to your Capfile: | |
# require "capistrano/scm/git" | |
# install_plugin Capistrano::SCM::Git | |
# Permission to private key | |
chmod 400 /home/rails/.ssh/id_rsa | |
#Install gems | |
gem install bundler | |
gem install rails -v 5.0.1 | |
# Swap ubuntu 16.04 | |
sudo fallocate -l 2G /swapfile | |
sudo chmod 600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
sudo cp /etc/fstab /etc/fstab.bak | |
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab | |
# Postgres | |
sudo apt-get install postgresql postgresql-contrib postgresql-server-dev-9.5 | |
# PUma manager | |
cd ~ | |
wget https://raw.githubusercontent.com/puma/puma/master/tools/jungle/upstart/puma-manager.conf | |
wget https://raw.githubusercontent.com/puma/puma/master/tools/jungle/upstart/puma.conf | |
# AGREGAR ruta DE app | |
# setuid user | |
# setgid user | |
nano puma.conf | |
sudo cp puma.conf puma-manager.conf /etc/init | |
sudo nano /etc/puma.conf | |
# Edit nginx | |
sudo nano /etc/nginx/sites-available/default | |
# Install upstart for ubuntu 16.04 | |
sudo apt-get install upstart-sysv | |
sudo update-initramfs -u | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment