Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise 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?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

Support Installation & Updates
  1. OpenProject
  2. Forums
  3. Support Installation & Updates
  4. Howto install OpenProject-CE on CentOS 7 with Plesk 12.5 + Apache + Passenger

Howto install OpenProject-CE on CentOS 7 with Plesk 12.5 + Apache + Passenger

Added by Tai hei over 9 years ago

Hello peoples,
i installed OP on my Plesk server successfully and I want to share it with you.

Requirements

  • Preinstalled Plesk (12.5+) for the Passenger support, but it shouldn’t be much different for older version, except that you have to install passenger on your own.
  • SSH access to the server

Prepare Plesk

1. Install Passenger

  • In Plesk: Tools & Settings > Plesk > Updates and Upgrades
  • Add/Remove Components
  • check/activate: Web hosting > Phusion Passenger server
  • Continue
  • Complete the installation

2. Activate Passenger

  • In Plesk: Tools & Settings > General Settings > Apache Web Server
  • check/activate passenger
  • click ok

3. Create Domain (op.example.com)

  • Create a standard domain without any special stuff

4. Create Database for OpenProject

  • Go to the domain window and click database
  • Add Database
  • My settings
Database name: openproject
Database user name: openproject
Related Site: op.example.com
New password: dbsecret
Access control: Allow remote connections from any host

Install OpenProject-CE

log into the server via ssh

I used the packaged installer

sudo rpm --import https://rpm.packager.io/key
echo "[openproject]
name=Repository for opf/openproject application.
baseurl=https://rpm.packager.io/gh/finnlabs/pkgr-openproject-community/centos7/stable/4.2
enabled=1" | sudo tee /etc/yum.repos.d/pkgr-openproject-community.repo
sudo yum install openproject-ce

Configure OpenProject

openproject-ce configure
1. MySQL:

  • resuse an exisitng database
  • ip = 127.0.0.1
  • MySQL port: 3306
  • db_username = openproject
  • db_password = dbsecret
  • db_name = openproject
  • FQDN = 127.0.0.1
  • enable SSL: no

2. Apache
Skip: Apache is already installed from Plesk

3. Mail
Sendmail is configured with Plesk, so it works out of box, alternatively use smtp if you want to.

4. Email
admin@example.com

5. Memcached
Your choice. I have it installed

Configure Apache/Passenger

1. login as openproject user
sudo su openproject --login

2. add openproject binaries to $PATH
nano ~/.bash_profile
The OpenProject binaries must be first, because we need this ruby version.
PATH=/opt/openproject-ce/bin:$PATH:$HOME/.local/bin:$HOME/bin
3. save the file

4. exit and re-login sudo su openproject --login

5. When you type env the path should be set

6. Validate if your using the correct ruby version with ruby -v
It should be ruby 2.1.6p336 (2015-04-13 revision 50298) [x86_64-linux] or simular.
If you get ruby 2.0.0p598 (2014-11-13) [x86_64-linux] you forgot or set the path wrong.

7. cd /opt/openproject-ce/

8. passenger-install-apache2-module should be successful

9. exit

10. Tell passenger to use the ruby version from OpenProject
sudo vi /etc/httpd/conf.d/passenger.conf

LoadModule passenger_module /usr/lib64/httpd/modules/mod_passenger.so

<IfModule mod_passenger.c>
        PassengerRoot /usr/lib64/passenger/locations.ini
        #PassengerDefaultRuby /usr/bin/ruby
        PassengerDefaultRuby /opt/openproject-ce/bin/ruby
</IfModule>

11. Get the app data
cat /etc/openproject-ce/conf.d/other copy these settings somewhere, we need it later.
My looks like:

export DATABASE_URL="mysql2://openproject:dbsecret@127.0.0.1:3306/openproject"
export RAILS_CACHE_STORE="file_store"
export ATTACHMENTS_STORAGE_PATH="/var/db/openproject-ce/files"
export HOST="127.0.0.1"
export WEB_CONCURRENCY="1"
export WEB_TIMEOUT="15"
export SECRET_KEY_BASE="****"
export SECRET_TOKEN="****"

12. Edit the Apache .conf for your domain
sudo vi /var/www/vhosts/system/op.example.com/conf/httpd.conf

13. Remove (or comment out with a ‘#’) the old DocumentRoot (for https (:443) and/or http(:80))

                #DocumentRoot "/var/www/vhosts/example.com/op.example.com"

and add all following lines to your Virtual host’s (for https (:443) and/or http(:80)).
Set the environment values from your app data

                SetEnv DATABASE_URL "mysql2://openproject:dbsecret@127.0.0.1:3306/openproject"
                SetEnv RAILS_CACHE_STORE "file_store"
                SetEnv ATTACHMENTS_STORAGE_PATH "/var/db/openproject-ce/files"
                SetEnv HOST "127.0.0.1"
                SetEnv WEB_CONCURRENCY "1"
                SetEnv WEB_TIMEOUT "15"
                SetEnv SECRET_KEY_BASE "****"
                SetEnv SECRET_TOKEN "****"

                # !!! Be sure to point DocumentRoot to 'public'!
                DocumentRoot /opt/openproject-ce/public

                <Directory /opt/openproject-ce/public>
                        # This relaxes Apache security settings.
                        AllowOverride all
                        # MultiViews must be turned off.
                        Options -MultiViews
                        # Uncomment this if you're on Apache >= 2.4:
                        Require all granted
                </Directory>

save the file

14. Restart Apache sudo service httpd restart

15. Enter the URL in your browser, press enter with your crossed fingers and hope for a response after 3-5 seconds.

Troubleshooting

Look at the error log from apache
sudo cat /var/log/httpd/error_log

I had a long fight with this error:

[ 2015-11-17 14:35:54.2553 11909/7fd33f1a0700 App/Implementation.cpp:303 ]: Could not spawn process for application /opt/openproject-ce: An error occured while starting up the preloader.
  Error ID: 21ceeba4
  Error details saved to: /tmp/passenger-error-6p2Q06.html
  Message from application: Invalid DATABASE_URL (RuntimeError)

I’m not quite sure if you need heroku to fix this error.
If you get this error, try this:
mkdir ~/temp && cd ~/temp
wget https://toolbelt.heroku.com/install.sh
chmod +x install.sh
./install.sh
and restart Apache again.

Notes

I wrote this tutorial out of mind, i didn’t retried the installation. So, maybe i forgot something.
Just post your suggestions and error messages and I will try to update this How to.

Good Luck! It took me 3 days.


Replies (9)

RE: Howto install OpenProject-CE on CentOS 7 with Plesk 12.5 + Apache + Passenger - Added by Ming Ming over 9 years ago

Hi Tai,

thanks for this installation. I follow your instructions without error.

But when i am trying to open the website i get the following error.

We’re sorry, but something went wrong.

We’ve been notified about this issue and we’ll take a look at it shortly.

###########

i have try this also

gem install bundler

###########

in the logs i can only see this

[ 2016-01-29 23:39:55.5731 13781/7f3b52297700 age/Hel/Req/CheckoutSession.cpp:252 ]: [Client 1-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 59d1dc27. Please see earlier logs for details about the error.
App 14052 stdout:
App 14052 stderr: —> Compiling passenger_native_support.so for the current Ruby interpreter…
App 14052 stderr:
App 14052 stderr: (set PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY=0 to disable)
App 14052 stderr:
App 14052 stderr: Warning: compilation didn’t succeed. To learn why, read this file:
App 14052 stderr: /tmp/passenger_native_support-7vljef.log
App 14052 stderr: —> Downloading precompiled passenger_native_support.so for the current Ruby interpreter…
App 14052 stderr: (set PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY=0 to disable)
App 14052 stderr: Could not download https://oss-binaries.phusionpassenger.com/binaries/passenger/by_release/5.0.10/rubyext-ruby-2.1.6-x86_64-linux.tar.gz: The requested URL returned error: 404 Not Found
App 14052 stderr: Trying next mirror…
App 14052 stderr: Could not download https://s3.amazonaws.com/phusion-passenger/binaries/passenger/by_release/5.0.10/rubyext-ruby-2.1.6-x86_64-linux.tar.gz: The requested URL returned error: 403 Forbidden
App 14052 stderr: —> Continuing without passenger_native_support.so.
App 14052 stdout:
[ 2016-01-29 23:41:10.1722 13781/7f3b58152700 App/Implementation.cpp:303 ]: Could not spawn process for application /opt/openproject: An error occured while starting up the preloader.
Error ID: 32a70675
Error details saved to: /tmp/passenger-error-pXuEZH.html
Message from application: cannot load such file — bundler/setup (LoadError)
/opt/openproject/vendor/ruby-2.1.6/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require’
/opt/openproject/vendor/ruby-2.1.6/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require’
/usr/share/passenger/phusion_passenger/loader_shared_helpers.rb:399:in `activate_gem’
/usr/share/passenger/phusion_passenger/loader_shared_helpers.rb:277:in `block in run_load_path_setup_code’
/usr/share/passenger/phusion_passenger/loader_shared_helpers.rb:404:in `running_bundler’
/usr/share/passenger/phusion_passenger/loader_shared_helpers.rb:276:in `run_load_path_setup_code’
/usr/share/passenger/helper-scripts/rack-preloader.rb:99:in `preload_app’
/usr/share/passenger/helper-scripts/rack-preloader.rb:153:in `module:App’
/usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `module:PhusionPassenger’
/usr/share/passenger/helper-scripts/rack-preloader.rb:28:in `

’

[ 2016-01-29 23:41:10.2794 13781/7f3b51896700 age/Hel/Req/CheckoutSession.cpp:252 ]: [Client 2-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 32a70675. Please see earlier logs for details about the error.

I google now a lot but i cannot find any solution.

Can you or somebody help me? Do you have a tip?

Thanks

Ming

RE: Howto install OpenProject-CE on CentOS 7 with Plesk 12.5 + Apache + Passenger - Added by Lukas Großberger over 9 years ago

I had to do the following things in addition/different to the tutorial above for Ubuntu 14.04:

mandatorily install memcached

as openproject user

gem install bundler
gem install autoprefixer-rails

Put the database and secret key config in the .yml files instad of the apach config.
/opt/openproject/config/database.yml
(beware of the space between “password:” and “secret”!)

production:
  adapter: mysql2
  database: database
  host: localhost
  username: user
  password: secret
  encoding: utf8

In the /opt/openproject/config/secrets.yml replace <%= ENV["SECRET_KEY_BASE"] %> with your secret key base you got from cat /etc/openproject/conf.d/other

I also installed nodejs, but hardly think it helped at any point.

RE: Howto install OpenProject-CE on CentOS 7 with Plesk 12.5 + Apache + Passenger - Added by Ming Ming over 9 years ago

Hi Lukas,

THANKS!!!

after doing your step for install i got the following issue

[ 2016-02-01 23:26:17.8005 4429/7f874351c700 App/Implementation.cpp:303 ]: Could not spawn process for application /opt/openproject: An error occured while starting up the preloader.
Error ID: 1da4dcf8
Error details saved to: /tmp/passenger-error-KnIG4d.html
Message from application: There was an error while trying to load the gem ‘autoprefixer-rails’. (Bundler::GemRequireError)

so nodejs is required

-> https://community.openproject.org/topics/5589

RE: Howto install OpenProject-CE on CentOS 7 with Plesk 12.5 + Apache + Passenger - Added by Ming Ming over 9 years ago

Hey Lukas, Tai,

everything wents fine except email. I cannot receive any emails. e.g. when i want to sent a test email via systemconfiguration -> Mail Notification. i receive the following error:

ArgumentError (Invalid :protocol option: “”)

Can you help me out here?

I have use the configuration with sendmail or smtp. Both error out with the same message. In the logfile of postfixx i cannot see anything.

Best Regards

Ming

RE: Howto install OpenProject-CE on CentOS 7 with Plesk 12.5 + Apache + Passenger - Added by Tai hei over 9 years ago

Hey,

I had the same problem after the last update.
I fixed it by ‘saving’ the default configs in Administration -> System -> General.
Make sure that you set the correct protocol (http/https) with the correct hostname.

RE: Howto install OpenProject-CE on CentOS 7 with Plesk 12.5 + Apache + Passenger - Added by Ming Ming over 9 years ago

Hi,

lol, this was really easy and now i understand the error message.

Thanks a lot.

Br
Ming

RE: Howto install OpenProject-CE on CentOS 7 with Plesk 12.5 + Apache + Passenger - Added by Tai hei over 9 years ago

It took me two hours :D
And I agree with you, this error message is quite useless.

RE: Howto install OpenProject-CE on CentOS 7 with Plesk 12.5 + Apache + Passenger - Added by Ming Ming over 9 years ago

;-)

RE: Howto install OpenProject-CE on CentOS 7 with Plesk 12.5 + Apache + Passenger - Added by Patty LG almost 9 years ago

Hi Tai hei,

i need help.

in the httpd Logfile when call my op.onlineplus.de

App 11011 stdout: 
App 11011 stderr: require 'rails/all'... 
App 11011 stderr: 0.890s
App 11011 stderr: Bundler.require... 
App 11011 stderr: 3.550s
App 11011 stderr: Application.initialize!... 
App 11011 stderr: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from block in <top (required)> at /opt/openproject-ce/config/environment.rb:35)
App 11011 stderr: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from block in <top (required)> at /opt/openproject-ce/config/environment.rb:35)
App 11011 stdout: 
[ 2016-08-04 10:56:05.3598 6237/7fb26aefb700 App/Implementation.cpp:303 ]: Could not spawn process for application /opt/openproject-ce: An error occured while starting up the preloader.
  Error ID: 011e4880
  Error details saved to: /tmp/passenger-error-e37mX6.html
  Message from application: Invalid DATABASE_URL (RuntimeError)
  (erb):9:in `rescue in <main>'
  (erb):6:in `<main>'
  /opt/openproject-ce/vendor/ruby-2.1.6/lib/ruby/2.1.0/erb.rb:850:in `eval'
  /opt/openproject-ce/vendor/ruby-2.1.6/lib/ruby/2.1.0/erb.rb:850:in `result'
  /opt/openproject-ce/vendor/bundle/ruby/2.1.0/gems/railties-3.2.22/lib/rails/application/configuration.rb:115:in `database_configuration'
  /opt/openproject-ce/vendor/bundle/ruby/2.1.0/gems/activerecord-3.2.22/lib/active_record/railtie.rb:84:in `block (2 levels) in <class:Railtie>'
  /opt/openproject-ce/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
  /opt/openproject-ce/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
  /opt/openproject-ce/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/lazy_load_hooks.rb:26:in `block in on_load'
  /opt/openproject-ce/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/lazy_load_hooks.rb:25:in `each'
  /opt/openproject-ce/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/lazy_load_hooks.rb:25:in `on_load'
  /opt/openproject-ce/vendor/bundle/ruby/2.1.0/gems/activerecord-3.2.22/lib/active_record/railtie.rb:80:in `block in <class:Railtie>'
  /opt/openproject-ce/vendor/bundle/ruby/2.1.0/gems/railties-3.2.22/lib/rails/initializable.rb:30:in `instance_exec'
  /opt/openproject-ce/vendor/bundle/ruby/2.1.0/gems/railties-3.2.22/lib/rails/initializable.rb:30:in `run'
  /opt/openproject-ce/vendor/bundle/ruby/2.1.0/gems/railties-3.2.22/lib/rails/initializable.rb:55:in `block in run_initializers'
  /opt/openproject-ce/vendor/bundle/ruby/2.1.0/gems/railties-3.2.22/lib/rails/initializable.rb:54:in `each'
  /opt/openproject-ce/vendor/bundle/ruby/2.1.0/gems/railties-3.2.22/lib/rails/initializable.rb:54:in `run_initializers'
  /opt/openproject-ce/vendor/bundle/ruby/2.1.0/gems/railties-3.2.22/lib/rails/application.rb:136:in `initialize!'
  /opt/openproject-ce/vendor/bundle/ruby/2.1.0/gems/railties-3.2.22/lib/rails/railtie/configurable.rb:30:in `method_missing'
  /opt/openproject-ce/config/environment.rb:35:in `block in <top (required)>'
  /opt/openproject-ce/config/application.rb:43:in `block in bench'
  /opt/openproject-ce/vendor/ruby-2.1.6/lib/ruby/2.1.0/benchmark.rb:279:in `measure'
  /opt/openproject-ce/config/application.rb:42:in `bench'
  /opt/openproject-ce/config/environment.rb:33:in `<top (required)>'
  config.ru:32:in `require'
  config.ru:32:in `block in <main>'
  /opt/openproject-ce/vendor/bundle/ruby/2.1.0/gems/rack-1.4.7/lib/rack/builder.rb:51:in `instance_eval'
  /opt/openproject-ce/vendor/bundle/ruby/2.1.0/gems/rack-1.4.7/lib/rack/builder.rb:51:in `initialize'
  config.ru:1:in `new'
  config.ru:1:in `<main>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:107:in `eval'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:107:in `preload_app'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:153:in `<module:App>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:28:in `<main>'


[ 2016-08-04 10:56:05.3815 6237/7fb2a32a4700 age/Hel/Req/CheckoutSession.cpp:252 ]: [Client 1-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 011e4880. Please see earlier logs for details about the error.

i tested your hint with the heroku tool, without success.

i cannot fix the database error “Invalid DATABASE_URL (RuntimeError)” :/

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