Project

General

Profile

F29Installation » History » Version 13

Gerd Pokorra, 2018-12-30 12:21

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