Redmine Cookbook - Aleksandar Pavic - E-Book

Redmine Cookbook E-Book

Aleksandar Pavic

0,0
39,59 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

Over 80 hands-on recipes to improve your skills in project management, team management, process improvement, and Redmine administration

About This Book

  • Efficiently install and customize Redmine for your own infrastructure, whether that be Microsoft or open source
  • Manage multiple projects with multiple teams across the globe in a standardized and effective way
  • Customize Redmine to fit your organisation's specific and unique needs

Who This Book Is For

This book is for those who working in management or administrator positions who are already using Redmine or are willing to start using it for project management, tracking, collaboration, or process management. Additionally, individual developers or teams can benefit from recipes related to code repositories, bug tracking, and software project management.

What You Will Learn

  • Make Redmine run on Microsoft SQL Server with IIS
  • Enjoy the benefits of updating the code on a real-time basis and maintaining consistency
  • Manage multiple projects and teams simultaneously
  • Leverage Redmine features to enhance team's performance
  • Use Redmine for SCRUM and Agile methodologies
  • Deploy Redmine for Service Desk
  • Customize the user experience by manually tracking the ongoing projects
  • Extend Redmine through various plugins

In Detail

In a variety of online project management tools, Redmine markets itself as offering flexibility. Choosing the right management tool can mean the difference between the success and failure of a project. Flexible project management tools bend themselves to fit your needs, whether that's communication regarding a simple project, or collaboration, or more complex project methodology such as SCRUM, or an issue-code relationship, or the need of different methodology for your project.

Whether you are project manager or system administrator, this book provides valuable recipes to get the best possible performance out of your team, organization, infrastructure, and Redmine itself. Through a series of carefully crafted recipes covering the nitty-gritty of Redmine, you'll be guided through the installation of Redmine, as well as how to fine-tune and customize your Redmine installation. Finally, we walk you through integrating Redmine with other softwares and databases like Tortoise SVN and Visual Studio and troubleshooting Redmine.

Style and approach

This book follows a step-by-step recipe-based approach. Detailed prerequisites make each recipe easy to follow and apply in practice in any kind of live environment.

Sie lesen das E-Book in den Legimi-Apps auf:

Android
iOS
von Legimi
zertifizierten E-Readern

Seitenzahl: 327

Veröffentlichungsjahr: 2016

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Table of Contents

Redmine Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Sections
Getting ready
How to do it…
How it works…
There's more…
See also
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Installing and Running Redmine
Introduction
Default installation on an Ubuntu server
Getting ready
How to do it…
Accessing your Redmine
How it works…
There's more…
See also
Installing from a source on Ubuntu
Getting ready
Database configuration
How to do it…
Obtaining the Redmine source files
Downloading and extracting the Redmine source files
The SVNcheckout method
Redmine installation
How it works…
See also
Installation on Windows servers
Getting ready
How to do it…
How it works…
See also
Using Puma and IIS on Windows
Getting ready
How to do it…
Testing Puma
Configuring Puma to start with Windows
Configuring IIS
How it works…
There's more…
See also
Running with Apache as mod_fcgid
Getting ready
How to do it…
How it works…
There's more…
See also
Running Redmine with Phusion Passenger
Getting ready
How to do it…
How it works…
There's more…
See also
Running Redmine with Nginx and Thin
Getting ready
How to do it…
Configuring thin
Configuring Nginx
Configuring Redmine for sub-uri
Testing the installation
How it works…
There's more…
See also
Installing optional requirements
How to do it…
ImageMagick and rmagick
Installing SCM binaries
How it works…
There's more…
Using custom Ruby for Redmine
Getting ready
Preparing for Ubuntu servers
Preparing for Cent OS servers
RVM installation
How to do it…
How it works…
There's more…
See also
2. Customizing Redmine
Introduction
Customizing My page
How to do it…
How it works…
There's more…
See also
Editing Redmine's views manually
Getting ready
How to do it…
How it works…
There's more…
See also
Customizing modules per project
Getting ready
How to do it…
Existing projects
How it works…
There's more…
Extending user profiles with additional data
Getting ready
How to do it…
How it works…
There's more…
See also
Customizing User roles
Getting ready
How to do it…
How it works…
There's more…
See also
Creating and using User groups
Getting ready
How to do it…
How it works…
There's more…
See also
Customizing the layout of the project entry page
Getting ready
How to do it…
How it works…
There's more…
See also
Customizing the layout of the home page
Getting ready
How to do it…
How it works…
There's more…
See also
Interacting with Redmine only through e-mail
Getting ready
How to do it…
Linux users
Windows users
How it works…
There's more…
See also
3. Project Management with Redmine
Introduction
Splitting your project into phases
Getting ready
How to do it…
How it works…
There's more…
See also
Creating and using subprojects
Getting ready
How to do it…
How it works…
There's more…
Splitting your tasks into subtasks
How to do it…
How it works…
There's more…
Managing issue relations
How to do it…
How it works…
There's more…
See also
Creating and using template projects
How to do it…
How it works…
There's more…
See also
Managing multiple projects simultaneously
How to do it…
How it works…
There's more…
See also
Creating reports on spent time
How to do it…
How it works…
There's more…
Making sure everyone is optimally loaded with work
Getting ready
How to do it…
How it works…
There's more…
Relating between issue and time
How to do it…
How it works…
There's more…
See also
Using the issue-code relation
Getting ready
How to do it…
Configuring per-tracker workflows
Using the issue-code relationship via source-control
How it works…
There's more…
See also
Defining a roadmap to the release plan
Getting ready
How to do it…
Roadmaps and versions
How it works…
There's more…
See also
4. Improving Team Performance
Introduction
Keeping relevant documentation in Redmine
How to do it…
How it works…
There's more…
See also
Putting the timeline to good use
How to do it…
Tracking project activity
Using gravatars
How it works…
There's more…
See also
Making sure that everyone is informed
How to do it…
Assigning issues with watchers
Assigning issues to groups
How it works…
There's more…
See also
Limiting access to some team members
How to do it…
Locking users
Shifting roles
Deleting user accounts
How it works…
There's more…
See also
Using metrics to improve team performance
Getting ready
How to do it…
Project issue metrics
Version metrics
User metrics
Time metrics
How it works…
There's more…
See also
Analyzing team performance through the code repository
Getting ready
How to do it…
How it works…
There's more…
See also
Using the repository module to display code differences
Getting ready
How to do it…
Viewing the differences between two repository revisions or revisions per folder
To view the code differences of a particular folder
Viewing differences between two versions of the same file
How it works…
There's more…
See also
Managing multicultural teams in different time zones
How to do it…
Work organization
Setting up Redmine multilanguage and time zone features
How it works…
There's more…
See also
Applying advanced issue-code relationships
Getting ready
How to do it…
There's more…
See also
Improving Scrum meetings and backlogs
How to do it…
Saving time required to prepare for Scrum meetings
Improving backlogs and the overall Scrum process
How it works…
There's more…
See also
5. Regular and Planned Maintenance
Introduction
Starting and restarting Redmine
Getting ready
How to do it…
Restarting Redmine under Phusion Passenger
Restarting Redmine on Puma
Restarting Redmine on another application server
How it works…
There's more…
See also
Checking for active Redmine processes on the server
Getting ready
How to do it…
Checking the status of Phusion Passenger under Linux
Checking servers under Windows
How it works…
There's more…
See also
Configuring backup and recovery
Getting ready
How to do it…
Backing up the database
Backing up files
Restoring a backup
Restoring a database
Restoring files
How it works…
There's more…
See also
Checking the data dirs for possible malware
Getting ready
Linux machines
Windows users
How to do it…
How it works…
There's more…
See also
Migrating and upgrading
Getting ready
How to do it…
Migrating Redmine
How it works…
See also
Upgrading or migrating the database behind Redmine
Getting ready
How to do it…
How it works…
There's more…
See also
Enhancing security
Getting ready
How to do it…
How it works…
There's more…
See also
Upgrading Ruby safely
Getting ready
How to do it…
How it works…
There's more…
See also
6. Performance and System Tuning
Introduction
Fine-tuning new project creation
Getting ready
How to do it…
How it works…
There's more…
Tuning authentication and auto-login features
How to do it…
How it works…
There's more…
See also
Tuning the workflows
How to do it…
How it works…
There's more…
Setting the log level
Getting ready
How to do it…
How it works…
There's more…
Getting the most from a single server
How to do it…
Step 1: Plan your usage
Step 2: Increase the number of threads or processes in the memory of your application server
Step 3: Allocate more CPU and RAM for the database
How it works…
There's more…
See also
Scaling Redmine across multiple servers
Getting ready
How to do it…
How it works…
There's more…
See also
Increasing file upload size
How to do it…
How it works…
See also
Integrating Redmine with Active Directory
Getting ready
How to do it…
How it works…
There's more…
See also
7. Integrating Redmine with Other Software
Introduction
Exporting to Microsoft Project
Getting ready
How to do it…
How it works…
There's more…
Using Redmine through browser plugins
How to do it…
How it works…
There's more…
Using Redmine mobile applications
Getting ready
How to do it…
Application installation
Application configuration
How it works…
There's more…
See also
Activity monitoring through Atom feed
Getting ready
How to do it…
How it works…
See also
Embedding Redmine into a web application
Getting ready
How to do it…
How it works…
There's more…
See also
Using the Redmine REST API with PHP
Getting ready
How to do it…
How it works…
There's more…
Using the Redmine REST API with C#
Getting ready
How to do it…
How it works…
There's more…
See also
Integrating with Tortoise SVN or GIT
Getting ready
How to do it…
How it works…
Interacting with Redmine from Visual Studio
Getting ready
How to do it…
How it works…
There's more…
8. Getting the Most Out of Scripts and Plugins
Introduction
Pasting images from clipboard
Getting ready
How to do it…
How it works…
There's more
Keeping track of your clients
How to do it…
How it works…
See also
Redmine for document management
Getting ready
How to do it…
How it works…
There's more…
See also
Implementing and using reoccurring tasks
Getting ready
How to do it…
Plugin usage

Redmine Cookbook

Redmine Cookbook

Copyright © 2016 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

First published: February 2016

Production reference: 1190216

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham B3 2PB, UK.

ISBN 978-1-78528-613-1

www.packtpub.com

Credits

Author

Aleksandar Pavić

Reviewer

Jijesh Mohan

Acquisition Editor

Aaron Lazar

Content Development Editor

Priyanka Mehta

Technical Editor

Siddhesh Patil

Copy Editor

Priyanka Ravi

Project Coordinator

Izzat Contractor

Proofreader

Safis Editing

Indexer

Monica Ajmera Mehta

Graphics

Disha Haria

Production Coordinator

Conidon Miranda

Cover Work

Conidon Miranda

About the Author

Aleksandar Pavić began his first project as a student at the Faculty of Technical Sciences, Novi Sad, Serbia where he developed Technical Faculty's first website. He later assembled a web team and graduated with BScs in computers sciences and information technology, and an MSc in product lifecycle management at the same university.

Acting mainly as a project manager and sometimes as a developer or team leader, Aleksandar made the following notable projects possible: student nourishment IS and ERP with smart cards at the University of Novi Sad, Novi Sad Farmer Market IS and ERP, E-government system of Novi Sad, including various sub-services, a web portal of the City of Novi Sad, Los Angeles-based Usamailagent.com packet-forwarding web-application, Unival-logistics.com online business system.

Currently, Aleksandar is employed as head of the IT services department at PUC Informatika, Novi Sad. He is involved in the following EU-funded Projects here: Sociotal, Weelive, and CLIPS.

Acting as an entrepreneur, he stands behind www.redminegit.com, cloud hosting, and Redmine implementations.

Aleksandar has two publications on Redmine. The first is a paper called "Project Management Using Open Source Internet Tools" in the fourth ICEIRD Conference,pp. 987-994, ISBN 978-608-65144-2-6. The second is "Monographic Publication - Master Thesis: Application of Project Management Software to Science and Educational Processes", published in Proceedings of Faculty of Technical Sciences 04/2014, ISSN 0350-428X, COBISS.SR-ID 58627591.

While participating in projects, he acts as an open source evangelist, and he advocates usage of lean methodologies backed up by Redmine as the management software of choice.

Aleksandar uses various management skills, such as, project management, product and service management, ISO 27000 and ITIL, Scrum and Agile methodologies, on a daily basis. He is also proficient in PHP, CakePHP, Ruby, Ruby on Rails, JavaScript, Bootstrap, C#, jQuery, Apache, Linux, Ubuntu, CentOs, Nginx, Phusion Passenger, Node.js, HTML5, Canvas, CentOS, Windows Servers, IIS, MySQL, PostgreSQL, and Microsoft SQL Server.

This book would not be possible without my lovely wife who understands that working on my laptop in a Wi-Fi cafe bar while being on summer vacation is sometimes necessary to accomplish a notable result. Thanks to professors Bojan Lalic and Nenad Simeunovic from the University of Novi Sad with whom I started my project management quest. Thanks to all my colleagues, clients, and partners for using Redmine and understanding that work needs to be planned and organized because without them I wouldn't know what to write about.

Of course, a special thanks to Jean-Philippe Lang and rest of Redmine's contributors for their efforts to maintain and improve Redmine as an open source product over last 10 years. Another special thanks to the people at Packt Publishing for all their hard work and providing me with an opportunity to express myself as international author and to give back to open source community by making Redmine a more credible and well-known product.

About the Reviewer

Jijesh Mohan is a computer science engineer with over 10 years of experience as a full stack developer. As an active evangelist of Redmine since 2009, Jijesh has been a passionate supporter of the Redmine community and has authored multiple plugins. His expertise ranges across several technologies, such as Ruby on Rails, Golang, ReactJS, and AngularJS.

www.PacktPub.com

Support files, eBooks, discount offers, and more

For support files and downloads related to your book, please visit www.PacktPub.com.

Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at <[email protected]> for more details.

At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.

https://www2.packtpub.com/books/subscription/packtlib

Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books.

Why Subscribe?

Fully searchable across every book published by PacktCopy and paste, print, and bookmark contentOn demand and accessible via a web browser

Free Access for Packt account holders

If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view 9 entirely free books. Simply use your login credentials for immediate access.

Preface

Redmine is probably the most underused collaboration and management tool existing on the open source market for 10 years. Decision makers within corporations are often unaware of Redmine's full potential and ability to expand in all areas of business just by performing several actions inside Redmine and agreeing to several conventions within the company. Almost all departments of a company can store its documents, collaborate, coordinate, and benefit from its usage over an extended period of time because in every business it's crucial to know who did (or who is going to do) what, when, and why. So for example, in software development, one Redmine ticket within feature tracker can tell us who is going to do what—fulfill the client's request, such as export report to Excel; why—because it is the customer's request from within project A; when—the date when tasks were scheduled or done. Additionally, we can take a look at how it's done using issue-code relation. However, this should not just be limited to software if it's a design project, for example. Designers can also attach their design to a particular Redmine ticket/task if they use repository to store files. If it's a janitor company, then they can store photos of before and after repair, and so on.

Instead of just installing Redmine and using its features out of the box, this book tries to teach readers to think outside the box, and customize Redmine to improve user experience, customize workflows, and harness the power of its flexible design.

Choosing the right management tool can mean the difference between success and failure of a project. Flexible project management tools bend themselves to fit your needs. Whether it's a simple project communication, collaboration, or more complex project methodology, such as SCRUM, or issue-code relationship, or different methodology for each project, this book will teach you how to quickly customize Redmine for maximal business benefits and user satisfaction. It goes even further than project management and collaboration, illustrating how Redmine's flexible trackers could be used for automated recurring tasks and processes. Additionally, readers are advised to visit the book's website at http://www.redminecookbook.com and take a look at the blog and frequently asked questions section.

Note

Redmine is open source and donation supported, driven mostly by volunteers who donate their skills and time toward the project. They also need to pay for servers, computers they develop on, and so on. Consider donating to the project through the following link:

http://www.redmine.org/projects/redmine/wiki/Donors

What this book covers

Chapter 1, Installing and Running Redmine, provides several different ways to obtain and install Redmine. It then goes on to elaborate on how to run it with different servers, including Nginx, Puma, Apache, Thin, IIS, and Phusion Passenger with MySQL or PostgreSQL on Linux servers or in a complete Microsoft environment with Microsoft SQL Server and IIS on Windows Server 2012.

Chapter 2, Customizing Redmine, covers some basic Redmine customizations, such as customizing roles, homepage, extending projects with custom fields, and so on.

Chapter 3, Project Management with Redmine, shifts more toward management. This chapter teaches readers how to achieve some basic project management routines, such as splitting projects into phases or subprojects, using template projects, tasks and sub-tasks, creating reports. It then moves toward a bit more complex stuff, such as using and forcing issue-code relationship, and defining a roadmap to the release plan.

Chapter 4, Improving Team Performance, also focuses on management and team-oriented scenarios, such as organizing and keeping project documentation inside Redmine, putting the timeline to good use, making sure that everyone is informed, improving team performance, managing teams in different time zones, and one scenario of SCRUM and Redmine usage.

Chapter 5, Regular and Planned Maintenance, is written for system administrators, and deals with recipes, such as migration, upgrade, backup, and recovery that are required for Redmine's usage in production over an extended period of time.

Chapter 6, Performance and System Tuning, mixes recipes from system administration, Redmine tuning, and management to improve Redmine's performance and user experience by providing how-tos for new project creation, workflows, auto-login features, server tuning, and integrating Redmine with Active Directory.

Chapter 7, Integrating Redmine with Other Software, teaches readers how to interact with Redmine directly from TortoiseSVN, TortoiseGIT, or Visual Studio; or to integrate your own software or website with Redmine through API; use mobile applications, and so on.

Chapter 8, Getting the Most Out of Scripts and Plugins, deals with some Redmine plugins and scripts, such as pasting images from the clipboard, implementing and using recurring tasks, practicing Kanban, being Agile, using Redmine with Jenkins, and using CKEditor.

Chapter 9, Troubleshooting, provides solutions to common Redmine issues, such as installations, slow responses from server, how to get help faster, troubleshooting plugin installation, and so on.

Chapter 10, Making the Most of Redmine, is mostly business- and management-oriented, while also keeping some interesting content for Redmine administrators, such as improving Redmine security, using and configuring service desk plugins and custom queries, and wiki security.

What you need for this book

You need Redmine installed, or a server (virtual or physical) so that you can install Redmine on it. If you are going to experiment with various recipes, then it's best to use some virtualization software, such as VMware, hyperV, or virtual box. Install a clean operating system (Linux or Windows), clone it, and start your work so that if you break something or want to try something else you don't have to start installing the operating system again, but simply clone the virtual machine.

Who this book is for

Sections

In this book, you will find several headings that appear frequently (Getting ready, How to do it…, How it works…, There's more…, and See also).

To give clear instructions on how to complete a recipe, we use these sections as follows:

Getting ready

This section tells you what to expect in the recipe, and describes how to set up any software or any preliminary settings required for the recipe.

How to do it…

This section contains the steps required to follow the recipe.

How it works…

Conventions

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail <[email protected]>, and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at <[email protected]> with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at <[email protected]>, and we will do our best to address the problem.

Chapter 1. Installing and Running Redmine

In this chapter, you will learn how to install and run Redmine in different ways and on different platforms. This chapter covers the following recipes:

Default installation on an Ubuntu serverInstalling from a source on UbuntuInstallation on Windows serversUsing PostgreSQL as a databaseUsing Puma and IIS on WindowsRunning with Apache as mod_fcgiRunning Redmine with Phusion PassengerRunning Redmine with Nginx and ThinInstalling optional requirementsUsing custom Ruby for Redmine

Introduction

Redmine is a project-management web application that is flexible in many ways, including its installation and running it. There are multiple configurations of web server software on which Redmine can run. These also include different operating systems, databases, and Ruby versions. Information on supported operating systems, web server software, or Ruby programming language interpreter and supported rails framework versions can be found at the Redmine website on the installation page:

http://www.redmine.org/projects/redmine/wiki/redmineinstall

This chapter presents recipes that are based on several common choices to install and run Redmine in production environments.

Note

This chapter's recipes are deliberately split between installing and running Redmine because it can be installed and run in multiple ways.

One of the most common configurations to run Redmine on is based on a Linux operating system, MySQL database, Phusion Passenger, and an Apache web server. This is the most common commercial offered by various hosting companies as a shared hosting at affordable prices. Also, there are already prebuilt virtual machine images for popular hypervisors, such as VMware or VirtualBox, that are offered by Bitnami and Turnkey Linux, which let you run Redmine simply by downloading the virtual machine image and turning it on; no configuration is required. However, such an approach may be an issue when you decide to go further with Redmine, install plugins, troubleshoot, upgrade, and so on.

If you are planning to use Redmine in your company or team, this chapter provides recipes that make sure that you have everything under control, and you will be able to migrate/upgrade, backup, fine-tune Redmine, and so on, because these may be required as time goes by.

As Redmine is flexible and can be used for different kinds of projects, you need to plan your installation carefully. If, for example, you are installing Redmine for a team of designers, they may want to attach large image files to tasks, and you need to plan the server's storage accordingly. Another scenario may be that if your company is going to use Redmine's flexible trackers as a service desk and there are going to be multiple-concurrent users, you are going to need more RAM memory and CPU power. The same goes for database configuration; Redmine will work on SQLite, but in larger production environments where performance is an issue, SQLite will present a problem.

While the recipes in this chapter provide step-by-step installation and configuration instructions, readers are encouraged to adopt them or use different operating systems and servers that may better fit their needs.

Default installation on an Ubuntu server

At the time of writing this book, the actual Ubuntu server version is 14.04 Long Term Support (LTS). So, this recipe covers installation on 14.04.3; however, things are probably not going to change much in the next few releases, and this is applicable to older versions of Ubuntu as well.

Getting ready

Make sure that you have sudo or root access to the server. If you don't have them, you may want to jump to Installing from a source on Ubuntu recipe, which explains how to install and run Redmine from the user's home directory.

First of all, make sure that your system is up-to-date by running the following commands:
sudo apt-get update && sudo apt-get upgrade
Then, we need some prerequisites, such as MySQL or PostgreSQL, for the database. This recipe uses MySQL:
sudo apt-get install mysql-server mysql-client
During installation of MySQL you will be asked to enter a password for the MySQL root user. Write down this password, you are going to use it later.

How to do it…

After updating your system, go ahead and try a simple install:

sudo apt-get install redmine-mysql redmine

After running this command on a blank Linux server box, you may get a large number of dependencies to install. Just click <Yes> or press ENTER.

This process is going to take some time depending on your server and network capacity. The next screen that you get asks you to configure Redmine automatically; choose <Yes>.

If prompted for database configuration, choose MySQL. On the next several screens, provide the administration password that you wrote down and the database name for your Redmine installation; then, your username and password follows, which are used by Redmine.

Installing from a source on Ubuntu

There are two common ways to obtain a Redmine source: through Subversion Client (SVN) or by downloading the compressed source code from a website.

Also, there are two common ways to install Redmine: under a Linux user account, or system-wide. The previous recipe installed Redmine system-wide. This recipe covers the installation of Redmine under an ordinary user account in the user's home directory, which is the recommended way to install Redmine.

Getting ready

When downloading and installing a custom version of Redmine, make sure that you have the required prerequisites installed on your Ubuntu server. At the time of writing this recipe, the current version of Redmine is 3.2.0. You will find the list of supported prerequisites on the Redmine homepage:

http://www.redmine.org/projects/redmine/wiki/RedmineInstall

If you are using Ubuntu 14.04.03, then you are ready to go with Redmine 3.2.x; if you install Ruby and Rails, use the following command:

sudo apt-get install ruby ruby-railties-4.0 ruby-dev build-essential zlib1g-dev libmysqlclient-dev

Use the following command to check your Ruby and Rails version type:

ruby –vruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]rails –vRails 4.0.2

On the console output, you can read your versions and compare them to the supported ones listed on the Redmine website. Currently, we can confirm that we are ready to go with Redmine 3.2.0, as follows:

Database configuration

You also need to have a MySQL, PostgreSQL, or SQLite database that is going to be used with Redmine. If you are creating a MySQL, or PostgreSQL database manually, make sure that you create a UTF-8 database with a UTF-8 general_ci collation. To create a MySQL database, perform the following:

Login to MySQL with a user that has sufficient privileges to create databases:
mysql –u root –pmy_password
Create a UTF-8 database as follows; please keep in mind that you can choose any database name:
CREATE DATABASE redmine CHARACTER SET utf8 COLLATE utf8_general_ci;
Create a user with a password (write it down in a safe place):
CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'my_password';
Give your user privileges, as follows:
GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';

How to do it…

First, let's confirm that we are not using the system as a root user by opening the console and typing the following: whoami

The output should be some other username than root.

Obtaining the Redmine source files

Firstly, obtain the Redmine source, either by downloading it to your computer, unpacking it, and uploading it to /home/your_user/redmine, or by following the methods that are illustrated next.

Downloading and extracting the Redmine source files

The wgettool is installed by default on the Ubuntu server; so, in order to use it to get the Redmine source, we perform the following tasks:

Navigate to your user's home directory by typing the following:
cd ~
Utilize the wget tool to obtain a compressed Redmine source, as follows:
wget http://www.redmine.org/releases/redmine-3.2.0.tar.gz
Unpack the archive:
tar xvf redmine-3.2.0.tar.gz && mv redmine-3.2.0 redmine
Remove the downloaded archive file:
rm redmine-3.2.0.tar.gz

The SVNcheckout method

Many administrators who plan to upgrade Redmine often prefer to grab the code via SVN because it allows code to be automatically updated while preserving local changes with a simple SVN update command. To use this method, perform the following steps:

Navigate to your user's home directory by typing the following:
cd ~
Create a directory for Redmine, as follows:
mkdir redmine
Check out Redmine from its official repository, as follows:
svn co https://svn.redmine.org/redmine/branches/3.2-stable redmine

Redmine installation

After any of the previous methods, you should end up with the latest Redmine source in your home directory:

To proceed with the installation, use the following command:
sudo gem update && sudo gem install bundler

Tip

If you are behind a proxy, the command to run gem commands behind a proxy is as follows:

gem command_name –http-proxy http://your_proxy:port
Copy the default database settings to file without the .example extension:
cp redmine/config/database.yml.example redmine/config/database.yml
Edit the database settings using your favorite editor, in this case, nano:
nano redmine/config/database.yml
You can edit production settings, or those for any other environment type, (for production, replace the values with your credentials):
production: adapter: mysql2 database: redmine host: localhost username: redmine password: my_password encoding: utf8
Now, let's run bundler from the directory from which we extracted Redmine:
bundle install --without development test postgresql sqlite rmagick
After completing the bundler installation, you need to run several commands that are required by Redmine, as follows:
bundle exec rake generate_secret_token
Proceed by populating the Redmine database as follows:
bundle exec rake db:migrate RAILS_ENV=production
Load the default data, and choose a proper locale for default data:
bundle exec rake redmine:load_default_data RAILS_ENV=production
Now, create the required directories:
mkdir -p tmp tmp/pdf public/plugin_assets
Change permissions accordingly:
chmod -R 755 files log tmp public/plugin_assets
Now, you can test the installation by running Redmine through a rails server:
bundle exec rails server webrick -e production –b your_server_ip
Test whether Redmine is properly installed by opening the browser and typing http://your_server_ip:3000/. The Redmine home page should be loaded.

How it works…

This method assumes that Redmine will be installed in the user's /home/username/redmine directory. It can be used on shared hosting accounts if the Redmine prerequisites are already installed. At first, we made sure that the prerequisites were installed, then we grabbed the Redmine source either by downloading and extracting it manually or by SVN checkout. Then, we updated Ruby gems and installed bundler. Gem is a package manager for Ruby, and it is used to download and install the required Ruby libraries from the Internet. Bundler makes sure that all the gems required by an application are downloaded and installed. Then, we configured credentials for database access (in this case MySQL) and proceeded with bundling Redmine. The bundle command in Step 5 fetches gems that are specified in Gemfile, omitting the gems that are required for development, test, postgresql, sqlite, and rmagick. Then, we called bundle exec rakegenerate_secret_token, which generated the hashing code that was required for cookie authentication. After this, we created database tables, and we populated them with the default data that is language/locale -dependent. The last step was to create the necessary folders and set permissions. At the end, we tested the Redmine installation with WEBrick.

See also

This recipe taught you how to install Redmine in the home directory for a user using system-wide Ruby. Take a look at the final recipe Using custom Ruby for Redmine if you need custom Ruby and can't tamper with the system at all (usually on shared hosting). Also, you now need a server in front of your Redmine installation. Later recipes will teach you how to use Apache, Nginx, or Puma as web-servers.

You can find alternative methods that are customized for different operating systems on the Redmine website:

http://www.redmine.org/projects/redmine/wiki/HowTos

Installation on Windows servers

This recipe teaches you how to install Redmine on Windows servers. It covers the Windows 2012 R2 Standard version and Microsoft SQL Server versions 2008 or later. However, this recipe can most certainly be applied to other Windows server versions. Also, PostgreSQL and MySQL can be used instead of Microsoft SQL Server (MSSQL).

Getting ready

Make sure that the Windows server is properly installed with all the default libraries and required drivers. This recipe is based on Microsoft SQL server, and it assumes that you already have it installed. If you need to install it, make sure that you add the proper roles to the server first and include .NET 3.5 (required for SQL server 2014). Any type of MSSQL can be used (Express, Standard, Enterprise, and so on). Prepare a database named Redmine, and create a user for it. Prior to your Redmine installation, make sure that you have enabled SQL Server's TCP IP connectivity options by following the instructions that are provided here:

http://dba.stackexchange.com/questions/62165/i-cant-connect-to-my-servers-sql-database-via-an-ip-address

This will ensure that you have prepared your SQL server successfully.

Tip

Prior to your Redmine installation, make sure you have created the SQL server's user and database for Redmine, and that you can connect via IP with your Redmine user credentials successfully, as depicted in the previous screenshot.

How to do it…

First we need to install Ruby:Open your browser and navigate to http://rubyinstaller.org/.Download Ruby 2.0.0-p645 (x64).Right-click the Ruby installer that you downloaded and click Run as Administrator.Proceed with the installation and make sure that you don't have any spaces or special characters in the installation path due to some potential issues with some Ruby third-party libraries. So, let's choose C:\ruby\ruby2 as a path:

After a successful installation, in your Start menu, a new shortcut named

Using Puma and IIS on Windows

Puma is advertised as a small and fast server. It is derived from Mongrel, which is an open source web server written in Ruby by Zed Shaw. It can serve Redmine on its own, or behind Nginx, Apache, or IIS. Puma can be run and installed in a user's home directory or system-wide.

Getting ready

First, install Redmine as explained in the previous recipe.

Then, we need the OpenSSL Developer Package (this contains header files and binaries), which can be downloaded from http://packages.openknapsack.org/openssl/openssl-1.0.0k-x64-windows.tar.lzma. Considering that we followed the previous recipe precisely, if you need a different SSL version, you can obtain it from https://www.openssl.org. Now, perform the following steps:

Download http://packages.openknapsack.org/openssl/openssl-1.0.0k-x64-windows.tar.lzma and copy it to C:\ruby.Create a folder, openssl, in C:\ruby and copy the downloaded OpenSSL lzma archive here.Run cmd and navigate to C:\ruby\openssl by typing the following: