Вы находитесь на странице: 1из 9

Fedena installation on CentOS Download latest ruby source code # cd /usr/local/src # wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p174.tar.

gz Extract and compile it # tar xvf ruby-1.8.7-p174.tar.gz # cd ruby-1.8.7-p174 #./configure #make #make installation #cd .. Download rubygems source code version 1.3.6 ( rubygems 1.3.6 is compatible with ruby 1.8.7) #wget http://rubyforge.org/frs/download.php/69365/rubygems-1.3.6.tgz extract and compile it # tar xvf rubygems-1.3.5.tgz # cd rubygems-1.3.5 # ruby setup.rb Install rails version 2.3.5 with gems # gem install -v=2.3.5 rails # cd .. Create a sample application 'sampleapp' with below command # rails new sampleapp start this appliaction by go to 'sampleapp' folder # cd sampleapp # rails server

If you got the following error,edit the Gemfile and replace sqlite3 with mysql. [Could not find gem 'sqlite3 (>= 0, runtime)' in any of the gem sources listed in your Gemfile. Run `bundle install` to install missing gems]

# bundle install # vi Gemfile Add the below line gem 'mysql' # yum install mysql mysql-devel gcc

# gem install mysql # rake gems:install # rake db:create # rake db:migrate # yum install ruby-devel # gem install mongrel # nohup mongrel_rails start --environment=production & startup) (Command for auto

Now you can check it in browser http://<ipaddress>:3000

Linux Stuff All My Favourite Linux recipes. Tuesday 31 May 2011 How to Install Fedena on Fedora 13 How to Install Fedena on Fedora 13 1. Setup required ruby, rubygems, rails and other packages. # yum install ruby rubygems ruby-mysql mysql-server Wait. But Fedora 13 resitory has ruby version 1.8.6 . We need 1.8.7 in order to install fedena on fedora 13. Its avalable in rawhide repository. We need to rebuild it. 1.1 Rebuilding rawhide ruby and rybygem Asuming you have rpm build environment.

#yum remove ruby Remove previously installed ruby rpms. #yum install yum-utils fedora-release-rawhide #yumdownloader --enablerepo=rawhide --source ruby rubygems ruby-libs ruby-devel #yum install $( rpm -qRp ruby-*src.rpm | grep -v rpmlib) #rpmbuild --rebuild ruby-*src.rpm #cd /root/rpmbuild/RPMS/

Now we have folowing build rpms ready for install ruby-1.8.7.334-1.fc13.x86_64.rpm ruby-libs-1.8.7.334-1.fc13.x86_64.rpm ruby-devel-1.8.7.334-1.fc13.x86_64.rpm ruby-ri-1.8.7.334-1.fc13.x86_64.rpm ruby-static-1.8.7.334-1.fc13.x86_64.rpm ruby-tcltk-1.8.7.334-1.fc13.x86_64.rpm ruby-irb-1.8.7.334-1.fc13.noarch.rpm ruby-rdoc-1.8.7.334-1.fc13.noarch.rpm #yum install x86_64/ruby-* --nogpgcheck

#yum install noarch/ruby-* --nogpgcheck Now we got ruby 1.8.7 installed. Now install rubygems # yum install rubygems 2. Download latest fedena source code from GitHub. # wget -c https://download.github.com/projectfedena-projectfedena_v2.0-a213125.tar.gz extract it to the installation directory. I normally uses /opt for non-fedora repository packages to install. #tar -zxvf /home/user/Downloads/Packages/projectfedena-projectfedena_v2.0-a213125.tar.gz #mv projectfedena-projectfedena_v2.0-a213125 /opt/fedena

3.Installing Rails version 2.3.5 Fedena runs on version 2.3.5 of rails, This will fetch and install ruby packages by gem command. # gem install rails -v=2.3.5 Fetching: activesupport-2.3.5.gem (100%) : : ( Content suppresed) : Installing RDoc documentation for rails-2.3.5... 4. Setup mysql server and database details in database.yml. Because fedena uses mysql database. # yum install mysql-server mysql-client libmysql-ruby start mysqld service. # service mysqld restart

Restarting mysqld (via systemctl): Now put database details in database.yml file. # cd /opt/fedena/

[ OK ]

Open the file database.yml in the config folder of the fedena soucre. And change the following details. # vim /opt/fedena/config/database.yml database: fedena - The name of the database you want to use for fedena username: root - Mysql username for fedena password: mypass - The password for the above mysql user. 5 .Installing the prawn gem #gem install prawn -v=0.6.3 6.Installing the rest of the gems Install the rest of the gems by running #rake gems:install (According to install guide on projectfedena.org)

This command doesn't work in fedora. I got following error. If you install rubygems version newer than 3.7-2. YOu will get the following error. So remove it and install 3.7.2 rpm. # rake gems:install rake/rdoctask is deprecated. Use rdoc/task instead (in RDoc 2.4.2+) rake aborted! uninitialized constant ActiveSupport::Dependencies::Mutex (See full trace by running task with --trace) So I tried following command. You need to be in fedena intallation home directory. # gem install rake

Fetching: rake-0.9.0.gem (100%) Successfully installed rake-0.9.0 1 gem installed Installing ri documentation for rake-0.9.0... Installing RDoc documentation for rake-0.9.0...

Then run above commend

# rake gems:install

This will install remaining gems dependancies required by fedena.

7. Now create fedena mysql database In fedena source directory run following command to create fedena database,

# rake db:create and

# rake db:migrate

8. Make server scriptS executable.

#chmod +x script/*

9. Now finally start the server by running server script. #/opt/fedena/script/server

Your fedena application server is started now. put http://serveraddress:3000 in your browser. Note that your default admin user name is admin and password is admin123.

If you want to run fedena inside apache server. # gem install passenger

make sure you have gcc-c++ curl-devel zlib-devel httpd-devel apr-devel apr-util-devel installed. # passenger-install-apache2-module follow the instructions. Make changes in apache configuration file(httpd.conf). Add following lines in httpd.conf file.

LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger3.0.7/ext/apache2/mod_passenger.so PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-3.0.7 PassengerRuby /usr/bin/ruby And add virtual host.

ServerName fedena.yourhost.com DocumentRoot /opt/fedena/public ServerAlias www.fedena.yourhost.com ErrorLog logs/fedena.yourhost-error_log CustomLog logs/fedena.yourhost.com-access_log combined AllowOverride all Options -MultiViews

Reload apache

# service httpd reload

Now you can access fedena http://fedena.yourhost.com

Posted by

at 17:15

Email This BlogThis! Share to Twitter Share to Facebook Share to Google Buzz Reactions: 2 comments:

Anonymous said... hello i get the following error after installing "rake" again using "gem install rake" and than trying the following command [root@sachin fedena]# rake gems:install rake/rdoctask is deprecated. Use rdoc/task instead (in RDoc 2.4.2+) rake aborted! syntax error on line 8, col -2: `test: *test host: localhost adapter: mysql database: fedena port: 3306 username: admin password:admin123 production: host: localhost adapter: mysql database: fedena port: 3306 username: admin password: admin123 cucumber: <<: *test

' Tasks: TOP => environment (See full trace by running task with --trace) [root@sachin fedena]# kindly direct ?? 27 June 2011 6:34 PM

said... Check your database settings in file. especially at test database. 27 June 2011 7:05 PM Post a Comment

Вам также может понравиться