Box

Allgemein

Profil

Aktionen

Redmine Install

Database

MariaDB oder MySQL installieren!

Dann in my.cnf (/etc or /usr/local/etc)

[Mysqld]
innodb_file_per_table = 1
innodb_file_format = barracuda
innodb_large_prefix = 1

Mit mysql -u root -p:

CREATE DATABASE redmine CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'my_password';
GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';

Redmine installieren

Unter /opt/redmine

Dann anlegen: /opt/redmine/config/database.yml mit Inhalt:

production:
  adapter: mysql2
  database: redmine
  host: 127.0.0.1
  username: redmine
  password: my_password

Dann anlegen /opt/redmine/config/initializers/enable_urf8mb4.rb mit Inhalt:

ActiveSupport.on_load :active_record do
  module ActiveRecord::ConnectionAdapters

    class AbstractMysqlAdapter
      def create_table_with_innodb_row_format(table_name, options = {})
        table_options = options.reverse_merge(:options => 'ENGINE=InnoDB ROW_FORMAT=DYNAMIC')
        create_table_without_innodb_row_format(table_name, table_options) do |td|
          yield td if block_given?
        end
      end
      alias_method_chain :create_table, :innodb_row_format
    end

  end
end

Auf der Shell Ebene als root:

# apt-get install ruby
# apt-get install libmariadb-client-lgpl-dev
# apt-get install ruby-rmagick
# apt-get install libmagickcore-dev
# apt-get install libmagickwand-dev
# apt-get install rails
# apt-get install imagemagick
# gem install bundler
# gem install rmagick

Benutzer redmine anlegen!

Am Mac (optional):

# PKG_CONFIG_PATH=/usr/local/Cellar/imagemagick/6.9.3-0/lib/pkgconfig/ gem install rmagick

Als Benutzer redmine in /opt/redmine:

$ bundle install --path vendor/bundle --without development test
$ bundle exec rake generate_secret_token
$ RAILS_ENV=production bundle exec rake db:migrate
$ RAILS_ENV=production REDMINE_LANG=de bundle exec rake redmine:load_default_data

Dann folgende Plugins installieren:

Plugins werden unter /opt/redmine/plugins installiert:

  • Archive dort auspacken, anschließend:

  • als redmine:

    $ cd /opt/redmine
    $ bundle install --path vendor/bundle --without development test
    $ bundle exec rake redmine:plugins:migrate RAILS_ENV=production

Stickie~Flow Theme installieren

Themes werden unter /opt/redmine/public/themes/ installiert.

Abschlussarbeiten

# rm plugins/redmine_agile/app/views/agile_boards/_upgrade_to_pro.html.erb
# touch plugins/redmine_agile/app/views/agile_boards/_upgrade_to_pro.html.erb

Apache Konfiguration

Einen virtuellen Host in Apache anlegen mit folgender Config (/etc/apache2/sites-enabled/030-redmine.conf):

<VirtualHost *:80>
        ServerName myhost.local
        ServerAdmin webmaster@myhost.local

        DocumentRoot /opt/redmine/public
        PassengerDefaultUser redmine
        RailsEnv production
        RailsBaseURI /
        Options -MultiViews
        # Uncomment this if you're on Apache >= 2.4:
        #Require all granted
        ErrorLog ${APACHE_LOG_DIR}/redmine-error.log
        LogLevel warn
        CustomLog ${APACHE_LOG_DIR}/redmine-access.log combined
</VirtualHost>

Als Sub URL in einem normalen Apache folgendes in /etc/apache2/sites-enabled/000-default.conf einfügen:

        Alias /redmine /opt/redmine/public
        <Location /redmine>
                PassengerUser redmine
                PassengerGroup redmine
                PassengerBaseUri /redmine
                PassengerAppRoot /opt/redmine
        </Location>
        <Directory /opt/redmine/public>
                   Allow from all
                   Options -MultiViews
                   # Uncomment this if you're on Apache >= 2.4:
                   #Require all granted
        </Directory>

Von Peter Pfläging vor etwa 9 Jahren aktualisiert · 1 Revisionen