Install required packages
apt-get install apache2 libapache2-mod-passenger mysql-server redmine redmine-mysql
During the installation you will be asked a few questions:
- Enter a password for the MySQL root user
- Configure database for redmine/instances/default with dbconfig-common?
<Yes>
- Database type to be used by redmine/instances/default:
mysql
- Password of the database's administrative user: the MySQL root user password you entered earlier
- MySQL application password for redmine/instances/default: leave empty
Import database
Delete default database
mysql -u root -p -e 'DROP DATABASE redmine_default'
Import database backup
mysql -u root -p < redmine_default.sql
Migrate database to installed Redmine version
cd /usr/share/redmine
rake db:migrate RAILS_ENV=production
Copy attachments
Copy existing attachments to
/var/lib/redmine/default/files
.
Change owner:
chown www-data:www-data /var/lib/redmine/default/files/*
Redmine configuration
Create the file
/etc/redmine/default/email.yml
:
production:
delivery_method: :sendmail
Change owner:
chgrp www-data /etc/redmine/default/email.yml
chmod 640 /etc/redmine/default/email.yml
Apache HTTP Server configuration
Configuration files
Replace the file
/etc/apache2/sites-enabled/000-default
with:
ServerName tickets.atlas.aei.uni-hannover.de
<VirtualHost *:80>
ServerAdmin atlas_admin@aei.mpg.de
UseCanonicalName On
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Redirect permanent / https://tickets.atlas.aei.uni-hannover.de/
</VirtualHost>
Create the file
/etc/apache2/sites-enabled/redmine
:
ServerName tickets.atlas.aei.uni-hannover.de
<IfModule mod_ssl.c>
<VirtualHost *:443>
RailsEnv production
SetEnv X_DEBIAN_SITEID "default"
Alias "/plugin_assets/" /var/cache/redmine/default/plugin_assets/
DocumentRoot /usr/share/redmine/public
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory "/usr/share/redmine/public">
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine On
SSLCertificateFile /etc/ssl/certs/tickets.atlas.aei.uni-hannover.de.cert
SSLCertificateKeyFile /etc/ssl/private/tickets.atlas.aei.uni-hannover.de.key
SSLProtocol All -SSLv2
SSLVerifyClient none
SSLOptions +StdEnvVars
SSLCertificateChainFile /etc/ssl/certs/mpg-ca-chain.pem
SSLHonorCipherOrder On
SSLCipherSuite ECDHE-RSA-AES128-SHA256:AES128-GCM-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH
RewriteEngine On
RewriteCond %{HTTP_HOST} =ticket.atlas.aei.uni-hannover.de
RewriteRule .* https://tickets.atlas.aei.uni-hannover.de%{REQUEST_URI}?%{QUERY_STRING} [R=301,L]
</VirtualHost>
</IfModule>
Restart
/etc/init.d/apache2 restart
See also
How to install Postfix on Redmine server
How to configure Redmine to receive emails