Project

General

Profile

F29Installation » History » Version 12

Gerd Pokorra, 2018-12-30 08:56

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