From Karnataka Open Educational Resources
Jump to: navigation, search

Fedena is an open source school management software developed on the Ruby on Rails framework. This is currently being used by the Education Department of Government of Kerala to automate the system and process of over 15,000 schools in the state and is named as Sampoorna.

Installation instructions on Kalpavriksha(Edubuntu 12.04) are given below --

1. Log in and create deployer account with sudo access. Then, log in to that account. Run the following:

sudo adduser deployer sudo adduser deployer sudo su deployer cd ~

2. Install the dependency. Run the following:

sudo apt-get -y install wget curl build-essential sudo apt-get -y install bison openssl zlib1g clang sudo apt-get -y install libxslt1.1 libssl-dev libxslt1-dev make sudo apt-get -y install libxml2 libffi-dev libyaml-dev sudo apt-get -y install libxslt1-dev autoconf libc6-dev sudo apt-get -y install libreadline6-dev zlib1g-dev sudo apt-get -y install libcurl4-openssl-dev sudo apt-get -y install libtool libcurl4-openssl-dev sudo apt-get -y install libssl-dev apache2-prefork-dev sudo apt-get -y install libapr1-dev libaprutil1-dev make

3. Install sqlite. Run the following:

sudo apt-get -y install libsqlite3-0 sqlite3 libsqlite3-dev libmysqlclient-dev

4. Install a image resizing and cropping tool. Run the following:

sudo apt-get -y install libmagickwand-dev imagemagick

5. Install git. Run the following:

sudo apt-get -y install git-core

6. Install apache2. Run the following:

sudo apt-get -y install apache2

7. Install mysql server. Run the following:

sudo apt-get -y install libmysqlclient-dev mysql-server mysql-client

8. Install RVM. Run the following:

curl https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer | bash -s stable

curl -#L https://get.rvm.io | bash -s stable –autolibs=4 –ruby source /home/deployer/.rvm/scripts/rvm echo `source ~/.bashrc` >> ~/.bash_login . ~/.bash_login

9. Install the missing dependency. Run the following:

rvm requirements

10. Install Ruby 1.8.3. Run the following:

rvm install ruby-1.8.7-p371 rvm alias create default ruby-1.8.7-p371

11. Install the required fedena gems. Run the following:

echo “gem: –no-ri –no-rdoc” >> ~/.gemrc gem install bundler gem install rails -v 2.3.5 gem install i18n -v 0.4.2 gem install declarative_authorization -v 0.5.1 gem install mysql -v 2.8.1 gem install rake -v 0.8.7 gem install rush -v 0.6.8 gem install passenger

12. Downgrade ruby gem. Run the following:

gem update –system 1.4.2

13. Make the production environment. Run the following:

echo `export RAILS_ENV=production` >> ~/.bashrc source ~/.bashrc

14. Check rake version. Run the following:

gem list rake -d

15. Write this down. In my case it is rake 10.1.0.

16. Modify the following lines by modifying the path to your installed ruby and by replacing the rake version with the one you noted in the last step.

rm /home/deployer/.rvm/gems/ruby-1.8.7-p371@global/bin/rake rm /home/deployer/.rvm/gems/ruby-1.8.7-p371@global/cache -rf rm /home/deployer/.rvm/gems/ruby-1.8.7-p371@global/gems/rake-10.1.0/ -rf rm /home/deployer/.rvm/gems/ruby-1.8.7-p371@global/specifications/rake-10.1.0.gemspec -rf source ~/.bashrc

17. Remove the latest rake which is been installed. Run the following (with your changes from step 16):

rm /home/deployer/.rvm/gems/ruby-1.8.7-p371@global/bin/rake rm /home/deployer/.rvm/gems/ruby-1.8.7-p371@global/cache -rf rm /home/deployer/.rvm/gems/ruby-1.8.7-p371@global/gems/rake-10.1.0/ -rf rm /home/deployer/.rvm/gems/ruby-1.8.7-p371@global/specifications/rake-10.1.0.gemspec -rf source ~/.bashrc

18. Check rake version:

gem list rake -d.

19. The the results only contain 0.8.7 than move to next step. Otherwise go back to step 16.

20. Install the fedena and move to the directory. Run the following:

wget http://www.projectfedena.org/download/fedena-github -O fedena.zip unzip fedena.zip && mv projectfedena-fedena* fedena/ && cd fedena

21. Replace mypassword with your database root password in the following command lines:

wget https://raw.github.com/passion8/fedena-install/master/ymlwriter.rb ruby ymlwriter.rb mypassword rm ymlwriter.rb

22 . Run the following (with your changes from step 21):

wget https://raw.github.com/passion8/fedena-install/master/ymlwriter.rb ruby ymlwriter.rb mypassword rm ymlwriter.rb

23. Create the Fedena database. Run the following:

rake db:create

24. If it is says that it is not able to make the database because of server incorrect credentials , then go back to step 21.

25. Install plugins and its associated tables. Run the following:

rake fedena:plugins:install_all

26. Make the script executable and run the following (make sure you are in the Fedena source directory):

chmod +x script/* gem install passenger passenger-install-apache2-module

27. Follow the instructions and restart the “passenger-install-apache2-module” as many times as you need to until it completes.

28. Install missing gems. Run the following:

gem install i18n -v 0.4.0 gem install -v=2.3.5 rails

Start the Fedena Server

1. Log off and log in to deployer

2. Start Fedena. Run the following:

cd fedena script/server

NOTE: If you want the server to stop, press Ctrl+C

3. Access your new Fedena Installation: Open Firefox or any browser and go to