Product docs and API reference are now on Akamai TechDocs.
Search product docs.
Search for “” in product docs.
Search API reference.
Search for “” in API reference.
Search Results
 results matching 
 results
No Results
Filters
Manage Projects with Redmine on Debian 5 (Lenny)
- Deprecated guides:
- Ubuntu 9.10
- Ubuntu 11.04
- Ubuntu 10.04
- Debian 6
Traducciones al EspañolEstamos traduciendo nuestros guías y tutoriales al Español. Es posible que usted esté viendo una traducción generada automáticamente. Estamos trabajando con traductores profesionales para verificar las traducciones de nuestro sitio web. Este proyecto es un trabajo en curso.
DeprecatedThis guide has been deprecated and is no longer being maintained.
Redmine is a popular open source project management system. Written in Ruby on Rails, it gives teams the ability to track project objectives, integrates well with various source control systems, and includes customizable reporting functionality. This guide will help you install it on your Debian 5 (Lenny) Linode. We’ll be using nginx with Phusion Passenger as the web server daemon for the site. If you already have the Apache web server installed, guidance will be provided for proxying incoming Redmine requests to nginx running on a different port.
We assume you’ve already followed the steps outlined in our Setting Up and Securing a Compute Instance. Please make sure you’re logged into your Linode as root via an SSH session before proceeding. Throughout this guide, we use the example domain “example.com”; please be sure to substitute your own domain name for each step.
Basic System Configuration
Issue the following commands to update your local package database and install any outstanding updates.
apt-get update
apt-get upgrade --show-upgraded
Issue the following commands to set your system hostname. This example uses “redmine” as the hostname; feel free to substitute your own name.
echo "redmine" > /etc/hostname
hostname -F /etc/hostname
Edit your /etc/hosts
file to resemble the following, substituting your Linode’s public IP address for 12.34.56.78, your domain name for “example.com”, and your hostname for “redmine”.
- File: /etc/hosts
1
127.0.0.1 localhost.localdomain localhost 12.34.56.78 redmine.example.com redmine
Nginx Installation and Configuration
Install Prerequisite Packages
Issue the following command to install packages required for Ruby on Rails and other components.
apt-get install wget build-essential ruby1.8 ruby1.8-dev irb1.8 rdoc1.8 zlib1g-dev libpcre3-dev libopenssl-ruby1.8 libzlib-ruby libssl-dev libcurl4-openssl-dev libpq-dev postgresql subversion
Create symbolic links to the installed version of Ruby:
ln -s /usr/bin/ruby1.8 /usr/bin/ruby
ln -s /usr/bin/irb1.8 /usr/bin/irb
Fetch the newest version of the RubyGems source from the RubyForge download page. Issue the following commands, substituting the download link for the current version:
wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz
tar -xf rubygems*tgz
cd rubygems*
ruby setup.rb
ln -s /usr/bin/gem1.8 /usr/bin/gem
Install some required gems:
gem install -v=1.0.1 rack
gem install fastthread
gem install -v=2.3.5 rails
gem install postgres
gem install activerecord
gem install pg
gem install i18n -v=0.4.2
gem uninstall i18n -v0.5.0
Install Passenger and Nginx
Proceed to the Phusion Passenger site and locate the link for the current source code tarball. Download it as follows (substitute the link for the current version):
cd /opt
wget http://rubyforge.org/frs/download.php/73563/passenger-3.0.1.tar.gz
tar xzvf passenger*.gz
Run the Phusion Passenger installer for Nginx:
cd passenger*/bin
./passenger-install-nginx-module
You’ll be greeted by the Phusion Passenger Nginx installer program. Press “Enter” to continue with the installation. When prompted for the Nginx installation method, we recommend you choose “1” to allow the installer to automatically download, compile, and install Nginx for you. Unless you have specific needs that would necessitate passing custom options to Nginx at compile time, this is the safest way to proceed.
Please do not remove the Passenger files from opt
after the install. They need to stay in place or your install will not function correctly.
Configure Nginx
Nginx is now installed in /opt/nginx
, but we need a way of controlling it. Issue the following commands to download an “init” script to control the process, set permissions, and configure system startup links:
cd /opt/
wget -O init-nginx-deb.sh http://www.linode.com/docs/assets/705-init-nginx-deb.sh
mv /opt/init-nginx-deb.sh /etc/init.d/nginx
chmod +x /etc/init.d/nginx
/usr/sbin/update-rc.d -f nginx defaults
You can now start, stop, and restart Nginx like any other server daemon.
Proxying Redmine with Apache
If you’re already running Apache on your Linode, you’ll need to tell nginx to run on a different port and proxy requests for your Redmine installation back to it. If you’re running another web server, you’ll need to perform similar steps to modify its configuration to support this. This section is entirely optional, and only applies to Apache users.
Issue the following commands to enable proxy support:
a2enmod proxy
a2enmod proxy_http
/etc/init.d/apache2 restart
Configure an Apache virtualhost for your Redmine installation. The example shown below assumes Apache is configured as recommended in our Ubuntu 10.04 LAMP guide. Remember to replace “12.34.56.78” with your Linode’s IP address, support@example.com
with your administrative email address, and “redmine.example.com” with your Redmine domain.
- File: /etc/apache2/sites-available/redmine.example.com
1 2 3 4 5 6 7 8 9 10
<VirtualHost 12.34.56.78:80> ServerAdmin support@example.com ServerName redmine.example.com ProxyPass / http://localhost:8080/ ProxyPassReverse / http://localhost:8080/ # Uncomment the line below if your site uses SSL. #SSLProxyEngine On </VirtualHost>
Issue the following commands to enable the site and reload Apache:
a2ensite redmine.example.com
/etc/init.d/apache2 reload
Next, you’ll need to tell nginx to run on a different port. Edit your nginx configuration file, setting the following value:
- File: /opt/nginx/conf/nginx.conf
1
listen 8080;
Installing and Configuring Redmine
Obtain Redmine
Check the Redmine project site to find the current version number for the stable branch. Issue the following commands to use svn
to check out the code, replacing the URL on the last line with an updated URL if necessary.
mkdir -p /srv/www/redmine.example.com
cd /srv/www/redmine.example.com/
svn co http://redmine.rubyforge.org/svn/branches/1.0-stable redmine-1.0
mv redmine-1.0 redmine
You can use svn up
from the redmine
directory to keep it up to date in the future.
Create and Configure the Database
Switch to the postgres
user and start up the psql
shell by issuing the following commands:
su - postgres
psql
Issue these commands in the psql
shell to set up the database for Redmine. Be sure to specify a unique, strong password in place of “changeme”.
CREATE ROLE redmine LOGIN ENCRYPTED PASSWORD 'changeme' NOINHERIT VALID UNTIL 'infinity';
CREATE DATABASE redmine WITH ENCODING='UTF8' OWNER=redmine TEMPLATE=template0;
\q
exit
cd redmine
Create the file config/database.yml
with the following contents, replacing “changeme” with the password you assigned in the last step.
- File: config/database.yml
1 2 3 4 5 6 7 8
production: adapter: postgresql database: redmine host: localhost username: redmine password: changeme encoding: utf8 schema_search_path: public
Issue the following commands to complete database configuration:
chmod 600 config/database.yml
rake config/initializers/session_store.rb
RAILS_ENV=production rake db:migrate
RAILS_ENV=production rake redmine:load_default_data
Configure Email Service
Issue the following commands to install exim4
and configure it for outgoing Internet email delivery. You can skip Exim installation if you already have an SMTP server configured that accepts unauthenticated locally sent mail, although you will still need to create Redmin’s email configuration file as shown at the end of the section.
apt-get install exim4
dpkg-reconfigure exim4-config
Select “internet site” as the type of mail configuration to use:
![](/docs/images/pix.gif)
![Exim general configuration on Debian 5. Exim general configuration on Debian 5.](/docs/guides/manage-projects-with-redmine-on-debian-5-lenny/298-redmine-debian-5-exim-config-1_hu2c5ce214e7087dab80cd62bc9c47cd31_13736_694x0_resize_q71_bgfafafc_catmullrom_3.jpg)
![Exim general configuration on Debian 5. Exim general configuration on Debian 5.](/docs/guides/manage-projects-with-redmine-on-debian-5-lenny/298-redmine-debian-5-exim-config-1_hu2c5ce214e7087dab80cd62bc9c47cd31_13736_1388x0_resize_q71_bgfafafc_catmullrom_3.jpg)
Specify your systems’s fully qualified domain name as the system mail name:
![](/docs/images/pix.gif)
![Exim system mail name configuration on Debian 5. Exim system mail name configuration on Debian 5.](/docs/guides/manage-projects-with-redmine-on-debian-5-lenny/299-redmine-debian-5-exim-config-2_hu548bafe5e58cfc1077de1b11654cb0b9_9406_694x0_resize_q71_bgfafafc_catmullrom_3.jpg)
![Exim system mail name configuration on Debian 5. Exim system mail name configuration on Debian 5.](/docs/guides/manage-projects-with-redmine-on-debian-5-lenny/299-redmine-debian-5-exim-config-2_hu548bafe5e58cfc1077de1b11654cb0b9_9406_1388x0_resize_q71_bgfafafc_catmullrom_3.jpg)
Enter “127.0.0.1” when asked for the IP address to listen on for SMTP connections. For purposes of allowing Redmine to send mail, we only want to listen on localhost.
![](/docs/images/pix.gif)
![Exim IP address configuration on Debian 5. Exim IP address configuration on Debian 5.](/docs/guides/manage-projects-with-redmine-on-debian-5-lenny/300-redmine-debian-5-exim-config-3_huca4422e6161c1a0ecc3432df3db1ae7a_13769_694x0_resize_q71_bgfafafc_catmullrom_3.jpg)
![Exim IP address configuration on Debian 5. Exim IP address configuration on Debian 5.](/docs/guides/manage-projects-with-redmine-on-debian-5-lenny/300-redmine-debian-5-exim-config-3_huca4422e6161c1a0ecc3432df3db1ae7a_13769_1388x0_resize_q71_bgfafafc_catmullrom_3.jpg)
Enter “localhost.localdomain” and your fully qualified domain name when asked for the list of recipient domains.
![](/docs/images/pix.gif)
![Exim destination domains configuration on Debian 5. Exim destination domains configuration on Debian 5.](/docs/guides/manage-projects-with-redmine-on-debian-5-lenny/301-redmine-debian-5-exim-config-4_huaaf7f9a637a4f6771395de1e2d91fda1_13451_694x0_resize_q71_bgfafafc_catmullrom_3.jpg)
![Exim destination domains configuration on Debian 5. Exim destination domains configuration on Debian 5.](/docs/guides/manage-projects-with-redmine-on-debian-5-lenny/301-redmine-debian-5-exim-config-4_huaaf7f9a637a4f6771395de1e2d91fda1_13451_1388x0_resize_q71_bgfafafc_catmullrom_3.jpg)
Relay domains and machines should be left blank.
![](/docs/images/pix.gif)
![Exim relay domains configuration on Debian 5. Exim relay domains configuration on Debian 5.](/docs/guides/manage-projects-with-redmine-on-debian-5-lenny/302-redmine-debian-5-exim-config-5_hu8f840f8c6f5548d722c3d42c52d4553a_9172_694x0_resize_q71_bgfafafc_catmullrom_3.jpg)
![Exim relay domains configuration on Debian 5. Exim relay domains configuration on Debian 5.](/docs/guides/manage-projects-with-redmine-on-debian-5-lenny/302-redmine-debian-5-exim-config-5_hu8f840f8c6f5548d722c3d42c52d4553a_9172_1388x0_resize_q71_bgfafafc_catmullrom_3.jpg)
![](/docs/images/pix.gif)
![Exim relay machines configuration on Debian 5. Exim relay machines configuration on Debian 5.](/docs/guides/manage-projects-with-redmine-on-debian-5-lenny/303-redmine-debian-5-exim-config-6_hu79394a0ab9d8e47d90626bd26a8c97b3_10018_694x0_resize_q71_bgfafafc_catmullrom_3.jpg)
![Exim relay machines configuration on Debian 5. Exim relay machines configuration on Debian 5.](/docs/guides/manage-projects-with-redmine-on-debian-5-lenny/303-redmine-debian-5-exim-config-6_hu79394a0ab9d8e47d90626bd26a8c97b3_10018_1388x0_resize_q71_bgfafafc_catmullrom_3.jpg)
Specify “No” when asked about DNS queries.
![](/docs/images/pix.gif)
![Exim DNS queries configuration on Debian 5. Exim DNS queries configuration on Debian 5.](/docs/guides/manage-projects-with-redmine-on-debian-5-lenny/304-redmine-debian-5-exim-config-7_hub5e2f917240f631a0b1007a5cc9e23a1_14103_694x0_resize_q71_bgfafafc_catmullrom_3.jpg)
![Exim DNS queries configuration on Debian 5. Exim DNS queries configuration on Debian 5.](/docs/guides/manage-projects-with-redmine-on-debian-5-lenny/304-redmine-debian-5-exim-config-7_hub5e2f917240f631a0b1007a5cc9e23a1_14103_1388x0_resize_q71_bgfafafc_catmullrom_3.jpg)
When asked about maildirs versus mbox format, you may choose either. Maildirs are increasingly preferred by many modern mail tools.
![](/docs/images/pix.gif)
![Exim maildirs or mbox configuration on Debian 5. Exim maildirs or mbox configuration on Debian 5.](/docs/guides/manage-projects-with-redmine-on-debian-5-lenny/305-redmine-debian-5-exim-config-8_hu97d3541f4aedc3cf7652c92fd4009f00_11278_694x0_resize_q71_bgfafafc_catmullrom_3.jpg)
![Exim maildirs or mbox configuration on Debian 5. Exim maildirs or mbox configuration on Debian 5.](/docs/guides/manage-projects-with-redmine-on-debian-5-lenny/305-redmine-debian-5-exim-config-8_hu97d3541f4aedc3cf7652c92fd4009f00_11278_1388x0_resize_q71_bgfafafc_catmullrom_3.jpg)
Specify “No” when asked whether to split the configuration into smaller files.
![](/docs/images/pix.gif)
![Exim config file splitting configuration on Debian 5. Exim config file splitting configuration on Debian 5.](/docs/guides/manage-projects-with-redmine-on-debian-5-lenny/306-redmine-debian-5-exim-config-9_hu82758d99338e53032936fb349ed0298c_12589_694x0_resize_q71_bgfafafc_catmullrom_3.jpg)
![Exim config file splitting configuration on Debian 5. Exim config file splitting configuration on Debian 5.](/docs/guides/manage-projects-with-redmine-on-debian-5-lenny/306-redmine-debian-5-exim-config-9_hu82758d99338e53032936fb349ed0298c_12589_1388x0_resize_q71_bgfafafc_catmullrom_3.jpg)
Enter “root” and an email address at your domain for the postmaster mail query.
![](/docs/images/pix.gif)
![Exim postmaster configuration on Debian 5. Exim postmaster configuration on Debian 5.](/docs/guides/manage-projects-with-redmine-on-debian-5-lenny/307-redmine-debian-5-exim-config-10_hu32e843508b645dcbb8ca0737ee664971_13220_694x0_resize_q71_bgfafafc_catmullrom_3.jpg)
![Exim postmaster configuration on Debian 5. Exim postmaster configuration on Debian 5.](/docs/guides/manage-projects-with-redmine-on-debian-5-lenny/307-redmine-debian-5-exim-config-10_hu32e843508b645dcbb8ca0737ee664971_13220_1388x0_resize_q71_bgfafafc_catmullrom_3.jpg)
Create the file config/email.yml
and copy in the following contents. Be sure to replace the domain field with your fully qualified domain name.
- File: config/email.yml
1 2 3 4 5 6 7
production: delivery_method: :smtp smtp_settings: address: 127.0.0.1 port: 25 domain: redmine.example.com authentication: :none
This completes email configuration for your Redmine installation.
Final Configuration and Testing
We’ll create a “redmine” user to manage the installation. Issue the following commands to set ownership and permissions on your Redmine files, taking care to assign a unique, strong password for the Redmine user:
adduser redmine
cd /srv/www/redmine.example.com/
chown -R redmine:redmine *
cd redmine
chmod -R 755 files log tmp public/plugin_assets
Edit the file /opt/nginx/conf/nginx.conf
, setting the “user” parameter to “redmine”:
- File: /opt/nginx/conf/nginx.conf
1
user redmine;
Add a server section after the first example server as follows. If you’re proxying to nginx from another web server, be sure to change the listen
directive to listen 8080;
instead of the default. Be sure to replace “redmine.example.com” with the domain for your Redmine site.
- File: /opt/nginx/conf/nginx.conf
1 2 3 4 5 6 7 8 9 10 11 12
server { listen 80; server_name redmine.example.com; root /srv/www/redmine.example.com/redmine/public/; access_log /srv/www/redmine.example.com/redmine/log/access.log; error_log /srv/www/redmine.example.com/redmine/log/error.log; index index.html; location / { passenger_enabled on; allow all; } }
Start nginx:
/etc/init.d/nginx start
Your Redmine installation should be accessible at http://redmine.example.com
; if you encounter issues, please refer to your log files for a listing of any errors that may have occurred. The default login is username “admin” and password “admin”. You should change the admin password immediately. Congratulations, you’ve installed Redmine for project management on your Linode!
Monitor for Software Updates and Security Notices
When running software compiled or installed directly from sources provided by upstream developers, you are responsible for monitoring updates, bug fixes, and security issues. After becoming aware of releases and potential issues, update your software to resolve flaws and prevent possible system compromise. Monitoring releases and maintaining up to date versions of all software is crucial for the security and integrity of a system.
Please monitor the Redmine project issue queue and news feed to ensure that you are aware of all updates to the software and can upgrade appropriately or apply patches and recompile as needed:
When upstream sources offer new releases, repeat the instructions for installing Redmine software as needed. These practices are crucial for the ongoing security and functioning of your system.
More Information
You may wish to consult the following resources for additional information on this topic. While these are provided in the hope that they will be useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials.
This page was originally published on