Ralph

HowTo: Install Fedena in Ubuntu 12.04

Introduction

user

Ralph

Ralph is a car enthusiast, blogger, author and teacher. In addition to being the founder of this website, Ralph is also a Linux Systems Administrator with 9 years+ experience who is also available for freelance or full-time work.


LATEST POSTS

The whole system that we live in drills into us… 23rd September, 2018

Canvas LMS: Install QTI Migration Tool 08th August, 2017

General

HowTo: Install Fedena in Ubuntu 12.04

Posted on .

“Fedena is an open source school management software developed on the Ruby on Rails framework. It is a web 2.0 web application developed by Foradian Technologies. Fedena is a cloud based school ERP software used in schools for administration purposes.”

In this tutorial, you will learn how to install Fedena on Ubuntu 12.04. I will be using a Virtual Private Server (VPS) hosted at DigitalOcean. I have also successfully installed Fedena on Linode using the following instructions. As with all my guides, I’ll try to be as simple as possible, providing detailed explanation for every step. Tag along (:

Fedena is written in Ruby, so we need to setup a Ruby environment. You should have a VPS setup running Ubuntu 12.04 and your root login details ready.

Update: 28/11/2014:
I’ve written a shell script to automate the installation. To use that, go here, otherwise continue reading.

Upgrade Ubuntu

The first step to running a secure and stable web server is to ensure you’re running the latest software. You can do this on Ubuntu using the following command:

apt-get update && apt-get upgrade -y

Setup a Rails Environment

Ruby, Rubygems, Rails and other dependencies can be installed with this command:

apt-get install ruby1.8 rails rubygems

To install Fedena, we need the following versions of software:

  • Rails 2.3.5
  • ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
  • Rubygems 1.3.7

Update rubygems to 1.3.7

gem install rubygems-update -v=1.3.7
update_rubygems --version=1.3.7

Update Rails to version 2.3.5 (Be patient)

gem install rails -v=2.3.5 --no-ri --no-rdoc

At this stage, we should confirm we have the required versions installed:


rails -v
gem -v
ruby -v

Verify the results with the versions above. Should everything checkout, you’re ready to move to the next step.

Database Backend Support (MySQL)

Fedena uses MySQL for it’s databases, so we need a database server running on our VPS:

apt-get install mysql-server mysql-client libmysql-ruby

Remember to save the mysql password you set during installation as you will need it later, and perhaps much later for other MySQL related work on your server.

Download Fedena

Download the Fedena Bundle Patched source code:

We download Fedena to a new directory “fedena”, under /var.


mkdir -p /var/fedena && cd /var/fedena
wget http://projectfedena.org/download/fedena-bundle-linux -O fedena.zip
unzip fedena.zip

–Update–
A few readers have complained about very slow download times. I’ve uploaded a replica of Fedena v2.3 to this server. To use that with the wget command, do:

wget http://cdn.n3rve.com/secure/dl/fedena/2.3/fedena_2.3.zip --user=fedena23 --password='vEf879AC5vp44Ab'

I like things tidy so after the file has been shipped to the server and extracted, I get rid of unnecessary directory structures and situate all files at ./var/fedena:

You can use the ls or dir command to confirm the directory names. In my case, it was “fedena-v2.3-bundle-linux”. Now, change directory into “fedena-v2.3-bundle-linux” using the cd command.

cd fedena-v2.3-bundle-linux

Move its entire content to /var/fedena with:

mv * ../

Delete the former directory and the downloaded zip file. It won’t hurt to leave them there but we don’t need them anymore.

cd ../
rm –rf fedena-v2.3-bundle-linux
rm fedena.zip

Update DB Connection Credentials

The database.yml file is a configuration script that contains the required information to establish a connection between your installation of Fedena and the database server, in this case, the MySQL server. This file is located in the config directory inside Fedena’s root, that would be /var/fedena/config/database.yml

If you need a powerful SSH/SFTP tool, I recommend Bitvise SFTP.

For most users, you would only need to change the password from “foradian” to whatever you set in the MySQL setup stage above. After the change has been made, save the file and upload (overwrite) the copy on the server.

Note: For security reasons, it is NOT advisable to use the root MySQL user for applications that don’t require it as that would give such an application unprecedented root access to the MySQL server. You can create a new database/user and use that in Fedena instead.

Install Additional Gems

Open a terminal console and navigate to the fedena source directory. We are going to install some additional gems. You should have rake <10.3.2> which was installed as a dependency earlier. You can check your rake version with the gem list command. We need version 0.8.7 of rake.

To downgrade, we do the following:

gem uninstall rake

Answer “Y” to the prompts and then install version 0.8.7:

gem install rake -v 0.8.7

If you do not downgrade rake, you may end up with an error like this:

rake aborted!
ERROR: ‘rake/rdoctask’ is obsolete and no longer supported. Use ‘rdoc/task’ (available in RDoc 2.4.2+) instead.
/var/fedena/Rakefile:8

Now, install the gems:

gem install i18n -v 0.4.2
gem install rush -v 0.6.8
rake gems:install

Create the Database & Tables

From the Fedena source directory in a terminal console run:

rake db:create
rake db:migrate
rake fedena:plugins:install_all

Change permissions for scripts

Grant executable permissions for the files:

chmod +x script*

Start Fedena

If everything played out well, you are ready to run the fedena server. From the Fedena source directory (/var/fedena), execute the following:

script/server

Navigate to http://<your-server-ip>:3000 and login with the default credentials (admin / admin123) for username / password.

profile

Ralph

Ralph is a car enthusiast, blogger, author and teacher. In addition to being the founder of this website, Ralph is also a Linux Systems Administrator with 9 years+ experience who is also available for freelance or full-time work.

Navigation