Top Menu

Jump to content
Home
    • Projects
    • Work packages
    • 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
    • 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:
  • Support
  • Download and Installation
  • Installation OpenProject 3 0
  • Installation on Centos 65 x64 with Apache and PostgreSQL 93

Content

Installation on Centos 65 x64 with Apache and PostgreSQL 93

  • More
    • Print
    • Table of contents

This tutorial helps you to deploy OP3. Please, aware that:

  1. it`s primarily for testing purposes and may contain some security misconfiguration, so consider deploying outside of your local network.
  2. there is only 1 requirement you have to meet, that you have to have clean Centos 6.5 x64 install (from netinstall image, minimal installation)
  3. I`m using production environment for OP3
  4. I`m using PostgreSQL 9.3 from official Postgresql repo (install guide icluded)
  5. There should be some unnecessary packages that I`m installing in this tutorial, but this is just Copy&Paste tutorial to deploy OP3 in few minutes, so excuse it please :)
  6. If you find any bugs or you have any recommendations for improving this tutorial, please, feel free to send me comment.

1. Prepare you environment

Update your system

[root@centos]# yum update

Install tools needed for DB and Ruby

[root@centos]# yum install git wget 

[root@centos]# yum groupinstall "Development tools"

Install some handy tools

[root@centos]# yum install vim mlocate

Create dedicated user for OP3

[root@centos]# groupadd openproject
[root@centos]# useradd --create-home --gid openproject openproject      
[root@centos]# passwd openproject (enter desired password)

2. Install Database (PostreSQL 9.3)

Edit .repo file and add this line:
exclude=postgresql*
to the section and :

[root@centos]# vim /etc/yum.repos.d/CentOS-Base.repo
  • press INSERT key to enter editing mode and write the following string into 2 sections
  • press ESCAPE key to exit editing mode
  • press “:wq” and press ENTER to save editing and exit VIM
  • so updated repo sections should look like this:
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
exclude=postgresql*

#released updates 
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
exclude=postgresql*

Then finish PostgreSQL installation

[root@centos]# curl -O http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-centos93-9.3-1.noarch.rpm

[root@centos]# rpm -ivh pgdg-centos93-9.3-1.noarch.rpm

[root@centos]# yum list postgres*

[root@centos]# yum install postgresql93-server postgresql93-devel

[root@centos]# service postgresql-9.3 initdb

[root@centos]# chkconfig postgresql-9.3 on

Add usermap of your user under which you have installed OP (“openproject” in my case) and PostgreSQL user that has granted rights to the DB.

Edit pg_ident.conf file and add this line at the end of file. This will add UserMap with name “openproject” to linux user “openproject” to DB user “openproject”:

openproject     openproject     openproject

[root@centos]# vim /var/lib/pgsql/9.3/data/pg_ident.conf

Uncomment this line in postgresql.conf file to allow connection to localhost of PostgreSQL service:
listen_addresses = ‘localhost’

[root@centos]# vim /var/lib/pgsql/9.3/data/postgresql.conf

Restart PostgreSQL service

[root@centos]# service postgresql-9.3 restart

Now create databases

[root@centos]# su - postgres

-bash-4.1$ psql -U postgres

Replace string “openproject” with desired username in PostgreSQL database and “my_password” with desired password (in my case both are “openproject”)

postgres=# CREATE ROLE openproject LOGIN ENCRYPTED PASSWORD 'my_password' NOINHERIT VALID UNTIL 'infinity';

postgres=# CREATE DATABASE openproject WITH ENCODING='UTF8' OWNER=openproject;
postgres=# CREATE DATABASE openproject_development WITH ENCODING='UTF8' OWNER=openproject;   
postgres=# CREATE DATABASE openproject_test WITH ENCODING='UTF8' OWNER=openproject;

postgres=# \q

postgres=# exit

3. Install Ruby

Enable ELrepo

[root@centos]# wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
[root@centos]# rpm -Uvh epel-release-6*.rpm       
[root@centos]# yum update

Install necessary packages for Ruby

[root@centos]# yum search libyaml

[root@centos]# yum install libyaml libxml2 libxml2-devel libxslt-devel libxml2-devel ruby-mysql mysql-devel ImageMagick-c++ ImageMagick-devel graphviz graphviz-ruby graphviz-devel memcached sqlite-devel

Switch to user under which will OP run (user “openproject” in my case):

[root@centos]# su openproject -c "bash -l"

Switch to users home dir or whatever directory you want to install openproject

[openproject@centos]# cd ~

Add following line into profile file of the desired user:
source ~/.profile

[openproject@centos]# vim /home/openproject/.bash_profile

Install RVM (Ruby Version Manager)

[openproject@centos]# \curl -L https://get.rvm.io | bash -s stable       
[openproject@centos]# source $HOME/.rvm/scripts/rvm

Install Ruby via RVM

[openproject@centos]# rvm autolibs disable       
[openproject@centos]# rvm install 2.1.0       
[openproject@centos]# gem install bundler

Make sure that

bundle —version

is 1.5.1 or higher. If not, update the bundler gem.

4. Install OpenProject

[openproject@centos]# git clone https://github.com/opf/openproject.git

[openproject@centos]# cd openproject

[openproject@centos]# git checkout stable

[openproject@centos]# bundle install

Fix appeared error by:

[openproject@centos]# gem install pg -v '0.17.1' -- --with-pg-config=/usr/pgsql-9.3/bin/pg_config

[openproject@centos]# bundle install

5. Configure OpenProject

Please, be aware that database configuration file and configuration file are “ident-sensitive” and consistence of these files are crutial to have working environment (email notifications, database connections, etc.

*Create and configure file in ../openproject/config/database.yml.
It should look like this:*

production:
      adapter: postgresql
      encoding: utf8
      database: openproject
      pool: 5
      username: openproject
      password: openproject
development:
      adapter: postgresql
      encoding: utf8
      database: openproject_development
      pool: 5
      username: openproject
      password: openproject
test:
      adapter: postgresql
      encoding: utf8
      database: openproject_test
      pool: 5
      username: openproject
      password: openproject

Configure email notifications (using gmail account) by creating configuration.yml in openproject/config directory

development:                         #main level
email_delivery_method: :smtp         #main level, will not work

default:                             #main level
  email_delivery_method: :smtp       #setting for default
  smtp_address: smtp.gmail.com       #setting for default
  smtp_port: 587
  smtp_domain: smtp.gmail.com
  smtp_user_name: ***@gmail.com
  smtp_password: ****
  smtp_enable_starttls_auto: true
  smtp_authentication: plain

Install plugins (Optional)
Create Gemfile.plugins file in openproject directory and paste these files:

Please aware, that all of the plugins are currently in beta state, so after final release, the installation could be different. Consider this step and if you don’t want to install plugins, just skip this step and go to “Finish installation of OpenProject”

gem "pdf-inspector", "~>1.0.0", :group => :test
gem "openproject-meeting", :git => "https://github.com/finnlabs/openproject-meeting.git", :branch => "stable"
gem "openproject-pdf_export", git: "https://github.com/finnlabs/openproject-pdf_export.git", :branch => "stable"
gem "openproject-plugins", git: "https://github.com/opf/openproject-plugins.git", :branch => "stable"
gem "openproject-backlogs", git: "https://github.com/finnlabs/openproject-backlogs.git", :branch => "stable"

Finish installation of OpenProject

[openproject@centos]# cd /home/openproject/openproject

[openproject@centos]# bundle exec rake db:create:all 

[openproject@centos]# bundle exec rake db:migrate

[openproject@centos]# RAILS_ENV="production" bundle exec rake db:seed
[openproject@centos]# bundle exec rake generate_secret_token     
[openproject@centos]# RAILS_ENV="production" bundle exec rake db:migrate

Precompile OpenProjects assets

[openproject@centos]# RAILS_ENV="production" bundle exec rake assets:precompile

Install Apache with Passenger to autostart OpenProject with OS and loadbalance traffic

Install necessary packages

[root@centos]# yum install httpd curl-devel httpd-devel apr-devel apr-util-devel

Grant permission for passenger

[root@centos]# chmod o+x "/home/openproject"

[root@centos]# su - openproject -c "bash -l"

Install Passenger gem

[openproject@centos]# gem install passenger

Compile Passenger for Apache and follow instructions for pasting settings to httpd and virtualhost
Just install it with default values and read statements if there are any errors :)

[openproject@centos]# passenger-install-apache2-module

Add this lines to /etc/httpd/conf/httpd.conf:

LoadModule passenger_module /home/openproject/.rvm/gems/ruby-2.1.0/gems/passenger-4.0.37/buildout/apache2/mod_passenger.so
   <IfModule mod_passenger.c>
     PassengerRoot /home/openproject/.rvm/gems/ruby-2.1.0/gems/passenger-4.0.37
     PassengerDefaultRuby /home/openproject/.rvm/gems/ruby-2.1.0/wrappers/ruby
   </IfModule>

Create VirtualHost file for Apache:

[root@centos]# vim /etc/httpd/conf.d/openproject.conf

Paste these lines into it:

   <VirtualHost *:80>
      ServerName www.myopenprojectsite.com
      # !!! Be sure to point DocumentRoot to 'public'!
      DocumentRoot /home/openproject/openproject/public    
      <Directory /home/openproject/openproject/public>
         # This relaxes Apache security settings.
         AllowOverride all
         # MultiViews must be turned off.
         Options -MultiViews
      </Directory>
   </VirtualHost>

Finally disable temporarly SELINUX and iptables to be able to access your apache from another computer

[root@centos]# setenforce 0

[root@centos]# service iptables disable

Start Apache

[root@centos]# service httpd start

Now your OP should be accesible on IP address and port 80 (http) of the PC where you have successfully installed openproject.

Please, notice, that disabling SELINUX and iptables is really not good way how to finish this installation. This guide is only for testing purposes and to be able to install OP as soon as possible. Configuring Apache (SSL etc.) and iptables is another topic.

*Any comments are appreciated here:
https://www.openproject.org/topics/576?r=633.*

Loading...