Top Menu

Jump to content
Home
    • Projects
    • Work packages
    • News
    • Getting started
    • Introduction video

      Welcome to OpenProject Community

      Get an overview

      Get a quick overview of project management and team collaboration with OpenProject.
      You can restart this video from the help menu

    • Help and support
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Professional support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?
      Create a new account

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
  • Roadmap
  • Work packages
  • Calendars
  • Team planners
  • Boards
  • Forums
  • Wiki
    • Table of contents
      • Expanded. Click to collapseCollapsed. Click to showDeveloper
        • Hierarchy leafAccessibility Checklist
        • Hierarchy leafCode Review Guidelines
        • Expanded. Click to collapseCollapsed. Click to showContribution
          • Hierarchy leafGit Workflow
          • Hierarchy leafTranslations
        • Expanded. Click to collapseCollapsed. Click to showDeveloping Plugins
          • Hierarchy leafDeveloping an OmniAuth Authentication Plugin
        • Hierarchy leafRelease Process
        • Hierarchy leafReport a bug
        • Hierarchy leafSecurity
        • Hierarchy leafSetting up an OpenLDAP server for testing
        • Hierarchy leafTheme Features
      • Hierarchy leafDownload
      • Expanded. Click to collapseCollapsed. Click to showFeature tour
        • Hierarchy leafRelease Notes OpenProject 30
        • Expanded. Click to collapseCollapsed. Click to showRelease Notes OpenProject 30 - Overview
          • Hierarchy leafGlossary
          • Hierarchy leafRelease Notes - Accessibility
          • Hierarchy leafRelease Notes - Accessibility changes
          • Hierarchy leafRelease Notes - Add work package queries as menu items to sidebar
          • Hierarchy leafRelease Notes - Copy projects based on Templates
          • Hierarchy leafRelease Notes - Design changes
          • Hierarchy leafRelease Notes - Fixed Bugs
          • Hierarchy leafRelease Notes - Keyboard Shortcuts
          • Hierarchy leafRelease Notes - Project settings
          • Hierarchy leafRelease Notes - Ruby&Rails Update
          • Hierarchy leafRelease Notes - Security
          • Hierarchy leafRelease Notes - Timelines
          • Hierarchy leafRelease Notes - Work packages
      • Hierarchy leafHowto create animated gifs
      • Hierarchy leafMigration Squashing
      • Hierarchy leafMod security
      • Hierarchy leafNew work package page
      • Hierarchy leafOP3 to OP4 Debian upgrade
      • Hierarchy leafOP4 Ubuntu1404 Stable with MySQL in production
      • Hierarchy leafOpenProject 40 Development Setup
      • Expanded. Click to collapseCollapsed. Click to showOpenProject Foundation
        • Hierarchy leafBoards
        • Hierarchy leafMembers
        • Hierarchy leafOPF-Meetings
        • Hierarchy leafStatutes
      • Expanded. Click to collapseCollapsed. Click to showRelease Notes
        • Hierarchy leafOpenProject released on Bitnami
      • Expanded. Click to collapseCollapsed. Click to showRelease Notes OpenProject 40 - Overview
        • Hierarchy leafRelease Notes OpenProject 40 - Accessibility improvements
        • Hierarchy leafRelease Notes OpenProject 40 - Column header functions in work package table
        • Hierarchy leafRelease Notes OpenProject 40 - Improved Design
        • Hierarchy leafRelease Notes OpenProject 40 - Integrated query title on work package page
        • Hierarchy leafRelease Notes OpenProject 40 - Integrated toolbar on work package page
        • Hierarchy leafRelease Notes OpenProject 40 - OmniAuth integration for OpenProject
        • Hierarchy leafRelease Notes OpenProject 40 - Work package details pane
      • Expanded. Click to collapseCollapsed. Click to showSecurity and privacy
        • Hierarchy leafFAQ
      • Expanded. Click to collapseCollapsed. Click to showSupport
        • Expanded. Click to collapseCollapsed. Click to showDownload and Installation
          • Hierarchy leafInstallation MacOS
          • Expanded. Click to collapseCollapsed. Click to showInstallation OpenProject 3 0
            • Hierarchy leafDebian Stable with MySQL in production
            • Hierarchy leafInstallation Ubuntu
            • Hierarchy leafInstallation Windows
            • Hierarchy leafInstallation on Centos 65 x64 with Apache and PostgreSQL 93
          • Expanded. Click to collapseCollapsed. Click to showInstallation OpenProject 40
            • Hierarchy leafOP4 Debian Stable with MySQL in production
          • Expanded. Click to collapseCollapsed. Click to showMigration paths
            • Hierarchy leafFrom Chilliproject to OpenProject
            • Hierarchy leafMigration 15 to 30
            • Hierarchy leafMigration 24 to 30
            • Hierarchy leafMigration Redmine 2x › OpenProject 30
            • Hierarchy leafOpenProject 3 Migration
          • Hierarchy leafOpenProject 40
        • Expanded. Click to collapseCollapsed. Click to showNews
          • Hierarchy leafNew OpenProject Translations Plugin
          • Hierarchy leafNew Plugin on OpenProjectorg Local Avatars
          • Hierarchy leafNew design for OpenProject
          • Hierarchy leafNews Accessibility workshop for OpenProject
          • Hierarchy leafNews Glossary for OpenProject
          • Hierarchy leafNews Heartbleed fixed
          • Hierarchy leafNews Icon Fonts
          • Hierarchy leafNews OpenProject 30 Release
          • Hierarchy leafNews Release GitHub Integration Plugin
          • Hierarchy leafNews Success Story Deutsche Telekom
          • Hierarchy leafNews Timelines
          • Hierarchy leafOpenProject 3013 released
          • Hierarchy leafOpenProject 3017 released
          • Hierarchy leafOpenProject 40 released
          • Hierarchy leafOpenProject 40 will be coming soon
          • Hierarchy leafOpenProject 405 released
          • Hierarchy leafOpenProject and pkgrio
          • Hierarchy leafOpenProject news moved to a new blog
          • Hierarchy leafOpenProjectBitnami
          • Hierarchy leafPackager version with plugins released ("Community edition")
          • Hierarchy leafRegistration OpenProject-Foundation
          • Hierarchy leafRelease OpenProject AuthPlugins
          • Hierarchy leafUpdates on OpenProject
          • Hierarchy leafWe need your feedback for the the new fullscreen view for work packages
        • Hierarchy leafOpenProject Plug-Ins
      • Hierarchy leafWiki
You are here:
  • Forums
  • Support Installation & Updates

Content

my install

Added by Craig Lockley over 8 years ago

After days of trying different instructions / guides / google searches / forums etc., I have finally got a successful install for production site of OpenProject 3.0 on Ubuntu 12.04
For anyone that needs help, refer to this one but none of which could have been possible without the help of the OpenProject team and their input.

INSTRUCTIONS: Based on details instructions by ‘Installation of OpenProject on Ubuntu 12.04’ found under the Installation Guide for OpenProject 3.0

Installation Guide for Ubuntu 12.04
OpenProject running with Apache2 Phusion_Phassenger

Install Ubuntu 12.04 server instance

1.0 Install all necessary updates / upgrades
$ sudo apt-get update && sudo apt-get upgrade

1.1.0 Install Dependencies
$ sudo apt-get install git curl

1.1.1 Install Dependencies: Gems
$ sudo apt-get install build-essential libxslt-dev libxml2-dev libmysql-ruby libmysqlclient-dev libpq-dev libsqlite3-dev libyaml-0-2

1.1.2 Install Dependencies: Images
$ sudo apt-get install libmagickwand-dev libmagickcore-dev libmagickcore4-extra libgraphviz-dev libgvc5

1.1.3 Install Dependencies: MySQL
$ sudo apt-get install mysql-server

1.1.4 Install Dependencies: MemCached
$ sudo apt-get install memcached

1.1.5 Install Apache2
$ sudo apt-get install apache2 apache2-mpm-prefork apache2-prefork-dev libcurl4-openssl-dev

2.0.0 Create User \ Group openproject
$ sudo groupadd openproject
$ sudo useradd —create-home —gid openproject openproject
$ sudo passwd openproject

2.0.1 Switch to openproject user
$ su openproject -c ‘bash -l’

2.0.2 Switch to home directory
$ cd ~

2.1.0 Install RVM
$ \curl -L https://get.rvm.io | bash -s stable
$ source $HOME/.rvm/scripts/rvm

2.1.1 Install Ruby using RVM
$ rvm autolibs disable
$ rvm install 2.0.0

2.1.2 Install bundler using gem
$ gem install bundler

2.1.3 Install Rails | Phusion Passenger (freezes during documentation steps, so include arguments)
$ gem install rails —no-ri —no-rdoc

2.1.4
$ gem install passenger

2.2.0
$ passenger-install-apache2-module

2.2.1 Write everything down
It will now provide information used for loading the passenger module into apache which points to your ruby / rail stuff as well as what is required for your virtual host.
So please write this information down and do not rely on this instruction manual in case you happen to get a later version of passenger or 2.0.0 patch level.

3.0.0 Clone openproject repository
$ git clone https://github.com/opf/openproject.git
$ cd openproject

3.1.0 Run Bundler to install all gems
$ bundle install —without postgres rmagick

3.2.0 Configure yml files
$ cd config

3.2.1
$ cp database.yml.example database.yml
$ cp configuration.yml.example configuration.yml

3.2.2 Configuring the database.yml

3.2.3 Configuring the configuration.yml
edit: remove comment to enable memcached
rails_cache_store: :memcache

3.3.0
Should have the following: /home/openproject/openproject/config -> database.yml and configuration.yml

4.0.0 Configure database | config files
$ mysql -u root -p

CREATE DATABASE openproject CHARACTER SET utf8;
CREATE USER ‘openproject’'localhost' IDENTIFIED BY 'my_password'; GRANT ALL PRIVILEGES ON openproject.* TO 'openproject'‘localhost’;

CREATE DATABASE openproject_development CHARACTER SET utf8;
GRANT ALL PRIVILEGES ON openproject_development.* TO ‘openproject’@‘localhost’;

CREATE DATABASE openproject_test CHARACTER SET utf8;
GRANT ALL PRIVILEGES ON openproject_test.* TO ‘openproject’@‘localhost’;

5.0.0 Run database migrations (it will tell you it already existed but I do it anyway)
$ bundle exec rake db:create:all

(All steps below are for production environment only)
5.1.0 Render secret token
$ RAILS_ENV=“production” bundle exec rake generate_secret_token

5.2.0 Run migrate and seed and can append db:seed to end of syntax - I prefer to do them separate but you can do them together
$ RAILS_ENV=“production” bundle exec rake db:migrate

5.2.1 Run Seed for production
$ RAILS_ENV=“production” bundle exec rake db:seed

5.3.0 Precompile everything for production site as this will reduce load times between requests to the server
$ RAILS_ENV=“production” bundle exec rake assets:precompile

5.4.0 Test it by running in development mode, access the site via http://ipaddress:3000 before wasting time loading into apache but will have to do previous steps 5.1.0 - 5.3.0 without the [RAILS_ENV=“production”]
$ bundle exec rails server

Load it up to test development site, should work. Ctrl+C to bring it down and begin apache/passenger configurations.
I found that development was wonky for me, production worked great.

6.0.0 Deploy into Apache using Passenger - require info from passenger setup
$ su (back to your default user)

6.0.1 Copy production.rb file when doing any changes
$ cp /home/openproject/openproject/config/environments/production.rb /home/openproject/openproject/config/environments/production.rb.backup

6.0.2 Access file for editing, i prefer VIM and change to directory or write full path if you are at root, other directory, etc.
$ sudo vi production.rb

edit: change from true to false, apache should have done so already
config.server_static_assets = false

6.1.0 Create the Passenger load file from information given from passenger install
$ sudo vi /etc/apache2/mods-available/passenger.load

edit:
LoadModule passenger_module /home/openproject/.rvm/gems/ruby-2.0.0-p353/gems/passenger-4.0.37/buildout/apache2/mod_passenger.so

6.1.1 Create the Passenger conf file from information given from install
$ sudo vi /etc/apache2/mods-available/passenger.conf

edit:
PassengerRoot /home/openproject/.rvm/gems/ruby-2.0.0-p353/gems/passenger-4.0.37
PassengerDefaultRuby /home/openproject/.rvm/gems/ruby-2.0.0-p353/wrappers/ruby

6.2.0 Enable necessary components on Apache - Mod and Site
$ sudo a2enmod passenger

6.2.1
create virtual host file in /etc/apache2/sites-available
$ sudo vi /etc/apache2/sites-available/openproject

edit:
<VirtualHost *:80>
ServerName www.example.ca:
DocumentRoot /home/openproject/openproject/public
RailsEnv production

AllowOverride all
Options -MultiViews

6.2.2 Enable openproject virtual host file
$ sudo a2ensite openproject

6.2.3 Disable default site
$ sudo a2dissite default

7.0.0 Browse to machine from local or another workstation depending on setup (I prefer another workstation)
http://X.X.X.X

login with default admin credentials:
admin
admin

check to make sure you are in production environment


Replies (4)

RE: my install - Added by Karol Skolar over 8 years ago

Hi Craig,
did you also create init script for openproject? I would like to start openproject on OS startup with apache.
Do you know how to figure out?
Thanks.

Karol

RE: my install - Added by Craig Lockley over 8 years ago

If you configure OpenProject to work with Apache, you will require Phusion Passenger to run the Ruby Web-Application (OpenProject) in Apache.
Once configured properly, Apache should load everything on startup as it will handle all the processes on the backend, including the starting Apache2 and Passenger-Module

If you wish to have an init script, I am no expert with Ubuntu so I can’t really help unless I put my time into trying it out myself.

RE: my install - Added by Darth Vader about 8 years ago

Hey,

I followed your tutorial step by step but I’ve got an Error after installing Passenger & editing the config files:

apache2: Syntax error on line 227 of /etc/apache2/apache2.conf:

here is the content of line 226 and 227 of apache2.conf
# Include all the user configurations:
Include httpd.conf

and serveral errors:

Syntax error on line 1 of /etc/apache2/httpd.conf: Cannot load /home/openproject/.rvm/gems/ruby-2.1.0/gems/passenger-4.0.37/buildout/apache2/mod_passenger.so 
into server: /home/openproject/.rvm/gems/ruby-2.1.0/gems/passenger-4.0.37/buildout/apache2/mod_passenger.so:
 cannot open shared object file: No such file or directory

could anyone help me please :-/?

EDIT:

BTW: while I’m running the productive system I have a broken template. See attachment for details.

next edit:

I run the non-productive system. But this system got also Problems in the template: I cant use the drop-down menus for login / modules and Projects…. Holy c* what did I wrong :-/?

RE: my install - Added by Prasanna Dhamodaran about 8 years ago

Hi Darth Vader

You get the mod_passenger.so not found error because you have installed passenger in a different location compared to what is on this tutorial. Update the paths to the passenger in /etc/apache2/mods-available/passenger.conf and /etc/apache2/mods-available/passenger.load to the location where you have installed passenger and try restarting apache2. A quick way to find the location of passenger would be to do:

sudo updatedb
locate mod_passenger.so

That should tell you where you can find mod_passenger.so and hence the location of passenger.

As for the broken UI, it is because you have set config.serve_static_assets = false in /config/environments/production.rb. This setting is necessary if you are running OpenProject in production setting via Apache + Passenger, but breaks the UI if you have precompiled assets and starting the rails server manually. If you want to see the UI work when you start the rails server yourself then set config.serve\_static\_assets = true in /config/environments/production.rb. But, make sure it is set to false when you get your Apache + Passenger setup going.

  • (1 - 4/4)
Loading...