Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "EPF Wiki Installation Guide for Ubuntu"

Line 1: Line 1:
'''''If you want to do a new install of EPF Wiki it is recommended to use [https://github.com/ostraaten/epfw Edge EPF Wiki] on Github. That release offers support for Ruby 1.9.2. and Rails 3.'''''
+
'''''If you want to do a new install of EPF Wiki it is recommended to use [https://github.com/ostraaten/epfw Edge EPF Wiki]. That release offers support for Ruby 1.9.2. and Rails 3.'''''
  
 
This guide describes how to install EPF Wiki 1.5 on Ubuntu using Apache2 and Phusion Passenger (a.k.a mod_rails).  
 
This guide describes how to install EPF Wiki 1.5 on Ubuntu using Apache2 and Phusion Passenger (a.k.a mod_rails).  

Revision as of 06:49, 12 August 2011

If you want to do a new install of EPF Wiki it is recommended to use Edge EPF Wiki. That release offers support for Ruby 1.9.2. and Rails 3.

This guide describes how to install EPF Wiki 1.5 on Ubuntu using Apache2 and Phusion Passenger (a.k.a mod_rails).

If you have any questions about this guide or EPF Wiki please use the Eclipse Process Framework Project Developers List. Install sources can be found on the EPF Downloads page.

More information on EPW Wiki can be found in

  1. EPF Wiki User Guide
  2. EPF Wiki Development Guide
  3. EPF Wiki Installation Guide (for Windows)

MySQL

Open a terminal window to install MySQL client and server

sudo apt-get install mysql-client mysql-server

The development headers files and libraries are also needed

sudo apt-get install libmysqlclient15-dev

Create database user for EPF Wiki

mysql -uroot
create user 'epfwiki'@'localhost' identified by 'ikiwpur';
grant all privileges on *.* to 'epfwiki'@'localhost';
grant usage on *.* to 'epfwiki'@'localhost';

Ruby

sudo apt-get install ruby rdoc irb libyaml-ruby libzlib-ruby ri libopenssl-ruby ruby1.8-dev build-essential

RubyGems

Download

wget "http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz"
tar -xvzf rubygems-1.3.5.tgz
cd rubygems-1.3.5/
sudo ruby setup.rb

Cleanup a bit

cd ..
rm -r rubygems-1.3.5/

IMPORTANT: create the symbolic link

sudo ln -s /usr/bin/gem1.8 /usr/bin/gem

Update RubyGems system

sudo gem update --system

Gems

Install Rails 2.0.2, XHTMLDiff en MySQL Gem

sudo gem install -v=2.0.2 rails
sudo gem install xhtmldiff 
sudo gem install mysql

Note: if you are behind a proxy server, use the p-switch

sudo gem install ... -p http://myproxyserver.com:3128

EPF Wiki

Extract the EPF Wiki zip file that you can find as a download on http://www.eclipse.org/epf. Open a terminal window and navigate to the folder

gedit config/database.yml

This will open an editor. Now you can change the database settings to match your mysql-server setup (database user and password)

Create the database

export RAILS_ENV=production
rake db:create db:migrate

Mail server settings

gedit config/environments/production.rb

Few options what you can do here. Use sendmail

ActionMailer::Base.delivery_method = :sendmail

Use a SMTP server

ActionMailer::Base.smtp_settings = {
:address => 'mail.eclipse.org',
:port => 25,
:domain => 'epf.eclipse.org',
:user_name => 'optional',
:password => 'optional',
:authentication => :login
}

If email is not working you will see error messages with the text 'Broken pipe'.

Note: email is used for registration (users sign up using valid email address) and reports. If you are just testing and/or don't have access to a mail server you can disable email

ActionMailer::Base.delivery_method = :test

EPF Wiki will work but users that sign up do not receive the email with the confirmation link. The confirmation link is visible in the log file log/production.log.

You can now start the interal WebRick server to check if things are working

ruby script/server production

Navigate to http://localhost:3000, this will redirect you to http://localhost:3000/login/new_cadmin where you can create the first account.

Note: make sure read-access is granted to all users, otherwise Apache will be unable to start EPF Wiki.

EPF Wiki uses jobs to send reports and update Wiki sites. Such a job is unaware of the Web server configuration as no Web server is involved in the operation, so we have to tell EPF Wiki the host and port the Web server is using. We can do this be editing the configuration file for the production environment (config/environments/production.rb).

gedit /config/environments/production.rb

Replace ENV['EPFWIKI_HOST'] = "localhost" with the right hostname e.g. ENV['EPFWIKI_HOST'] = "myepfwiki". Note: include a port number if you are not using the default port 80 e.g. ENV['EPFWIKI_HOST'] = "myepfwiki:8080"

Apache2

Terminal

sudo apt-get install apache2

For Phusion Passenger more of Apache is needed

sudo apt-get install apache2-prefork-dev
sudo apt-get install libapr1-dev
sudo apt-get install libaprutil1-dev

Phusion Passenger (a.k.a mod_rails)

sudo gem install passenger
sudo passenger-install-apache2-module

Apache Configuration

Add for example to configuration file /etc/apache2/sites-enabled/000-default

LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/ext/apache2/mod_passenger.so
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4
PassengerRuby /usr/bin/ruby1.8
<VirtualHost *:3000>
  ServerName epfwiki
  DocumentRoot /home/tonyclifton/epfwiki/public    
</VirtualHost>

If you are just testing and don't have a proper domain name for your server you can just add anything to the hosts file

sudo gedit /etc/hosts

Restart apache to activate changes

sudo /etc/init.d/apache2 restart

Now you should be able to see EPF Wiki when you navigate to http://epfwiki:3000

NOTE: The passenger version number may be different, currently it is 2.2.7. You may have to change it in the paths above.

HTML Tidy

sudo apt-get install tidy

TinyMCE

To integrate TinyMCE with EPF Wiki:

  1. Download TinyMCE 3.2.0.2 from tinymce.moxiecode.com
  2. Extract the contents and copy the folder tinymce\jscripts\tiny_mce to [application install dir]\public\javascripts. The folder javascripts\tiny_mce should now contain Javascript library tiny_mce.js

Add a Cron Job

Terminal

crontab -e

To create a Cron job. You can use an online tool Crobtab Generator to generate the exact command to enter.

This job will send reports (daily, weekly, monthly) and will update Wiki sites if updates have been scheduled. It should run from the EPF Wiki Application root

A command like the following runs the daily job

cd /home/user/epfwiki && ruby script/runner -e production 'job_daily'

The crontab entry that runs the job each night 20:00 hours would be

* 20 * * * cd /home/user/epfwiki && ruby script/runner -e production 'job_daily'

Or you can run the job each hour

0 * * * * cd /home/user/epfwiki && ruby script/runner -e production 'job_daily'

This job should run at night or at when ever your site is used the least.

Back to the top