Fedena intallation and Configuration on CentOS 6/RHEL 6
Fedena has got two versions. Fedena Open source and Fedena Pro.
Fedena Open source is the community version of Fedena which is available for
free download from www.projectfedena.org. Fedena
Pro is a completely different product built on top of Fedena framework. It is
not free.
What are the difference between Fedena Open source and Fedena Pro?
- Fedena Pro has hundreds of features which are not available in Fedena Open source. Currently there are 20+ plugins available in Fedena Pro which is not available in Fedena Open source. More plugins are planned and released frequently.
- Fedena Open source is in Apache License while the add-on modules (plugins) are in EULA (end-user license agreement) or any other license as set by Foradian Technologies.
- Fedena Pro is supported by the developers of Fedena. Fedena Open source is supported by the community.
Free & Open source
Modules
- courses and batches
- human resource
- student attendance
- timetable
- examination
- multiple dashboards
- student admission
- news management
- user management
- school calendar
- finance
- Student Information
- Event Management
- Employee Login
- Teacher Login
- Student/Parent Login
Plugins (Paid)
- Hostel
- Online Examination
- Library
- Poll
- Transportation
- Assignment
- Placement
- Gallery
- Task
- Discussion
- Instant Fee
- Data Management
- Custom report
- Inventory
- Registration
- Moodle Integration
- Video Conferencing
- Google App Integration
- Mobile versions
- Tally integration
- RFID integration
- Biometric integration
- Student, Teacher Blogs
- Discipline
- Custom Import
- Themes
- Fee Import
- Online Exams
Other Modules (Not available
as plugin)
- Automatic timetable generation
- Id card generator
These are steps need to follow for installation :
1. Install MySQL
2. Install Ruby on Rails
3. Install Nginx-Passenger
4. Install Fedena
5. Install Mongrel
6. Install Imagemagick and Rmagick gem
1. Install MySQL
1. Install MySQL with yum:
#yum install mysql-server
2. Start MySQL and ensure that the service starts at the next boot sequence:
#/etc/rc.d/init.d/mysqld start
#chkconfig mysqld on
3. Secure your MySQL instance:
#mysql_secure_installation
4. Log into MySQL:
#mysql -u root -p
5. Create a database fedena and username fedenauser and make sure you grant fedenauser to fedena. (You can replace the database and username):
Mysql>CREATE DATABASE fedena;
mysql>CREATE USER ‘fedenauser’@’localhost’ IDENTIFIED BY ‘fedena@123’;
mysql>GRANT ALL PRIVILEGES ON fedena.* TO ‘fedenauser’;
mysql>exit
6. Restart MySQL:
#service mysqld restart
2. Install Ruby on Rails
You are going to install Ruby on Rails. Fedena needs Rails version 2.3.5 to run.
1. Install the Ruby on Rails packages:
# yum -y install rubygems ruby-devel mysql-devel gcc make gcc-c++ curl-devel
Having some issues during the ruby installation – so use below link to config the ruby2.0.0.0
https://tecadmin.net/install-ruby-1-9-3-or-multiple-ruby-verson-on-centos-6-3-using-rvm/
2. Install Rails version 2.3.5:
# gem install rails -v2.3.5
3. Install the MySQL gems:
# gem install mysql
4. Rake not supported here so u need uninstall the rake 10.0.4 and install the rake 0.8.7
# gem uninstall rake --version 10.0.4# gem install rake --version 0.8.7
Then try
# rails testapp -d mysql
# cd testapp
# vi config/database.yml
development:
adapter: mysql
encoding: utf8
reconnect: false
database: testapp_development
pool: 5
username: root
password: password # set
MySQL password ( set on "xxx_test" and "xxx_production"
field, too )
socket: /var/lib/mysql/mysql.sock
# rake db:create:all //create databases
# script/generate scaffold testapp title:string body:text
# rake db:migrate // create tables
# script/server // start WEBrick
You know have a Rails environment installed. Refer to: http://www.server-world.info/en/note?os=CentOS_6&p=rails if you have problems in this step.
3. Install Nginx – Passenger
1. Install Passenger:
# gem install passenger
2. After you install passenger, you can now install Nginx:
#/usr/bin/passenger-install-nginx-module
During the installation, it will ask you where to place nginx. I decided to put it at /etc/nginx/ though some will use /opt/nginx/.
3. Create a dedicated user to run the nginx process (if you place nginx in /opt/nginx, be sure to change accordingly):
#useradd -M -r --shell /bin/sh --home-dir /etc/nginx nginx
4. You will now need to create the init script for nginx. Create /etc/rc.d/init.d/nginx with the following script (if you place nginx in /opt/nginx, be sure to change accordingly):
# vim /etc/rc.d/init.d/nginx
#!/bin/sh
#
# nginx – this script starts and stops the nginx daemon
#
# chkconfig: - 85 15
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \
# proxy and IMAP/POP3 proxy server
# processname: nginx
# config: /opt/nginx/conf/nginx.conf
# pidfile: /opt/nginx/logs/nginx.pid
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ "$NETWORKING" = "no" ] && exit 0
nginx="/opt/nginx/sbin/nginx"
prog=$(basename $nginx)
NGINX_CONF_FILE="/opt/nginx/conf/nginx.conf"
lockfile=/var/lock/subsys/nginx
start() {
[ -x $nginx ] || exit 5
[ -f $NGINX_CONF_FILE ] || exit 6
echo -n $"Starting $prog: "
daemon $nginx -c $NGINX_CONF_FILE
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
return $retval
}
stop() {
echo -n $"Stopping $prog: "
killproc $prog -QUIT
retval=$?
echo
[ $retval -eq 0 ] && rm -f $lockfile
return $retval
}
restart() {
configtest || return $?
stop
start
}
reload() {
configtest || return $?
echo -n $”Reloading $prog: ”
killproc $nginx -HUP
RETVAL=$?
echo
}
force_reload() {
restart
}
configtest() {
$nginx -t -c $NGINX_CONF_FILE
}
rh_status() {
status $prog
}
rh_status_q() {
rh_status >/dev/null 2>&1
}
case "$1" in
start)
rh_status_q && exit 0
$1
;;
stop)
rh_status_q || exit 0
$1
;;
restart|configtest)
$1
;;
reload)
rh_status_q || exit 7
$1
;;
force-reload)
force_reload
;;
status)
rh_status
;;
condrestart|try-restart)
rh_status_q || exit 0
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload|configtest}"
exit 2
esac
5. Make the script executable and set nginx to boot:
#chmod +x /etc/rc.d/init.d/nginx
#chkconfig --add nginx
#chkconfig nginx on
6. Configure nginx Virtual Hosting:
#mkdir -p /srv/www/example.com/public_html
#mkdir -p /srv/www/example.com/logs
#mkdir /etc/nginx/sites-available/
#ln -s /etc/nginx/sites-enabled/
Below is on nginx.conf stored in /etc/nginx/conf/nginx.conf:
# vim /etc/nginx/conf/nginx.conf
user nginx nginx;
worker_processes 4;
worker_rlimit_nofile 30000;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
passenger_root /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11;
passenger_ruby /usr/bin/ruby;
client_body_timeout 60;
client_body_buffer_size 8k;
client_header_timeout 60;
client_header_buffer_size 1k;
client_max_body_size 10m;
large_client_header_buffers 4 16k;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
include /etc/nginx/sites-enabled/*;
include mime.types;
default_type application/octet-stream;
#log_format main ‘#remote_addr – #remote_user
[#time_local] “#request” ‘
#
‘#status #body_bytes_sent “#http_referer” ‘
#
‘”#http_user_agent” “#http_x_forwarded_for”‘;
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root html;
index index.html index.htm;
}
#error_page 404 /404.html;
# redirect server error pages to the static
page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
# proxy the PHP scripts to Apache listening on
127.0.0.1:80
#
#location ~ \.php# {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server
listening on 127.0.0.1:9000
#
#location ~ \.php# {
#
root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts#fastcgi_script_name;
# include
fastcgi_params;
#}
# deny access to .htaccess files, if Apache’s
document root
# concurs with nginx’s one
#
#location ~ /\.ht {
# deny all;
#}
}
# another virtual host using mix of IP-,
name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;
# location / {
# root html;
# index index.html index.htm;
# }
#}
# HTTPS server
#
#server {
# listen 443;
# server_name localhost;
#
ssl
on;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_timeout 5m;
# ssl_protocols SSLv2
SSLv3 TLSv1;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
# location / {
# root html;
# index index.html index.htm;
# }
#}
}
Below is my nginx server configuration for fedena. Notice that the root is set to the fedena rails app’s public folder:
server {
listen 8080;
server_name example.com;
root /srv/www/example.com/public_html/fedena/public/;
access_log /srv/www/example.com/logs/access.log;
error_log /srv/www/example.com/logs/error.log;
passenger_enabled on;
}
7. Start nginx:
#service nginx start
Congratulations! You now have nginx running with passenger. If you have problems, refer to: http://library.linode.com/lemp-guides/centos-6#sph_compile-nginx-from-source
4. Install Fedena
1. You will now change into your Fedena directory and then grab the latest Fedena source code from github. For some, it may be easier to use links to retrieve Fedena:
#cd /srv/www/example.com/public_html/
#wget http://projectfedena.org/download/fedena-bundle-linux
2. Extract fedena:
#unzip fedena-v2.3-bundler-linux.zip
3. It may be helpful to rename this file to fedena:
# mv fedena-v2.3-bundle-linux fedena
4. Move into the fedena directory:
#cd fedena
5. Now you will configure your fedena database:
#vim config/database.yml
Edit the production details with the following:
database: fedena
username: fedenauser
password: fedena@123(from MySQL – above)
:wq! to save and exit.
6. Install the rest of the gems:
#gem install
declarative_authorization -v 0.5.1
#gem install searchlogic -v 2.4.27
#gem install i18n -v 0.4.2
#gem install bundle
#gem install rush
7. Set up the Fedena database. For the first command, you may see the comment that the database is already created. That is okay.
#rake db:create
#rake db:migrate
#rake fedena:plugins:install_all
8. Change the permissions to the script:
#chmod +x script/*
9. Run the server:
#script/server
If you followed this guide correctly, you should be able to see Fedena at the following URL: http://example.com:3000. Username: admin, Password: admin123.
Control-X to quit.
If you need help and want PDF support, please refer to:http://projectfedena.org/install
5. Install Mongrel
Now to run Fedena in the background without using the above script, you just need to install mongrel:
#gem install mongrel
To start mongrel of port 80, issue the following command:
#mongrel_rails start -p 80 -e production -d
You now will be able to view your Fedena install at http://example.com.
To stop mongrel, issue the following command:
#mongrel_rails stop
If you anticipate many users, you can install and use thin to run 3 mongrel instances. See http://articles.slicehost.com/2009/4/17/centos-nginx-rails-and-thin for more information.
6. Install Imagemagick and Rmagick gem
For some people, they cannot upload pictures to Fedena resulting in a 500 page error. The following will fix this problem.
1. First, if you have ImageMagick already installed, you may be running an older version. You will need to remove it.
#yum remove ImageMagick
#yum install wget tcl-devel libpng-devel libjpeg-devel ghostscript-devel bzip2-devel freetype-devel libtiff-devel
2. Download and install the following ImageMagick RPMs and:
#yum install
ImageMagick
#yum install ImageMagick-devel
#gem install rmagick
Restart mongrel and you should be able to upload the pictures now.
Conclusion
500KB max, 150x110 logo size
You should have a fully running Project Fedena school management system now running on CentOS 6. Be sure to use mysqldump and crontab to regularly back up your Fedena database.



Comments
Post a Comment