Ubuntu install and tips

This project is maintained by nicolas-brousse

← Go home

Fresh install RUBY/RAILS PROD server

See common installation and configuration before.

Apt-get

Do this operation with root user. Install PosgreSQL and Nginx

$ apt-get install postgresql libpq-dev
$ apt-get install nginx

Backup-manager configurations for PostgreSQL

Add this code at the end of /etc/backup-manager.conf

See: Backup manager

RVM

See rvm.io. (install into a ruby or rails unix user). For production install for all user use sudo

$ \curl -#L https://get.rvm.io | sudo bash -s stable --autolibs=3 --ruby

Update rubygems if you want

$ rvm rubygems current

Edit or create /etc/gemrc file:

install: --no-rdoc --no-ri
update: --no-rdoc --no-ri
gem: --no-rdoc --no-ri

New application

For a better configuration you can create a user by application:

Create user and group:

$ adduser \
  --disabled-password \
  --ingroup rvm \
  --shell /bin/bash \
  --gecos 'Application' \
  --home /home/app_user \
  app_user

Add the user to the rvm group

$ adduser app_user rvm

Now switch to the application user

$ su - app_user

Create a gemset if the application doesn't contain

$ rvm use 2.0.0@rails_app --ruby-version --create

Deploy the app and chose the web server you want


sources:


← Go home