INSTALL 3.69 KB
= Noosfero installation instructions

Noosfero is written in Ruby with the "Rails framework":http://www.rubyonrails.org,
so the process of setting it up is pretty similar to other Rails applications.

Below we have the instructions for installing Noosfero dependencies and setting
up a production environment. If you have problems with the setup, please feel
free to ask questions in the development mailing list.

== Requirements

You need to install some packages Noosfero depends on.  On Debian GNU/Linux or
Debian-based systems, all of these packages are available through the Debian
archive. You can install them with the following command:

 # aptitude install ruby rake libgettext-ruby1.8 libsqlite3-ruby rcov librmagick-ruby libredcloth-ruby libwill-paginate-ruby iso-codes libfeedparser-ruby libferret-ruby libdaemons-ruby mongrel mongrel-cluster tango-icon-theme

On other systems, they may or may not be available through your regular package
management system. Below are the links to their homepages.

* Ruby: http://www.ruby-lang.org/
* Rake: http://rake.rubyforge.org/
* Ruby-GetText: http://www.yotabanana.com/hiki/ruby-gettext.html?ruby-gettext (at least version 1.9.0)
* Ruby-sqlite3: http://rubyforge.org/projects/sqlite-ruby
* rcov: http://eigenclass.org/hiki/rcov
* Ferret: http://ferret.davebalmain.com/trac
* RMagick: http://rmagick.rubyforge.org/
* RedCloth: http://redcloth.org/
* will_paginate: http://github.com/mislav/will_paginate/wikis
* iso-codes: http://pkg-isocodes.alioth.debian.org/
* feedparser: http://packages.debian.org/sid/libfeedparser-ruby
* Daemons - http://daemons.rubyforge.org/
* Mongrel: http://mongrel.rubyforge.org/
* tango-icon-theme: http://tango.freedesktop.org/Tango_Icon_Library

If you manage to install Noosfero successfully, please feel free to contact the
Noosfero development mailing with the instructions for doing so, and we'll
include it here.

=== Setting up a production environment

NOTE: these instructions are for seting up a *production* environment. If you
are going to do Noosfero development, you don't need to do these steps. See the
HACKING file instead.

* install memcached. Study whether you need to raise the ammount of memory it uses for caching, depending on the demand you expect for your site.
* enter the directory where you unpacked noosfero
* copy config/ferret_server.yml.dist to config/ferret_server.yml
* create the mongrel configuration file: `mongrel_rails cluster::configure`
** then edit config/mongrel_cluster.yml to suit your environment. Make sure your apache configuration matches the mongrel cluster configuration, specially in respect to the ports and numbers of mongrel instances.
* create needed temporary directories:
  mkdir tmp
  mkdir tmp/pids
  mkdir log
* create database (example using PostgreSQL, YMMV)

  root user
  =========
  # sudo apt-get install postgresql libpgsql-ruby
  # su - postgres

  postgres user
  =============
  postgres@HOST:~$ createuser noosfero
  Shall the new role be a superuser? (y/n) n
  Shall the new role be allowed to create databases? (y/n) y
  Shall the new role be allowed to create more new roles? (y/n) n

  noosfero_user
  =============
  createdb noosfero_production
  createdb noosfero_development
  createdb noosfero_test

* configure database access in config/database.yml

* test database access:
** first create the development database
   rake db:schema:load
** if everything goes right, then create the production database:
   RAILS_ENV=production rake db:schema:load

* create sample data:
  RAILS_ENV=production rake db:populate

* compile the translations:
  rake makemo

* start the server:
  ./script/production start

* to stop the server:

  ./script/production stop

* to restart the server:

  ./script/production restart