Fedena installation guide

The official fedena installation guide is not fully documented and many people are unhappy. I tried myself to help all those peoples. There are two ways to install fedena . automatic and manually. automatic installation not works everytime , but you can give a try first . Vist

  https://www.github.com/passion8/fedena-install/

if it works for you, then its great. Else follow the below manual guide .

  1. Login to your root server and create deployer account with sudo access. And login to that a/c . You can use

    sudo adduser deployer
    sudo adduser deployer sudo
    su deployer 
    cd ~
    
  2. Now install the dependency . Copy the below lines and paste in into terminal one by one

    sudo apt-get update
    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. Now install the sqlite .

    sudo apt-get -y install libsqlite3-0   sqlite3 libsqlite3-dev libmysqlclient-dev
    
  4. Now install image resizing and cropping tool

    sudo apt-get -y install  libmagickwand-dev imagemagick
    
  5. Now install git

    sudo apt-get -y install git-core
    
  6. Now install apache2 

    sudo apt-get -y install apache2
    
  7. Now install mysql server

    sudo apt-get -y install libmysqlclient-dev  mysql-server mysql-client
    
  8. Now install RVM

    curl https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer | bash -s stable
    echo 'source ~/.bashrc' >> ~/.bash_login
    . ~/.bash_login
    
  9. Now install the missing dependency. Do

    rvm requirements
    

    And, install the missing package(s).

  10. Now install Ruby 1.8.3

    rvm install ruby-1.8.7-p371
    rvm alias create default ruby-1.8.7-p371
    echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"' >> ~/.bashrc
    source ~/.bashrc
    
  11. We dont want documentation so do and install the required fedena gems.

    echo "gem: --no-ri --no-rdoc" >> ~/.gemrc
    gem uninstall -i /home/deployer/.rvm/gems/ruby-1.8.7-p371@global bundler
    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 the rubygem

    gem update --system 1.4.2
    
  13. Make the production environmenet

    echo 'export RAILS_ENV=production' >> ~/.bashrc
    source ~/.bashrc
    
  14. Remove the latest rake which is been installed . first check rake version by

    gem list rake -d
    

    Now, remove the latest rake verion . In my case it is rake 10.1.1

    Notice third line, i have used my version. You have to substitute it your rake version
    rm ~/.rvm/gems/ruby-1.8.7-p371@global/bin/rake
    rm ~/.rvm/gems/ruby-1.8.7-p371@global/cache -rf
    rm ~/.rvm/gems/ruby-1.8.7-p371@global/gems/rake-10.1.1/ -rf
    rm ~/.rvm/gems/ruby-1.8.7-p371@global/specifications/rake-10.1.1.gemspec  -rf
    rm -rf /home/deployer/.rvm/gems/ruby-1.8.7-p371@global/gems/rubygems-bundler-1.4.2
    rm -rf /home/deployer/.rvm/gems/ruby-1.8.7-p371@global/specifications/rubygems-bundler-1.4.2.gemspec
    source ~/.bashrc
    

    Now check the rake version by doing rake -v. If it only contains 0.8.7 than move to next step.

  15. Install the fedena and move to the directory

    wget http://www.projectfedena.org/download/fedena-github -O fedena.zip
    sudo apt-get -y install unzip
    unzip fedena.zip && mv projectfedena-fedena* fedena/  && cd fedena
    
  16. I wrote one script which will update the fedena database file to your root password.please replace mypassword with your password. so, do

    wget https://raw.github.com/passion8/fedena-install/master/ymlwriter.rb
    ruby  ymlwriter.rb mypassword
    rm ymlwriter.rb
    
  17. Now , we will run fedena rails command . First create the database.

    rake db:create
    

    if it is saying that they were not able to make the database because of server incorrect credentials , then you go to 16 step and start again .

  18. Now its time to install plugins and its associated tables.

    rake fedena:plugins:install_all
    
  19. Make the script executable and then run passenger command .

    chmod +x script/*
    passenger-install-apache2-module
    
  20. Follow instruction . Usually, we have to edit /etc/apache2/httpd.conf file for popping passenger configuration.

That’s all . if you have any problem , do comment . Thanks :)