Differences between revisions 64 and 65
Revision 64 as of 2021-07-21 18:55:45
Size: 4039
Comment: Tested update to Debian 10, updated instructions
Revision 65 as of 2021-07-21 23:11:34
Size: 5913
Comment: Draft / final section about upgrading
Deletions are marked like this. Additions are marked like this.
Line 89: Line 89:
 1. Follow instructions at the [[https://certbot.eff.org/lets-encrypt/debianbuster-apache|Certbot documentation for Debian 10 (Buster)]] Assuming your Redmine server is exposed to Internet and it's configured with DNS entries, FQDN etc., you can follow instructions at the [[https://certbot.eff.org/lets-encrypt/debianbuster-apache|Certbot documentation for Debian 10 (Buster)]].

== Upgrading Redmine 3.3.1-stable (and Debian 9) to 4.0.7-stable (and Debian 10) ==

Before upgrading, make sure all your plugins have a newer version that supports Redmine 4.0.7. This assumes you have `sudo` installed and the user under which you are logged in has administrative rights (`usermod -aG sudo $USER`).

 1. Upgrade Debian 9 to 10 [[https://www.debian.org/releases/stable/amd64/release-notes/ch-upgrading.html|as per the documentation]], reboot as needed
 1. After upgrading, [[https://backports.debian.org/Instructions/|add the Buster backports repository]]
 1. Make sure your Debian install is up-to-date
 1. If you have any plugins in `/usr/share/redmine/plugins/` move their directories elsewhere. Example : {{{
sudo mkdir ~/RedminePlugins && mv /usr/share/redmine/plugins/* ~/RedminePlugins }}}
 1. Install the `redmine` and `redmine-mysql` packages from backports. This will also install Ruby and other dependencies. You should also see database migration information. {{{
# apt install redmine redmine-mysql -t buster-backports }}}
 1. Ad your user to the `www-data` group (logout and login again after this): {{{
sudo usermod -aG www-data $USER}}}
 1. '''As a regular user''', update Ruby and its "gems" (you may be asked for the user password) : {{{
cd /usr/share/redmine
bundle install}}}
 1. If you had any plugins, reinstall them in `/usr/share/redmine/plugins`
  1. Follow the plugin install instructions, they should include a command similar to : {{{
sudo bundle exec rake redmine:plugins:migrate NAME=REPLACE_WITH_YOUR_PLUGIN_NAME ENV=production }}}
 1. Finalize the upgrade and restart the web server: {{{
sudo service apache2 restart }}}
 1. Navigate to `http://yourServerAddress`, you should see the login page

Redmine

Redmine is a flexible project management web application. Written using the Ruby on Rails framework, it is cross-platform and cross-database.

Redmine is open source and released under the terms of the GNU General Public License v2 (GPL).

Requirements

Check the Redmine requirements carefully, specially if you won't use PostgreSQL. A few MariaDB and MySQL issues remain open.

Installation

These instructions are for Redmine 4.0.7.stable under Debian 10 (Buster)

Redmine database and application

1. Install your database:

# apt install postgresql # or default-mysql-server

2. Install Redmine with support for your database of choice:

# apt install redmine-pgsql -t buster-backports # or redmine-mysql, or redmine-sqlite

This will also install all required dependencies including Ruby libraries, etc.

There will be one or more prompts asking to confirm database configuration via dbconfig-common. The default Yes should be OK unless you are upgrading (see below), using an external database or want to otherwise manually configure this.

3. Configure the web server

apt install apache2 libapache2-mod-passenger

To use your domain for Redmine only (ie. http://domain.com/):

cp /usr/share/doc/redmine/examples/apache2-passenger-host.conf /etc/apache2/sites-available/redmine.conf

To use the same domain shared with other applications (ie. http://domain.com/redmine):

cp /usr/share/doc/redmine/examples/apache2-passenger-alias.conf /etc/apache2/sites-available/redmine.conf

Edit your configuration file to add your domain name and sysadmin contact information:

edit /etc/apache2/sites-available/redmine.conf

For example:

    ServerName exampledomain.com
    ServerAdmin admin@exampledomain.com

Next:

# a2enmod passenger
# a2ensite redmine.conf
# a2dissite 000-default
# service apache2 reload

Alternatively, to use the same domain but a different port, base your config on apache2-passenger-host.conf, then edit apache2.conf to also Listen to <port> and redmine.conf accordingly. In this case disabling 000-default is not required.

4. Log into Redmine at http://<ip>/ with the following default admin account:

username: admin
password: admin

TLS certificate

Assuming your Redmine server is exposed to Internet and it's configured with DNS entries, FQDN etc., you can follow instructions at the Certbot documentation for Debian 10 (Buster).

Upgrading Redmine 3.3.1-stable (and Debian 9) to 4.0.7-stable (and Debian 10)

Before upgrading, make sure all your plugins have a newer version that supports Redmine 4.0.7. This assumes you have sudo installed and the user under which you are logged in has administrative rights (usermod -aG sudo $USER).

  1. Upgrade Debian 9 to 10 as per the documentation, reboot as needed

  2. After upgrading, add the Buster backports repository

  3. Make sure your Debian install is up-to-date
  4. If you have any plugins in /usr/share/redmine/plugins/ move their directories elsewhere. Example :

    sudo mkdir ~/RedminePlugins && mv /usr/share/redmine/plugins/* ~/RedminePlugins 
  5. Install the redmine and redmine-mysql packages from backports. This will also install Ruby and other dependencies. You should also see database migration information.

    # apt install redmine redmine-mysql -t buster-backports 
  6. Ad your user to the www-data group (logout and login again after this):

    sudo usermod -aG www-data $USER
  7. As a regular user, update Ruby and its "gems" (you may be asked for the user password) :

    cd /usr/share/redmine
    bundle install
  8. If you had any plugins, reinstall them in /usr/share/redmine/plugins

    1. Follow the plugin install instructions, they should include a command similar to :

      sudo bundle exec rake redmine:plugins:migrate NAME=REPLACE_WITH_YOUR_PLUGIN_NAME ENV=production 
  9. Finalize the upgrade and restart the web server:

    sudo service apache2 restart 
  10. Navigate to http://yourServerAddress, you should see the login page

Differences from upstream Redmine

The Debian redmine package contains a few patches to support running multiple Redmine instances using a single codebase. You manage your instances by using dpkg-reconfigure redmine. This multi-instance support makes some things appear in places that are different from when you are using the upstream Redmine:

  • The application logs are located under /var/log/redmine/${instance}/ (instead of /path/to/redmine/log)

  • The database configuration is located at /etc/redmine/${instance}/database.yml (instead of /path/to/redmine/config/database.yml)

  • File attachments are located under /var/lib/redmine/${instance}/files

  • Plugins should be placed under /usr/share/redmine/plugins. The folder doesn't exist by default and must be created. Don't use /usr/share/redmine/lib/plugins as this result to routing error in the application.

    • plugins assets should be place in /var/cache/redmine/${instance}/plugin_assets/{$plugin}, could be done by a symlink

Other documentation

* Manual Redmine install using RVM with Debian (French)


CategorySystemAdministration CategorySystemAdministration