Assuming Kerberos is set up, and Apache (or nginx) and MySQL (or other db) are installed, this guide should work fine. NOTE: RVM needs to be installed via sudo, not directly as root.
-
Prepare installation of RVM:
- install build tools such as build-essential
- install git
-
Follow the instructions found here: https://rvm.beginrescueend.com/rvm/install for multi-user install. Although this installs it for all users locally, we need to add the lines specified in step 2 to the top of
/etc/bash.bashrc
, ensuring that rvm and all $PATHs work over ssh. -
rvmsudo rvm install 1.9.2
followed byrvmsudo rvm use --default 1.9.2
. These should make sure that all users are now using ruby 1.9.2 - easily checkable by logging in as a non-root user and doingwhich ruby
(which should include rvm in the path somewhere), orruby -v
. -
sudo gem install rails
. This should install rails 3. -
Install node.js (or some other javascript executable, see https://github.com/sstephenson/execjs for a list of supported runtimes). Node.js has handy source-building instructions available at http://apptob.org.
-
Install the passenger module:
sudo gem install passenger
sudo passenger-install-apache2-module
(or-nginx-module
if nginx is the web server). May be required to install missing software.- Install any dependencies listed for ''Ruby''.
-
Configure Apache/Nginx. Add a virtual host entry (example for apache):
<VirtualHost *:80> ServerName whateveritshouldbecalled DocumentRoot /var/www/foldername/current/public <Directory /var/www/foldername/current/public> Order allow,deny Allow from all Options -MultiViews </Directory> </VirtualHost>
Make sure this host is marked as enabled. It should be noted that only the
/var/www/foldername
needs to be created,current/public
gets created when I deploy the files./var/www/foldername
needs to be world readable, and writable by me (s0700157). -
Create a database, and grant all privileges on it to a new user with a password.
Then I simply need to know the /var/www/foldername
path, the database user and password, and to be able to ssh into the machine. It should all work fine from there!