How to install Open Project in Centos/RHEL 6.X

how to install openproject in centos/rhel 6.x


What is Open Project?

OpenProject is a web-based project management system for location-independent team collaboration. This open source application is released under the GNU General Public License Version 3 and is continuously developed by an active open source community.

Step: 1. Bind Hosts File :

# vi /etc/hosts ser1

— save and quit (:wq) —

Step: 2. Disable Selinux & Firewall :

# vi /etc/sysconfig/selinux


--- save and quit (:wq) ---


# service iptables stop
 # chkconfig iptables off

Step: 3. Install EPEL Repo :

# rpm -ivh

Step: 4. Install NTP :

# yum -y install ntp
 # service ntpd restart
 # chkconfig ntpd on
 # ntpdate

Step: 5. Install Required Packages :

# yum -y install git curl curl-devel wget mlocate libyaml libxml2 libxml2-devel libxslt-devel libxml2-devel ruby-mysql \
 mysql-devel ImageMagick-c++ ImageMagick-devel graphviz graphviz-ruby graphviz-devel memcached sqlite-devel zlib zlib-devel \
 httpd httpd-devel apr-devel apr-util-devel man libffi-devel readlinedevel pidentd patch mysql mysql-devel mysql-server \
 postgresql-devel nodejs npm

Install  Development tools

# yum -y groupinstall "Development tools"

Step: 6. Start the Services :

# service httpd restart
 # chkconfig httpd on
 # service mysqld restart
 # chkconfig mysqld on

Configure the  Database

# mysql_secure_installation

Step: 7. Create User & Database for OpenProject:

# groupadd openproject
 # useradd --create-home --gid openproject openproject
 # passwd openproject
 # mysql -u root -predhat -e "CREATE DATABASE openproject CHARACTER SET utf8;"
 # mysql -u root -predhat -e "grant all privileges on openproject.* to openproject@'localhost' identified by 'redhat';"
 # mysql -u root -predhat -e "flush privileges;"

Step: 8. Install Ruby via RVM :

# su - openproject

$ gpg2 --keyserver hkp:// --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
$curl -L | bash -s stable
$ source $HOME/.rvm/scripts/rvm
$ vi /home/openproject/.bash_profile

Add These lines:

source "/home/openproject/.profile"
 source "/home/openproject/.rvm/scripts/rvm"

— save and quit (:wq) —


 $ rvm autolibs disable
 $ rvm install 2.1.0
 $ gem install bundler
 $ git clone
 $ cd openproject
 $ bundle install
 $ ruby -v
 $ gem -v

Step: 9. Setup DB Environment for OpenProject :

$ cd /home/openproject/openproject/config
 $ cp database.yml.example database.yml
 $ vi database.yml

Comment Out Development & Test Section & Change on Production Section Like Below :

 adapter: mysql2
 database: openproject
 host: localhost
 username: openproject
 password: mypassword
 encoding: utf8

— save and quit (:wq) —

 $ cd /home/openproject/openproject/frontend/
 $ npm install
 $ cd /home/openproject/openproject
 $ RAILS_ENV=production bundle exec rake generate_secret_token
 $ RAILS_ENV=production bundle exec rake db:create:all
 $ RAILS_ENV=production bundle exec rake db:migrate
 $ RAILS_ENV=production bundle exec rake db:seed
 $ rake secret

Note down the Secret Code/Number.

$ vi /home/openproject/openproject/config/secrets.yml

modify the last line with new generated secret code after “:” sign at production section

 secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>

Change "<%= ENV["SECRET_KEY_BASE"] %>" with the secret key

--- save and quit (:wq) ---


$ RAILS_ENV="production" bundle exec rake assets:precompile

Step: 10. Configure Email notifications for OpenProject :

$ cd /home/openproject/openproject/config
 $ cp configuration.yml.example configuration.yml
$ vi configuration.yml

Add & Change Email Section as Per need.

 email_delivery_method: "smtp"
 smtp_enable_starttls_auto: true
 smtp_address: ""
 smtp_port: 587
 smtp_domain: "" # '' for GoogleApps
 smtp_authentication: :plain
 smtp_user_name: ""
 smtp_password: "your_password"

--- save and quit (:wq) ---

Step: 11. Install Passenger & Apache Module :

$ cd /home/openproject/openproject
$ gem install passenger
$ passenger-install-apache2-module

Press ! and select only the ruby and nodejs
Once this is done, you will get message like following (don’t copy/paste from here, but from your output!):

Please edit your Apache configuration file, and add these lines:

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

So, add the above lines to /etc/httpd/conf/httpd.conf (i.e. text that appeared when you compiled on your system)

$ exit

Step: 12. Configure Apache Environment for OpenProject :

# vi /etc/httpd/conf/httpd.conf

Add this Line at Line No. 202

LoadModule passenger_module /home/openproject/.rvm/gems/ruby-2.1.0/gems/passenger-4.0.42/buildout/apache2/

Add these Lines at Line No: 377

<IfModule mod_passenger.c>
 PassengerRoot /home/openproject/.rvm/gems/ruby-2.1.0/gems/passenger-4.0.42
 PassengerDefaultRuby /home/openproject/.rvm/gems/ruby-2.1.0/wrappers/ruby

— save and quit (:wq) —

Step: 13. Configure Apache Vhost For OpenProject :

# vi /etc/httpd/conf.d/openproject.conf

<VirtualHost *:80>
 # !!! 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

--- save and quit (:wq) ---
# chmod o+x /home/openproject
 # service httpd restart

Now  from your  browser check

User: admin
Pass: admin



Please  note : This Tutorials has been sent by an contributor and not tested by Unixmen admin team. please review the text and let us know if any corrections needed to put it here.