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

192.168.72.220 ser1.example.com ser1

— save and quit (:wq) —

Step: 2. Disable Selinux & Firewall :

# vi /etc/sysconfig/selinux

SELINUX=disabled

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

Also

# service iptables stop
 # chkconfig iptables off

Step: 3. Install EPEL Repo :

# rpm -ivh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

Step: 4. Install NTP :

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

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://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
$curl -L https://get.rvm.io | 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 https://github.com/opf/openproject.git
 $ 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 :

production:
 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

production:
 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.

production:
 email_delivery_method: "smtp"
 smtp_enable_starttls_auto: true
 smtp_address: "smtp.gmail.com"
 smtp_port: 587
 smtp_domain: "smtp.gmail.com" # 'your.domain.com' for GoogleApps
 smtp_authentication: :plain
 smtp_user_name: "your_email@gmail.com"
 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/mod_passenger.so
 <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
 </IfModule>

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/mod_passenger.so

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
 </IfModule>

— save and quit (:wq) —

Step: 13. Configure Apache Vhost For OpenProject :

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

<VirtualHost *:80>
 ServerName srv1.centos.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>

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

Now  from your  browser check

http://your_ip_Address
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.