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