I have a Redmine instance from the package manager of Debian 8 (2.5.2.devel) and moved it to a package manager version on Ubuntu 18 (3.4.4 stable). Since it runs an Apache, Redmine should continue to use Apache as a proxy. Also, it should continue to use MySQL as backend and a SMTP relay.
- apt install redmine redmine-mysql libapache2-mod-passenger
- create default instance in the apt configurator
- copy SQL dump over the newly created redmine_default database
- Migrate the database schema with /usr/share/redmine# bundle exec rake db:migrate RAILS_ENV=production
- This caused various errors like "Mysql2::Error: Table 'email_addresses' already exists". I had to rename the following tables and remove an index that interfered with the migration: custom_field_enumerations, import_items, email_addresses, imports, roles_managed_role. All tables were empty except the email_addresses. However, the data didn't seem to be necessary anywhere.
- Copy all files from and to /var/lib/redmine/default/files, chown to www-data:www-data
- Copy custom SMTP config from and to /etc/redmine/default/configuration.yml
- Add PassengerDefaultUser www-data to /etc/apache2/mods-enabled/passenger.conf
- Copy and adjust vhost config:
<VirtualHost *:80> ServerName x RailsEnv production SetEnv X_DEBIAN_SITEID "default" SetEnv RAILS_RELATIVE_URL_ROOT "/" PassengerAppGroupName redmine_default Alias "/plugin_assets/" /var/cache/redmine/default/plugin_assets/ Alias "/" /usr/share/redmine/public <Location /> PassengerBaseURI /redmine PassengerAppRoot /usr/share/redmine </Location> <Directory "/usr/share/redmine/public"> Allow from all Options -MultiViews Require all granted </Directory> </VirtualHost>