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