Project

General

Profile

F29Installation » History » Version 14

Gerd Pokorra, 2018-12-31 10:17

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 12 Gerd Pokorra
h2. Obtaining Redmine (Step 1)
33
34
Get the Redmine source code by downloading the packaged release.
35
36
<pre>> dnf install wget
37
38
> mkdir /var/www
39
> cd /var/www
40
41
> wget http://www.redmine.org/releases/redmine-4.0.0.tar.gz
42
> tar xf redmine-4.0.0.tar.gz
43
</pre>
44
45
At this guide is accepted that the location of the Redmine source code is:
46
47
<pre>/var/www/redmine-4.0.0
48
</pre>
49
50
For example the nginx configuration refer to the path @/var/www/redmine-4.0.0@.
51
52 11 Gerd Pokorra
h2. Firewall
53
54
Open the firewall for https:
55
56
<pre>> firewall-cmd --add-service=https
57
> firewall-cmd --permanent --add-service=https
58
</pre>
59
60 1 Gerd Pokorra
h2. Web Server
61
62 5 Gerd Pokorra
h3. Nginx/Passenger
63 2 Gerd Pokorra
64
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@:
65
66
* passenger-6.0.0
67
* nginx-1.14.2
68
69 4 Gerd Pokorra
h4. Downloading the sources:
70 2 Gerd Pokorra
71
<pre>Passenger
72
73
> cd /opt
74
> wget https://s3.amazonaws.com/phusion-passenger/releases/passenger-6.0.0.tar.gz
75
> tar xf passenger-6.0.0.tar.gz
76
77
Nginx
78
79
> wget http://nginx.org/download/nginx-1.14.2.tar.gz
80
> mkdir /opt/src
81
> cd /opt/src
82
> tar xf nginx-1.14.2.tar.gz
83
</pre>
84 1 Gerd Pokorra
85 3 Gerd Pokorra
h4. Installing additional packages
86
87
For the build of @passenger@ and @nginx@ the following additional packages are needed to be installed:
88
89
<pre>> dnf install install gcc-c++ libcurl-devel openssl-devel zlib-devel
90
</pre>
91 1 Gerd Pokorra
92 5 Gerd Pokorra
h4. Execute the ruby script for building and installing
93 1 Gerd Pokorra
94 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@.
95
96
<pre>> /opt/passenger-6.0.0/bin
97
> ./passenger-install-nginx-module --prefix=/opt/nginx --nginx-source-dir=/opt/src/nginx-1.14.2 --languages ruby
98
</pre>
99 3 Gerd Pokorra
100 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:
101 6 Gerd Pokorra
102
<pre>  http {
103
      ...
104
      passenger_root /opt/passenger-6.0.0;
105
      passenger_ruby /usr/bin/ruby;
106
      ...
107
  }
108
</pre>
109
110 8 Gerd Pokorra
h4. Add a systemd service file
111
112
To start the @nginx@ process during the boot add the file @/usr/lib/systemd/system/nginx.service@ with the following content:
113
114
<pre>[Unit]
115
Description=The nginx HTTP and reverse proxy server
116
After=network.target remote-fs.target nss-lookup.target
117
118
[Service]
119
Type=forking
120
#PIDFile=/run/nginx.pid
121
PIDFile=/opt/nginx/logs/nginx.pid
122
# Nginx will fail to start if /run/nginx.pid already exists but has the wrong
123
# SELinux context. This might happen when running `nginx -t` from the cmdline.
124
# https://bugzilla.redhat.com/show_bug.cgi?id=1268621
125
ExecStartPre=/usr/bin/rm -f /opt/nginx/logs/nginx.pid
126
#ExecStartPre=/usr/sbin/nginx -t
127
#ExecStart=/usr/sbin/nginx
128
ExecStartPre=/opt/nginx/sbin/nginx -t
129
ExecStart=/opt/nginx/sbin/nginx -c /opt/nginx/conf/nginx.conf
130
ExecReload=/bin/kill -s HUP $MAINPID
131
KillSignal=SIGQUIT
132
TimeoutStopSec=5
133
KillMode=mixed
134
PrivateTmp=true
135
136
[Install]
137
WantedBy=multi-user.target
138
</pre>
139
140
The paths are modified to start the executable @/opt/nginx/sbin/nginx@.
141
142
<pre>> systemctl start nginx
143
> systemctl enable nginx
144
</pre>
145
146 9 Gerd Pokorra
h4. Nginx Configuration
147
148
For http add the two lines and comment out the four lines:
149
150
<pre>    server {
151
        listen       80;
152
...
153
        root         /var/www/redmine-4.0.0/public;
154
        passenger_enabled on;
155
        #location / {
156
        #    root   html;
157
        #    index  index.html index.htm;
158
        #}
159
...
160
       }
161
</pre>
162
163 10 Gerd Pokorra
For https add you can use lines like this:
164
165
<pre>    # HTTPS server
166
    #
167
    server {
168
        listen       443 ssl;
169
        server_name  my_web_serv.domain;
170
171
        ssl_certificate      /etc/ssl/certs/my_web_serv.pem;
172
        ssl_certificate_key  /etc/ssl/private/privkey.pem;
173
174
        root         /var/www/redmine-4.0.0/public;
175
        passenger_enabled on;
176
    }
177
</pre>
178
179 1 Gerd Pokorra
h3. Apache