StuRa:Server/Redmine: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Zeile 36: | Zeile 36: | ||
: <code>export LANG=de_DE.UTF-8</code> | : <code>export LANG=de_DE.UTF-8</code> | ||
: <code>export LC_ALL=de_DE.UTF-8</code> | : <code>export LC_ALL=de_DE.UTF-8</code> | ||
===== Installieren von benötigten Paketen ===== | ===== Installieren von benötigten Paketen ===== | ||
Zeile 44: | Zeile 42: | ||
* https://www.redmine.org/projects/redmine/wiki/RedmineInstall | * https://www.redmine.org/projects/redmine/wiki/RedmineInstall | ||
; Installieren von Redmine | ; Installieren von Redmine | ||
: <code>pkg install -y redmine</code> | : <code>pkg install -y redmine</code> | ||
Zeile 176: | Zeile 168: | ||
</pre> | </pre> | ||
--> | --> | ||
:: Demnach ist ''MySQL'' | :: Der Client für ''MySQL'' wird standardmäßig mit installiert. Demnach ist davon auszugehen, dass ''MySQL'' als Standard vorgesehen ist. | ||
; Installieren von MySQL | ; Installieren von MySQL | ||
: <code>pkg install -y mysql56-server</code> | : <code>pkg install -y mysql56-server</code> | ||
Zeile 307: | Zeile 299: | ||
</pre> | </pre> | ||
: <code>mysql_secure_installation</code> | : <code>mysql_secure_installation</code> | ||
<pre> | |||
Change the root password? [Y/n] n | |||
</pre> | |||
<pre> | |||
Remove anonymous users? [Y/n] y | |||
</pre> | |||
<pre> | |||
Disallow root login remotely? [Y/n] y | |||
</pre> | |||
<pre> | |||
Remove test database and access to it? [Y/n] y | |||
</pre> | |||
<pre> | |||
Reload privilege tables now? [Y/n] y | |||
</pre> | |||
<!-- | <!-- | ||
<pre> | <pre> | ||
Zeile 337: | Zeile 344: | ||
production environment. | production environment. | ||
Remove anonymous users? [Y/n] | Remove anonymous users? [Y/n] y | ||
... | ... Success! | ||
Normally, root should only be allowed to connect from 'localhost'. This | Normally, root should only be allowed to connect from 'localhost'. This | ||
Zeile 425: | Zeile 432: | ||
Bye | Bye | ||
</pre> | </pre> | ||
; Einrichten von Redmine | ; Einrichten von Redmine | ||
: <code>cd /usr/local/www/redmine</code> | : <code>cd /usr/local/www/redmine</code> | ||
Zeile 447: | Zeile 453: | ||
Note: The rake task generate_session_store has been deprecated, please use the replacement version generate_secret_token | Note: The rake task generate_session_store has been deprecated, please use the replacement version generate_secret_token | ||
</pre> | </pre> | ||
: <code>RAILS_ENV=production rake db:migrate</code> | |||
: <code>RAILS_ENV=production rake redmine:load_default_data</code> | : <code>RAILS_ENV=production rake redmine:load_default_data</code> | ||
<pre> | <pre> | ||
Zeile 463: | Zeile 469: | ||
: <code>pw useradd redmine -d /usr/local/www/redmine</code> | : <code>pw useradd redmine -d /usr/local/www/redmine</code> | ||
: <code>chown -R redmine:redmine /usr/local/www/redmine</code> | : <code>chown -R redmine:redmine /usr/local/www/redmine</code> | ||
; installieren der Funktionalität passenger für Ruby | |||
: <code>pkg install -y rubygem-passenger</code> | : <code>pkg install -y rubygem-passenger</code> | ||
<!-- | <!-- | ||
Zeile 513: | Zeile 519: | ||
</pre> | </pre> | ||
--> | --> | ||
:: ''Apache'' wird standardmäßig mit installiert. Demnach ist davon auszugehen, dass ''Apache'' als Standard vorgesehen ist. | |||
; Apache (hier 2.4) einrichten | |||
: <code>echo 'apache24_enable="YES"' >> /etc/rc.conf</code> | : <code>echo 'apache24_enable="YES"' >> /etc/rc.conf</code> | ||
: <code>$EDITOR /usr/local/etc/apache24/httpd.conf</code> | : <code>$EDITOR /usr/local/etc/apache24/httpd.conf</code> | ||
Zeile 532: | Zeile 540: | ||
LoadModule fastcgi_module libexec/apache24/mod_fastcgi.so | LoadModule fastcgi_module libexec/apache24/mod_fastcgi.so | ||
</pre> | </pre> | ||
: <code>$EDITOR /usr/local/etc/apache24/httpd.conf</code> | |||
<pre></pre> | |||
<pre></pre> | |||
#LoadModule rewrite_module libexec/apache24/mod_rewrite.so | |||
LoadModule rewrite_module libexec/apache24/mod_rewrite.so | |||
</pre> | |||
<pre> | |||
#User www | |||
#Group www | |||
User redmine | |||
Group redmine | |||
<pre> | |||
ServerName localhost:80 | |||
#ServerName www.example.com:80 | |||
</pre> | |||
<pre> | |||
#<Directory /> | |||
# AllowOverride none | |||
# Require all denied | |||
#</Directory> | |||
</pre> | |||
<pre> | |||
#DocumentRoot "/usr/local/www/apache24/data" | |||
DocumentRoot "/usr/local/www/redmine/public" | |||
ErrorLog "/usr/local/www/redmine/log/redmine.example.com-error.log" | |||
CustomLog "/usr/local/www/redmine/log/redmine.example.com-access.log" combined | |||
</pre> | |||
<pre> | |||
<Directory "/usr/local/www/redmine/public"> | |||
Options -MultiViews +FollowSymLinks +ExecCGI | |||
AllowOverride All | |||
Order Allow,Deny | |||
Allow from all | |||
RewriteEngine On | |||
RewriteCond %{REQUEST_FILENAME} !-f | |||
RewriteRule ^(.*)$ dispatch.fcgi | |||
</Directory> | |||
</pre> | |||
<pre> | |||
# | |||
#<Directory "/usr/local/www/apache24/data"> | |||
# | |||
# Possible values for the Options directive are "None", "All", | |||
# or any combination of: | |||
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews | |||
# | |||
# Note that "MultiViews" must be named *explicitly* --- "Options All" | |||
# doesn't give it to you. | |||
# | |||
# The Options directive is both complicated and important. Please see | |||
# http://httpd.apache.org/docs/2.4/mod/core.html#options | |||
# for more information. | |||
# | |||
# Options Indexes FollowSymLinks | |||
# | |||
# | |||
# AllowOverride controls what directives may be placed in .htaccess files. | |||
# It can be "All", "None", or any combination of the keywords: | |||
# AllowOverride FileInfo AuthConfig Limit | |||
# | |||
# AllowOverride None | |||
# | |||
# | |||
# Controls who can get stuff from this server. | |||
# | |||
# Require all granted | |||
#</Directory> | |||
</pre> | |||
<pre> | |||
LoadModule passenger_module /usr/local/lib/ruby/gems/2.1/gems/passenger-5.0.14/buildout/apache2/mod_passenger.so | |||
</pre> | |||
<pre> | |||
PassengerRoot /usr/local/lib/ruby/gems/2.1/gems/passenger-5.0.14 | |||
PassengerRuby /usr/local/bin/ruby21 | |||
</pre> | |||
<pre> | |||
LoadModule fastcgi_module libexec/apache24/mod_fastcgi.so | |||
</pre> | |||
<pre></pre> | |||
<pre> | |||
<IfModule fastcgi_module> | |||
AddHandler fastcgi-script .fcgi | |||
FastCgiConfig -idle-timeout 600 -restart -pass-header Authorization | |||
</IfModule> | |||
</pre> | |||
<pre></pre> | |||
: <code>service apache24 restart</code> | : <code>service apache24 restart</code> | ||
<!-- | |||
---- Womöglich für apache22 | |||
<pre> | <pre> | ||
LoadModule suexec_module libexec/apache22/mod_suexec.so | |||
</pre> | |||
<IfModule fastcgi_module> | <IfModule fastcgi_module> | ||
AddHandler fastcgi-script .fcgi | AddHandler fastcgi-script .fcgi | ||
FastCgiWrapper /usr/local/sbin/suexec | |||
FastCgiConfig -idle-timeout 600 -restart -pass-header Authorization | FastCgiConfig -idle-timeout 600 -restart -pass-header Authorization | ||
</IfModule> | </IfModule> | ||
</pre> | </pre> | ||
<pre></pre> | <pre></pre> | ||
: | ; Erreichbarkeit per http:// prüfen | ||
; Testweise Anmelden mit | |||
: | :; Mitgliedsname: <code>admin</code> | ||
:; Kennwort: <code>admin</code> | |||
: <code> | |||
: | |||
: <code> | |||
===== Alternative nginx + PostgreSQL ===== | ===== Alternative nginx + PostgreSQL ===== | ||
Achtung! | |||
Dieser Abschnitt ist nicht vollständig. | |||
Dieser Abschnitte ist nicht getestet. | |||
* [[FreeBSD]]: [https://forums.freebsd.org/threads/41256/ HOWTO: Redmine + Nginx / Passenger + Postgresql] | |||
* ''nginx'' als Alternative zu ''apache24'' | |||
; Installieren von nginx | |||
: <code>pkg install nginx</code> | |||
: <code>echo 'nginx_enable="YES"' >> /etc/rc.conf</code> | |||
: <code>pkg install rubygem-passenger</code> | : <code>pkg install rubygem-passenger</code> | ||
: <code>passenger-config --root</code> | : <code>passenger-config --root</code> |
Version vom 31. Juli 2015, 11:52 Uhr
- Achtung
Dieser Artikel ist ein exemplarischer Artikel.
Es handelt sich hierbei nicht um die Instanz Redmine als AUS vom StuRa. Dazu dienen die Artikel:
Installation
Randbedingungen
- OS
- FreeNAS 9.3
- Paketverwaltung
- freebsd-man:pkgng
Vorbereitung der Installation
- pauschales Aktualisieren
pkg update; pkg upgrade -y
- zsh installieren und in zsh wechseln
pkg install -y zsh; zsh
tatsächliche Installation
Lokalisation prüfen und setzen
- (optional) kann sich angeschaut werden welche Werte (für die Einstellungen) gesetzt sind
locale
- (optional) kann sich angeschaut werden welche Werte (für die Einstellungen) gesetzt werden können
locale -a
- Setzen der Werte für deutsche Lokalisation (de_DE)
- Insbesondere für die Programmiersprache Ruby soll das wichtig sein. Das gilt insbesondere, wenn Ruby selbst kompiliert wird.
export LANG=de_DE.UTF-8
export LC_ALL=de_DE.UTF-8
Installieren von benötigten Paketen
- Siehe auch
- Installieren von Redmine
pkg install -y redmine
- Der Client für MySQL wird standardmäßig mit installiert. Demnach ist davon auszugehen, dass MySQL als Standard vorgesehen ist.
- Installieren von MySQL
pkg install -y mysql56-server
- Einrichten von MySQL
echo 'mysql_enable="YES"' >> /etc/rc.conf
service mysql-server start
Starting mysql.
mysql_install_db --basedir /usr/local
mysqladmin -u root password
New password:
Confirm new password:
mysql_secure_installation
Change the root password? [Y/n] n
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] y
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] y
mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 8 Server version: 5.6.25 Source distribution Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> create database redmine character set utf8;
Query OK, 1 row affected (0,00 sec)
mysql> create user 'redmine'@'localhost' identified by 'redmine';
Query OK, 0 rows affected (0,01 sec)
mysql> grant all privileges on redmine.* to 'redmine'@'localhost';
Query OK, 0 rows affected (0,00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0,00 sec)
mysql> quit;
Bye
- Einrichten von Redmine
cd /usr/local/www/redmine
- Erstellen der Datei zur Konfiguration für die Datenbank für Redmine
-
- (optionales) Kopieren des beispielhaften Datei zur Konfiguration
cp /usr/local/www/redmine/config/database.yml.example /usr/local/www/redmine/config/database.yml
$EDITOR /usr/local/www/redmine/config/database.yml
- Beispielsweise bei password muss das Passwort für die Datenbank eingetragen werden und nicht redmine.
production: adapter: mysql database: redmine host: localhost username: redmine password: redmine encoding: utf8
bundle install
rake generate_session_store
Note: The rake task generate_session_store has been deprecated, please use the replacement version generate_secret_token
RAILS_ENV=production rake db:migrate
RAILS_ENV=production rake redmine:load_default_data
Select language: ar, az, bg, bs, ca, cs, da, de, el, en, en-GB, es, et, eu, fa, fi, fr, gl, he, hr, hu, id, it, ja, ko, lt, lv, mk, mn, nl, no, pl, pt, pt-BR, ro, ru, sk, sl, sq, sr, sr-YU, sv, th, tr, uk, vi, zh, zh-TW [en] de
==================================== Default configuration data loaded.
mkdir tmp tmp/pdf public/plugin_assets
chmod -R 755 files log tmp public/plugin_assets
cd public
cp dispatch.fcgi.example dispatch.fcgi
pw useradd redmine -d /usr/local/www/redmine
chown -R redmine:redmine /usr/local/www/redmine
- installieren der Funktionalität passenger für Ruby
pkg install -y rubygem-passenger
- Apache wird standardmäßig mit installiert. Demnach ist davon auszugehen, dass Apache als Standard vorgesehen ist.
- Apache (hier 2.4) einrichten
echo 'apache24_enable="YES"' >> /etc/rc.conf
$EDITOR /usr/local/etc/apache24/httpd.conf
LoadModule passenger_module /usr/local/lib/ruby/gems/2.1/gems/passenger-5.0.14/buildout/apache2/mod_passenger.so PassengerRoot /usr/local/lib/ruby/gems/2.1/gems/passenger-5.0.14 PassengerRuby /usr/local/bin/ruby21
service apache24 start
pkg install -y ap24-mod_fastcgi
[preparing module `fastcgi' in /usr/local/etc/apache24/httpd.conf]
$EDITOR /usr/local/etc/apache24/httpd.conf
LoadModule fastcgi_module libexec/apache24/mod_fastcgi.so
$EDITOR /usr/local/etc/apache24/httpd.conf
- LoadModule rewrite_module libexec/apache24/mod_rewrite.so
LoadModule rewrite_module libexec/apache24/mod_rewrite.so
#User www #Group www User redmine Group redmine <pre> ServerName localhost:80 #ServerName www.example.com:80
#<Directory /> # AllowOverride none # Require all denied #</Directory>
#DocumentRoot "/usr/local/www/apache24/data" DocumentRoot "/usr/local/www/redmine/public" ErrorLog "/usr/local/www/redmine/log/redmine.example.com-error.log" CustomLog "/usr/local/www/redmine/log/redmine.example.com-access.log" combined
<Directory "/usr/local/www/redmine/public"> Options -MultiViews +FollowSymLinks +ExecCGI AllowOverride All Order Allow,Deny Allow from all RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ dispatch.fcgi </Directory>
# #<Directory "/usr/local/www/apache24/data"> # # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # # The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs/2.4/mod/core.html#options # for more information. # # Options Indexes FollowSymLinks # # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # AllowOverride FileInfo AuthConfig Limit # # AllowOverride None # # # Controls who can get stuff from this server. # # Require all granted #</Directory>
LoadModule passenger_module /usr/local/lib/ruby/gems/2.1/gems/passenger-5.0.14/buildout/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/2.1/gems/passenger-5.0.14 PassengerRuby /usr/local/bin/ruby21
LoadModule fastcgi_module libexec/apache24/mod_fastcgi.so
<IfModule fastcgi_module> AddHandler fastcgi-script .fcgi FastCgiConfig -idle-timeout 600 -restart -pass-header Authorization </IfModule>
service apache24 restart
- Installieren von PostgreSQL
pkg install rubygem-pg
- client für PostgreSQL sollte bereits installiert sein.
pkg info | grep postgresql
postgresql93-client-9.3.9
pkg install postgresql93-server
- Einrichten von PostgreSQL
echo 'postgresql_enable="YES"' >> /etc/rc.conf
- Wenn es sich um eine Jail handelt, so muss für PostgreSQL SysV IPC erlaubt sein. Bei FreeNAS muss einfach bei der Jail
,allow.sysvipc=true
ergänzend eingetragen werden.
- Wenn es sich um eine Jail handelt, so muss für PostgreSQL SysV IPC erlaubt sein. Bei FreeNAS muss einfach bei der Jail
service postgresql initdb
service postgresql start
su pgsql
createdb redminedb
exit
passwd pgsql
- Exemplarisch wird nachfolgend davon ausgegangen, dass das Passwort redmine-passwd verwendet wurde.
production: adapter: postgresql database: redminedb host: localhost username: pgsql password: "redmine-passwd" encoding: utf8
echo '/usr/local/www/redmine/log/production.log 644 3 3000 * J' >> /etc/newsyslog.conf