Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Saturday, 17 September 2016

How to Install & Configure Redmine 3 on Ubuntu 14.04

How to Install & Configure Redmine 3 on Ubuntu 14.04


Q. What is Redmine ?

-- Redmine is a free and open source, web-based project management and issue tracking tool, Written using the Ruby on Rails framework. It allows users to manage multiple projects and associated sub projects. It features per project wikis and forums, time tracking, and flexible role based access control.

Features :

1. Multiple Projects Support.
2. Flexible Role Based Access Control
3. Flexible Issue Tracking System etc.

Step: 1. Set Host Name :

# hostname tickets.domain.com
# vi /etc/hostname

tickets.domain.com

-- Save & Quit (:wq)

Step: 2. Bind Host File :

# vi /etc/hosts

10.100.97.137    tickets.domain.com    tickets

-- Save & Quit (:wq)

Step: 3. Update the System :

# apt-get update
# apt-get -y upgrade

Step: 4. Install Prerequisites :

# apt-get -y install apache2 apache2-utils apache2-threaded-dev apache2-prefork-dev \
    libapache2-mod-passenger make automake autoconf cmake openssl libcurl4-openssl-dev \
    libapr1-dev libaprutil1-dev libmysqlclient-dev wget

# apt-get -y install php5 libapache2-mod-php5 php5-mysql libapache2-mod-perl2 libssl-dev \
    libmagickcore-dev libmagickwand-dev curl git-core patch build-essential bison zlib1g-dev \
    libxml2-dev autotools-dev libxslt1-dev libyaml-0-2 libreadline6-dev libyaml-dev libtool \
    imagemagick libicu-dev libssh2-1 libssh2-1-dev libgpg-error-dev

Step: 5. Install Ruby & Gem with Rails :

# apt-get -y remove ruby
# curl -#LO https://rvm.io/mpapis.asc
# gpg --import mpapis.asc
# curl -sSL https://get.rvm.io | bash -s stable
# source /etc/profile.d/rvm.sh
# rvm requirements
# rvm install 2.3.0
# rvm use 2.3.0 --default

Step: 6. To Check Ruby & Gem Version :

# ruby -v
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]

# gem -v
2.5.1

Step: 7. Install Passenger :

# gem install passenger
# passenger-install-apache2-module

Press Enter and Press " ! " and Make Sure you Select only the 'ruby' one.

**LOOK CAREFULLY after successfully installing it give codes .we must edit in our apache. FOR ME .It may be other for you. ========================================================================
LoadModule passenger_module /usr/local/rvm/gems/ruby-2.3.0/gems/passenger-5.0.30/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
    PassengerRoot /usr/local/rvm/gems/ruby-2.3.0/gems/passenger-5.0.30
    PassengerDefaultRuby /usr/local/rvm/gems/ruby-2.3.0/wrappers/ruby
</IfModule>
=========================================================================

Step: 8. To Load the Passenger Module into Apache :

# vi /etc/apache2/mods-available/passenger.load

-- Delete the LoadModule Line & Paste the Below Module.

LoadModule passenger_module /usr/local/rvm/gems/ruby-2.3.0/gems/passenger-5.0.30/buildout/apache2/mod_passenger.so

-- Save & Quit (:wq)

# vi /etc/apache2/mods-available/passenger.conf

-- Delete Everything & Paste the Below Code.

<IfModule mod_passenger.c>
    PassengerRoot /usr/local/rvm/gems/ruby-2.3.0/gems/passenger-5.0.30
    PassengerDefaultRuby /usr/local/rvm/gems/ruby-2.3.0/wrappers/ruby
</IfModule>

-- Save & Quit (:wq)

# a2enmod passenger

Step: 9. Now, you can Download the Latest Version of Redmine :

# cd /var/www
# wget http://www.redmine.org/releases/redmine-3.0.4.tar.gz
# tar zxf redmine-3.0.4.tar.gz
# rm redmine-3.0.4.tar.gz
# mv redmine-3.0.4 redmine
# chown -R www-data:www-data /var/www/redmine
# chmod -R 775 /var/www/redmine
# touch /var/www/redmine/log/production.log
# chown root:www-data /var/www/redmine/log/production.log
# chmod 664 /var/www/redmine/log/production.log

Step: 10. Start the Apache Server :

# service apache2 restart

Step: 11. Install MySQL Server :

# apt-get -y install mysql-server mysql-client

New password for the MySQL "root" user: redhat
Repeat password for the MySQL "root" user: redhat

Step: 12. Create Database for Redmine :

# mysql -u root -p
Enter Password:

mysql> create database redminedb character set utf8;
mysql> grant all privileges on redminedb.* to redmine@'localhost' identified by 'password';
mysql> flush privileges;
mysql> exit

Step: 13. Now, Install the Gem file and the bundler :

# gem install rake rack i18n rubytree RedCloth mysql coderay rails jquery-rails fastercsv builder mime-types awesome_nested_set activerecord-jdbc-adapter selenium-webdriver shoulda mysql2

# cd /var/www/redmine
# gem install bundler
# bundle install --without development test rmagick

Step: 14. Setup the Database Connection for Redmine :

# cd /var/www/redmine/config
# mv database.yml.example database.yml
# vi database.yml

In the 'production' Section, update the 'database', username, password and other Parameters Accordingly like so :

production:
  adapter: mysql2
  database: redminedb
  host: localhost
  username: redmine
  password: "password"
  encoding: utf8

-- Save & Quit (:wq)

Step: 15. Create the Virtual host files for running Redmine :

# mv /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/000-default.conf.bak
# cd /etc/apache2/sites-enabled
# unlink 000-default.conf
# vi /etc/apache2/sites-available/redmine.conf

<VirtualHost *:80>
ServerName redmine

DocumentRoot /var/www/
Alias /tickets /var/www/redmine/public

<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/redmine>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
<Directory /var/www/redmine/public>
PassengerEnabled on
SetHandler none
PassengerAppRoot /var/www/redmine
RailsBaseURI /redmine
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>

-- Save & Quit (:wq)

# a2ensite redmine.conf

Step: 16. Restart Apache Server :

# service apache2 restart

Step: 17. Set Environment to "production" Environment :

# cd /var/www/redmine/config
# vi environment.rb

Note: If there is line uncomment it, if not just proceed ahead.

ENV['RAILS_ENV'] ||= 'production'

-- Save & Quit (:wq)

Step: 18. In Terminal, use Following Command :

# cd /var/www/redmine/
# bundle install
# RAILS_ENV=production bundle exec rake generate_secret_token
# RAILS_ENV=production bundle exec rake db:migrate
# RAILS_ENV=production bundle exec rake redmine:load_default_data

Type 'en' when asked & Press Enter.

Step: 19. Rename dispatch CGI files in /redmine/public/ :

# cd /var/www/redmine/public
# mv dispatch.fcgi.example dispatch.fcgi
# cp htaccess.fcgi.example .htaccess

Step: 20. Fix Rights for the Apache user :

# chown -Rf www-data:www-data /var/www/redmine

Step: 21. Restart the Apache Server :

# service apache2 restart

Step: 22. Point Your Web Browser & Type :

http://ip_address_server/redmine
or
http://domain_name/redmine
User: admin
Pass: admin

Thanks For Visiting on My Blog, For More Tutorials Keep Visiting My Blog

0 comments:

Post a Comment

Copyright © 2016 Kousik Chatterjee's Blog