RedmineInstall » Historie » Zyklus 1
Peter Pfläging, 01.02.2016 15:07
1 | 1 | Peter Pfläging | # Redmine Install |
---|---|---|---|
2 | |||
3 | ## Database |
||
4 | |||
5 | MariaDB oder MySQL installieren! |
||
6 | |||
7 | Dann in my.cnf (/etc or /usr/local/etc) |
||
8 | |||
9 | ~~~ |
||
10 | [Mysqld] |
||
11 | innodb_file_per_table = 1 |
||
12 | innodb_file_format = barracuda |
||
13 | innodb_large_prefix = 1 |
||
14 | ~~~ |
||
15 | |||
16 | Mit `mysql -u root -p`: |
||
17 | |||
18 | ~~~~ |
||
19 | CREATE DATABASE redmine CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; |
||
20 | CREATE USER ''redmine''@''localhost'' IDENTIFIED BY ''my_password''; |
||
21 | GRANT ALL PRIVILEGES ON redmine.* TO ''redmine''@''localhost''; |
||
22 | ~~~~ |
||
23 | |||
24 | ## Redmine installieren |
||
25 | |||
26 | Unter `/opt/redmine` |
||
27 | |||
28 | Dann anlegen: `/opt/redmine/config/database.yml` mit Inhalt: |
||
29 | |||
30 | ~~~~ |
||
31 | production: |
||
32 | adapter: mysql2 |
||
33 | database: redmine |
||
34 | host: 127.0.0.1 |
||
35 | username: redmine |
||
36 | password: my_password |
||
37 | ~~~~ |
||
38 | |||
39 | Dann anlegen `/opt/redmine/config/initializers/enable_urf8mb4.rb` mit Inhalt: |
||
40 | |||
41 | ~~~ruby |
||
42 | ActiveSupport.on_load :active_record do |
||
43 | module ActiveRecord::ConnectionAdapters |
||
44 | |||
45 | class AbstractMysqlAdapter |
||
46 | def create_table_with_innodb_row_format(table_name, options = {}) |
||
47 | table_options = options.reverse_merge(:options => ''ENGINE=InnoDB ROW_FORMAT=DYNAMIC'') |
||
48 | create_table_without_innodb_row_format(table_name, table_options) do |td| |
||
49 | yield td if block_given? |
||
50 | end |
||
51 | end |
||
52 | alias_method_chain :create_table, :innodb_row_format |
||
53 | end |
||
54 | |||
55 | end |
||
56 | end |
||
57 | ~~~ |
||
58 | |||
59 | Auf der Shell Ebene als `root`: |
||
60 | |||
61 | ~~~ |
||
62 | # apt-get install ruby |
||
63 | # apt-get install libmariadb-client-lgpl-dev |
||
64 | # apt-get install ruby-rmagick |
||
65 | # apt-get install libmagickcore-dev |
||
66 | # apt-get install libmagickwand-dev |
||
67 | # apt-get install rails |
||
68 | # apt-get install imagemagick |
||
69 | # gem install bundler |
||
70 | # gem install rmagick |
||
71 | ~~~ |
||
72 | |||
73 | Benutzer `redmine` anlegen! |
||
74 | |||
75 | Am Mac (optional): |
||
76 | |||
77 | ~~~ |
||
78 | # PKG_CONFIG_PATH=/usr/local/Cellar/imagemagick/6.9.3-0/lib/pkgconfig/ gem install rmagick |
||
79 | ~~~ |
||
80 | |||
81 | Als Benutzer `redmine` in `/opt/redmine`: |
||
82 | |||
83 | ~~~ |
||
84 | $ bundle install --path vendor/bundle --without development test |
||
85 | $ bundle exec rake generate_secret_token |
||
86 | $ RAILS_ENV=production bundle exec rake db:migrate |
||
87 | $ RAILS_ENV=production REDMINE_LANG=de bundle exec rake redmine:load_default_data |
||
88 | ~~~ |
||
89 | |||
90 | ## Dann folgende Plugins installieren: |
||
91 | |||
92 | - [`redmine_agile`](http://www.redminecrm.com/projects/agile/pages/1) |
||
93 | - [`stickie_flow`](https://github.com/pflaeging/stickie_flow) |
||
94 | - [`clipboard_image_paste`](https://github.com/peclik/clipboard_image_paste) (optional) |
||
95 | |||
96 | Plugins werden unter `/opt/redmine/plugins` installiert: |
||
97 | |||
98 | - Archive dort auspacken, anschließend: |
||
99 | - als `redmine`: |
||
100 | |||
101 | ~~~ |
||
102 | $ cd /opt/redmine |
||
103 | $ bundle install --path vendor/bundle --without development test |
||
104 | $ bundle exec rake redmine:plugins:migrate RAILS_ENV=production |
||
105 | ~~~ |
||
106 | |||
107 | ## Stickie~Flow Theme installieren |
||
108 | |||
109 | - [`stickie_flow_theme`](https://github.com/pflaeging/stickie_flow_theme) |
||
110 | |||
111 | Themes werden unter `/opt/redmine/public/themes/` installiert. |
||
112 | |||
113 | |||
114 | ## Abschlussarbeiten |
||
115 | |||
116 | ~~~ |
||
117 | # rm plugins/redmine_agile/app/views/agile_boards/_upgrade_to_pro.html.erb |
||
118 | # touch plugins/redmine_agile/app/views/agile_boards/_upgrade_to_pro.html.erb |
||
119 | ~~~ |
||
120 | |||
121 | ## Apache Konfiguration |
||
122 | |||
123 | - Apache 2.x installieren |
||
124 | - [Phusion Passenger](https://www.phusionpassenger.com/library/install/apache/install/oss/) installieren |
||
125 | |||
126 | Einen virtuellen Host in Apache anlegen mit folgender Config (`/etc/apache2/sites-enabled/030-redmine.conf`): |
||
127 | |||
128 | ~~~ |
||
129 | <VirtualHost *:80> |
||
130 | ServerName myhost.local |
||
131 | ServerAdmin webmaster@myhost.local |
||
132 | |||
133 | DocumentRoot /opt/redmine/public |
||
134 | PassengerDefaultUser redmine |
||
135 | RailsEnv production |
||
136 | RailsBaseURI / |
||
137 | Options -MultiViews |
||
138 | # Uncomment this if you''re on Apache >= 2.4: |
||
139 | #Require all granted |
||
140 | ErrorLog ${APACHE_LOG_DIR}/redmine-error.log |
||
141 | LogLevel warn |
||
142 | CustomLog ${APACHE_LOG_DIR}/redmine-access.log combined |
||
143 | </VirtualHost> |
||
144 | ~~~ |
||
145 | |||
146 | Als Sub URL in einem normalen Apache folgendes in `/etc/apache2/sites-enabled/000-default.conf` einfügen: |
||
147 | |||
148 | ~~~ |
||
149 | Alias /redmine /opt/redmine/public |
||
150 | <Location /redmine> |
||
151 | PassengerUser redmine |
||
152 | PassengerGroup redmine |
||
153 | PassengerBaseUri /redmine |
||
154 | PassengerAppRoot /opt/redmine |
||
155 | </Location> |
||
156 | <Directory /opt/redmine/public> |
||
157 | Allow from all |
||
158 | Options -MultiViews |
||
159 | # Uncomment this if you''re on Apache >= 2.4: |
||
160 | #Require all granted |
||
161 | </Directory> |
||
162 | ~~~ |