Project

General

Profile

F29Installation » History » Version 15

Gerd Pokorra, 2019-01-01 10:42

1 1 Gerd Pokorra
h1. HowTo Install Redmine 4.0.0 on Fedora 29
2
3
{{toc}}
4
5
This guide is not complete. It will be completed in the next two weeks.
6
7
h2.  System Requirements
8
9
It is assumed that the Server Edition is installed on the system in this guide.
10
11 13 Gerd Pokorra
h3. Updating the System
12
  
13
It is recommended to install Redmine on an update system. To ensure that all installed packages are up-to-date issue the following command:
14
15
<pre>> dnf update
16
</pre>
17
18 14 Gerd Pokorra
h3. Installing Dependencies
19
20
A number of dependencies need to be installed:
21
22
<pre>> dnf install rubygem-bundler
23
> dnf install rubygem-rails
24
25
> dnf install ruby-devel rubygem-rmagick
26
> dnf install gcc redhat-rpm-config
27
28
> dnf groupinstall "C Development Tools and Libraries"
29
> dnf groupinstall "Development Tools"
30
</pre>
31
32 15 Gerd Pokorra
The list of dependencies may not complete. Problems of the installation or build of a compoment can be solved by installing the necessary dependency.
33
34 12 Gerd Pokorra
h2. Obtaining Redmine (Step 1)
35
36
Get the Redmine source code by downloading the packaged release.
37
38
<pre>> dnf install wget
39
40
> mkdir /var/www
41
> cd /var/www
42
43
> wget http://www.redmine.org/releases/redmine-4.0.0.tar.gz
44
> tar xf redmine-4.0.0.tar.gz
45
</pre>
46
47
At this guide is accepted that the location of the Redmine source code is:
48
49
<pre>/var/www/redmine-4.0.0
50
</pre>
51
52
For example the nginx configuration refer to the path @/var/www/redmine-4.0.0@.
53
54 11 Gerd Pokorra
h2. Firewall
55
56
Open the firewall for https:
57
58
<pre>> firewall-cmd --add-service=https
59
> firewall-cmd --permanent --add-service=https
60
</pre>
61
62 1 Gerd Pokorra
h2. Web Server
63
64 5 Gerd Pokorra
h3. Nginx/Passenger
65 2 Gerd Pokorra
66
The Fedora @nginx@ package do not include Passenger, so you have to build @nginx@ with the passenger module. The guide assume that the sources are extracted under the directory @/opt@ . The @nginx@ software will be installed at @/opt/ngnix@. At the time of writting that guide this was the current stable releases of @passenger@ and @nginx@:
67
68
* passenger-6.0.0
69
* nginx-1.14.2
70
71 4 Gerd Pokorra
h4. Downloading the sources:
72 2 Gerd Pokorra
73
<pre>Passenger
74
75
> cd /opt
76
> wget https://s3.amazonaws.com/phusion-passenger/releases/passenger-6.0.0.tar.gz
77
> tar xf passenger-6.0.0.tar.gz
78
79
Nginx
80
81
> wget http://nginx.org/download/nginx-1.14.2.tar.gz
82
> mkdir /opt/src
83
> cd /opt/src
84
> tar xf nginx-1.14.2.tar.gz
85
</pre>
86 1 Gerd Pokorra
87 3 Gerd Pokorra
h4. Installing additional packages
88
89
For the build of @passenger@ and @nginx@ the following additional packages are needed to be installed:
90
91
<pre>> dnf install install gcc-c++ libcurl-devel openssl-devel zlib-devel
92
</pre>
93 1 Gerd Pokorra
94 5 Gerd Pokorra
h4. Execute the ruby script for building and installing
95 1 Gerd Pokorra
96 5 Gerd Pokorra
The simplest way to build and install the @nginx@ web server with the @passenger@ module is to run the script @passenger-install-nginx-module@.
97
98
<pre>> /opt/passenger-6.0.0/bin
99
> ./passenger-install-nginx-module --prefix=/opt/nginx --nginx-source-dir=/opt/src/nginx-1.14.2 --languages ruby
100
</pre>
101 3 Gerd Pokorra
102 7 Gerd Pokorra
With the same @passenger@ locality the installer modify the @nginx@ configuration file @/opt/nginx/conf/nginx.conf@ and output the same text:
103 6 Gerd Pokorra
104
<pre>  http {
105
      ...
106
      passenger_root /opt/passenger-6.0.0;
107
      passenger_ruby /usr/bin/ruby;
108
      ...
109
  }
110
</pre>
111
112 8 Gerd Pokorra
h4. Add a systemd service file
113
114
To start the @nginx@ process during the boot add the file @/usr/lib/systemd/system/nginx.service@ with the following content:
115
116
<pre>[Unit]
117
Description=The nginx HTTP and reverse proxy server
118
After=network.target remote-fs.target nss-lookup.target
119
120
[Service]
121
Type=forking
122
#PIDFile=/run/nginx.pid
123
PIDFile=/opt/nginx/logs/nginx.pid
124
# Nginx will fail to start if /run/nginx.pid already exists but has the wrong
125
# SELinux context. This might happen when running `nginx -t` from the cmdline.
126
# https://bugzilla.redhat.com/show_bug.cgi?id=1268621
127
ExecStartPre=/usr/bin/rm -f /opt/nginx/logs/nginx.pid
128
#ExecStartPre=/usr/sbin/nginx -t
129
#ExecStart=/usr/sbin/nginx
130
ExecStartPre=/opt/nginx/sbin/nginx -t
131
ExecStart=/opt/nginx/sbin/nginx -c /opt/nginx/conf/nginx.conf
132
ExecReload=/bin/kill -s HUP $MAINPID
133
KillSignal=SIGQUIT
134
TimeoutStopSec=5
135
KillMode=mixed
136
PrivateTmp=true
137
138
[Install]
139
WantedBy=multi-user.target
140
</pre>
141
142
The paths are modified to start the executable @/opt/nginx/sbin/nginx@.
143
144
<pre>> systemctl start nginx
145
> systemctl enable nginx
146
</pre>
147
148 9 Gerd Pokorra
h4. Nginx Configuration
149
150
For http add the two lines and comment out the four lines:
151
152
<pre>    server {
153
        listen       80;
154
...
155
        root         /var/www/redmine-4.0.0/public;
156
        passenger_enabled on;
157
        #location / {
158
        #    root   html;
159
        #    index  index.html index.htm;
160
        #}
161
...
162
       }
163
</pre>
164
165 10 Gerd Pokorra
For https add you can use lines like this:
166
167
<pre>    # HTTPS server
168
    #
169
    server {
170
        listen       443 ssl;
171
        server_name  my_web_serv.domain;
172
173
        ssl_certificate      /etc/ssl/certs/my_web_serv.pem;
174
        ssl_certificate_key  /etc/ssl/private/privkey.pem;
175
176
        root         /var/www/redmine-4.0.0/public;
177
        passenger_enabled on;
178
    }
179
</pre>
180
181 1 Gerd Pokorra
h3. Apache