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"

(Adding the EPF category)
 
(16 intermediate revisions by 2 users not shown)
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.'''''
+
== Introduction ==
  
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.7 on Ubuntu Server, Red Hat and CentOS using Apache2 and Phusion Passenger (a.k.a mod_rails). EPF Wiki 1.7 uses Rails 3.2 and was tested using Ruby 2.0.0 and 1.9.3. Ruby 2.0.0 is recommended. This guide was tested with Ubuntu Server 12.04.3 and CentOS 6.4. CentOS 6.4. is very similar to Red Hat 6.4.
  
If  you have any questions about this guide or EPF Wiki please use the [mailto:epf-dev@eclipse.org Eclipse Process Framework Project Developers List]. Install sources can be found on the [http://www.eclipse.org/epf/downloads/downloads.php EPF Downloads] page.
+
If  you have any questions about this guide or EPF Wiki please use the [mailto:epf-dev@eclipse.org Eclipse Process Framework Project Developers List]. The install files can be found on the [[EPF Wiki Downloads]] page.
  
 
More information on EPW Wiki can be found in  
 
More information on EPW Wiki can be found in  
 
# [[EPF Wiki User Guide]]
 
# [[EPF Wiki User Guide]]
 
# [[EPF Wiki Development Guide]]
 
# [[EPF Wiki Development Guide]]
# [[EPF Wiki Installation Guide]] (for Windows)
+
# [[EPF Wiki Downloads]]
 +
# [[EPF Wiki Upgrading]]
 +
# [[EPF Wiki Upgrade to Edge]] (obsolete)
 +
 
 +
== Ubuntu Server ==
 +
 
 +
If you want to take EPF Wiki for a spin, it is recommended to use Ubuntu Server, CentOS or Red Hat. EPF Wiki was tested using Ubuntu Server 12.04.3 and CentOS 6.4. Other Linux distributions will work equally well but you will have to make adjustments in the commands and versions.
 +
 
 +
You can easily create EPF Wiki as a [http://en.wikipedia.org/wiki/Virtual_appliance virtual appliance] using for example VirtualBox and the instructions in this document. This is the recommended approach for taking EPF Wiki out for a spin.
 +
 
 +
When you enable bridged networking this will allow easy access to EPF Wiki box for administration tasks. Also you can access EPF Wiki from anywhere on the network. The command <code>ifconfig</code> will show the IP address that is assigned to the machine on your network. After that you can easily creat http, ssh or sftp connections to the machine. To activate changes do sudo <code>/etc/init.d/networking restart</code>
  
 
== MySQL ==
 
== MySQL ==
 
Open a terminal window to install MySQL client and server
 
Open a terminal window to install MySQL client and server
  sudo apt-get install mysql-client mysql-server
+
For Ubuntu
The development headers files and libraries are also needed
+
  sudo apt-get install mysql-client mysql-server libmysqlclient15-dev
  sudo apt-get install libmysqlclient15-dev
+
 
 +
For CentOS/Red Hat you use
 +
  sudo yum -y install mysql mysql-server mysql-devel
 +
 
 
Create database user for EPF Wiki
 
Create database user for EPF Wiki
 
  mysql -uroot
 
  mysql -uroot
Line 20: Line 33:
 
  grant all privileges on *.* to 'epfwiki'@'localhost';
 
  grant all privileges on *.* to 'epfwiki'@'localhost';
 
  grant usage 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
+
== RVM ==
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
+
RVM is the recommended approach for installing Ruby and related libraries.
  sudo gem install ... -p http://myproxyserver.com:3128
+
\curl -L https://get.rvm.io | bash # Install RVM
 +
source ~/.rvm/scripts/rvm # RVM is not immediately available, you need to login again but you can also issue this command in the current session
 +
type rvm | head -1
 +
  rvm install 2.0.0
 +
rvm use 2.0.0
 +
rvm gemset create epfwiki
 +
rvm use 2.0.0@epfwiki
  
 
== EPF Wiki ==
 
== EPF Wiki ==
Line 86: Line 82:
 
Note: make sure read-access is granted to all users, otherwise Apache will be unable to start EPF Wiki.
 
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).  
+
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 do this by creating the configuration file for the production environment (config/environments/production.rb). You create this file by renaming or the copying the example file *production.rb.example*. Then you can edit the file.  
  
 
  gedit /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"'''
+
There are a lot of variables in this file but the two important ones are
 +
ENV['EPFWIKI_REPLY_ADDRESS'] = "no-reply@epf.eclipse.org"
 +
ENV['EPFWIKI_BASE_URL'] = "http://examp.com/"
 +
 
 +
The variable EPFWIKI_BASE_URL is important. Here you put the base url where EPF Wiki is located. Including a trailing slash.
  
 
== Apache2 ==
 
== Apache2 ==
Line 129: Line 129:
  
 
== TinyMCE ==
 
== TinyMCE ==
 +
 +
 +
To install TinyMCE navigate to the application folder
 +
rake epfw:tinymce
 +
 +
Alternatively, do it manually
  
 
To integrate TinyMCE with EPF Wiki:
 
To integrate TinyMCE with EPF Wiki:
  
# Download '''TinyMCE 3.2.0.2''' from [http://tinymce.moxiecode.com/download.php tinymce.moxiecode.com]
+
# Download '''TinyMCE 3.2.0.2''' from [https://github.com/downloads/tinymce/tinymce/tinymce_3.4.4.zip github.com]
 
# 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'''
 
# 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'''
  
Line 153: Line 159:
 
   
 
   
 
This job should run at night or at when ever your site is used the least.
 
This job should run at night or at when ever your site is used the least.
 +
 +
 +
[[Category:EPF]]

Latest revision as of 09:06, 24 October 2019

Introduction

This guide describes how to install EPF Wiki 1.7 on Ubuntu Server, Red Hat and CentOS using Apache2 and Phusion Passenger (a.k.a mod_rails). EPF Wiki 1.7 uses Rails 3.2 and was tested using Ruby 2.0.0 and 1.9.3. Ruby 2.0.0 is recommended. This guide was tested with Ubuntu Server 12.04.3 and CentOS 6.4. CentOS 6.4. is very similar to Red Hat 6.4.

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

More information on EPW Wiki can be found in

  1. EPF Wiki User Guide
  2. EPF Wiki Development Guide
  3. EPF Wiki Downloads
  4. EPF Wiki Upgrading
  5. EPF Wiki Upgrade to Edge (obsolete)

Ubuntu Server

If you want to take EPF Wiki for a spin, it is recommended to use Ubuntu Server, CentOS or Red Hat. EPF Wiki was tested using Ubuntu Server 12.04.3 and CentOS 6.4. Other Linux distributions will work equally well but you will have to make adjustments in the commands and versions.

You can easily create EPF Wiki as a virtual appliance using for example VirtualBox and the instructions in this document. This is the recommended approach for taking EPF Wiki out for a spin.

When you enable bridged networking this will allow easy access to EPF Wiki box for administration tasks. Also you can access EPF Wiki from anywhere on the network. The command ifconfig will show the IP address that is assigned to the machine on your network. After that you can easily creat http, ssh or sftp connections to the machine. To activate changes do sudo /etc/init.d/networking restart

MySQL

Open a terminal window to install MySQL client and server For Ubuntu

sudo apt-get install mysql-client mysql-server libmysqlclient15-dev

For CentOS/Red Hat you use

sudo yum -y install mysql mysql-server mysql-devel

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';

RVM

RVM is the recommended approach for installing Ruby and related libraries.

\curl -L https://get.rvm.io | bash # Install RVM
source ~/.rvm/scripts/rvm # RVM is not immediately available, you need to login again but you can also issue this command in the current session
type rvm | head -1
rvm install 2.0.0
rvm use 2.0.0
rvm gemset create epfwiki
rvm use 2.0.0@epfwiki

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 do this by creating the configuration file for the production environment (config/environments/production.rb). You create this file by renaming or the copying the example file *production.rb.example*. Then you can edit the file.

gedit /config/environments/production.rb

There are a lot of variables in this file but the two important ones are

ENV['EPFWIKI_REPLY_ADDRESS'] = "no-reply@epf.eclipse.org"
ENV['EPFWIKI_BASE_URL'] = "http://examp.com/"

The variable EPFWIKI_BASE_URL is important. Here you put the base url where EPF Wiki is located. Including a trailing slash.

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 install TinyMCE navigate to the application folder

rake epfw:tinymce

Alternatively, do it manually

To integrate TinyMCE with EPF Wiki:

  1. Download TinyMCE 3.2.0.2 from github.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