Thursday, October 1, 2015

Redmine - Installation / Upgradation / Backup-Restore On Ubuntu 14.04

                        Redmine is a flexible project management web application. Written using Ruby on Rails framework, it is cross-platform and cross-database. Its main features are:
  1. Multiple projects support
  2. Flexible role based access control and Flexible issue tracking system 
  3. Gantt chart and calendar and News, documents and files management 
  4. Per project wiki and Per project forums and Simple time tracking functionality 
  5. Custom fields for issues, projects and users and SCM integration (SVN, CVS, Mercurial)
  6. Multiple LDAP authentication support and User self-registration support
    Bitnami Structure and Configuration
                                              The applications in Bitnami are installed in the 'apps' folder that you can find in the installation directory. In virtual machines, cloud images and in Bitnami Cloud hosting servers the installation directory is /opt/bitnami.
    The main folders that you can find inside 'apps/redmine' are the following:
    • conf: folder that includes the apache configuration files for redmine
    • htdocs: this folder includes the redmine files (Gemfile and Rakefile files, redmine configuration files, plugins folder, gems, etc).
    • The location of the redmine configuration files (database configuration, email settings, etc) is the 'apps/redmine/htdocs/config' folder.
    Start / Stop the Services On Redmine Server
                                                     Each Bitnami stack includes a control script that lets you easily stop, start and restart servers.The script is located at /opt/bitnami/ctlscript.sh or Installation Directory Which you are selected. Call it without any arguments to restart all services:                             
    $ sudo /opt/bitnami/ctlscript.sh start
                  OR
    $./ctlscript.sh start / stop /restart
    The same way use it to restart a specific service only by passing the service name as argument - eg:- mysql
                             $ sudo /opt/bitnami/ctlscript.sh restart mysql         
      Fresh Installation Of Bitnami Redmine On Ubuntu 14.04
    1. Download the latest stable versions from redmine.org      
    2. Copy the bitnami-redmine-3.1.1-0-linux-x64-installer.run package to Server
    3. Set executable permission
    $chmod +x bitnami-redmine-3.1.1-0-linux-x64-installer.run
        4. Install the bitnami redmine
    $./bitnami-redmine-3.1.1-0-linux-x64-installer.run
    Note :- During the installation time set the MYSQL root Password and Redmine admin user
                Backup And Restore Redmine
                                               Bitnami stacks are self-contained and the simplest option for performing a backup is to copy or compress the Bitnami stack installation directory. To do so in a safe manner, you will need to stop all servers, so this method may not be appropriate if you have people accessing the application continuously.
    Backup
    1. Stop All Services                
    ictops@ubuntu:~opt/redmine-3.1.1-0$./ctlscript.sh stop
        2.   Copy  all Contents from directory-FILES
    ictops@ubuntu:~opt/redmine-3.1.1-0/apps/redmine/htdocs/files$
        3.   Took Database backup Via SQLYOg or Command Line
    Restore :-
    1. Import the DB into the new server and modified the database.yml file
    2. Restore all files from which you are backed up into the new server directory named -FILES
    3. After Importing DB into the New server, need to migrate DB(Which is mentioned in the Upgradation steps)
    Upgrade Remine / Restore the Old Redmine Data and DB to New Redmine
                                   It is strongly recommended that you create a backup before starting the update process. If you have important data, it is advisable that you create and try to restore a backup to ensure that everything works properly.
                                  In the Redmine case, these are the steps to migrate the database from an old version to a new one.
    1. Login into the new Redmine Server
    2. Copy the database backup to the new Bitnami version server.
    3. Stop all servers and start only MySQL. Note that the installation directory could be different.
                 $ sudo /opt/redmine-3.1.1-0/ctlscript.sh stop
                $ sudo /opt/redmine-3.1.1-0/ctlscript.sh start mysql
    1. Remove the previous database and create the new one. You can configure the database user password with a secure password.
            /opt/redmine-3.1.1-0/mysql/bin/$ mysql -u root -p
    Password: ****
    mysql> drop database bitnami_redmine;
    mysql> create database bitnami_redmine;
    mysql> grant all privileges on bitnami_redmine.* to 'ictops_redmine'@'localhost' identified by 'DATABASE_PASSWORD'
    1. Restore the new database:
    $ mysql -u root -p bitnami_redmine < backup.sql
    1. Edit the Redmine configuration file to update the database user password (/opt/redmine-3.1.1-0/apps/redmine/htdocs/config/database.yml)
    production:
     adapter: mysql2
     database: bitnami_redmine
     host: localhost
     username: ictops_redmine
     password: "DATABASE_PASSWORD"
     encoding: utf8
    1. Migrate the database to the latest version:
    Note :- You should start the "Use Redmine" command prompt from the Windows Start Menu. On Linux or OS X, you should run this command from a "use_redmine" console.
    $ cd /opt/redmine-3.1.1-0/
    /opt/redmine-3.1.1-0/$ ./use_redmine
    $ cd /opt/redmine-3.1.1-0/apps/redmine/htdocs
    $ ruby bin/rake db:migrate RAILS_ENV=production

    No comments:

    Post a Comment

    bloggerwidgets