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