FedoraInstallation » History » Version 6

Jamie McPeek, 2014-08-16 23:37

1 1 Jamie McPeek
h1. HowTo Install Redmine 2.5.x on Fedora 20
2 1 Jamie McPeek
3 1 Jamie McPeek
{{toc}}
4 1 Jamie McPeek
5 1 Jamie McPeek
h2. System Requirements
6 1 Jamie McPeek
7 1 Jamie McPeek
No assumptions are made about the initial state of the system in this guide. The guide can be followed for either 32-bit or 64-bit systems - though all testing and the original installation was performed on a 64-bit system.
8 1 Jamie McPeek
9 1 Jamie McPeek
The hardware requirements are not significant, so a small VM with 10gb storage and 1GB ram and 1GB swap file should be sufficient.
10 1 Jamie McPeek
11 1 Jamie McPeek
This guide can be used on top of an already existing system or, from scratch, downloading from the Fedora website.
12 1 Jamie McPeek
13 1 Jamie McPeek
An ISO for installation can be downloaded from "here":http://fedoraproject.org/en/get-fedora.
14 1 Jamie McPeek
15 1 Jamie McPeek
The rest of the guide assumes that you have created a user account with wheel/administrator access and are logged in to the terminal directly or through SSH.
16 2 Jamie McPeek
17 2 Jamie McPeek
h2. Updating the System
18 2 Jamie McPeek
19 2 Jamie McPeek
Before beginning, you should ensure all of your installed packages are up-to-date. This can be done by issuing the following command:
20 2 Jamie McPeek
21 2 Jamie McPeek
<pre>
22 2 Jamie McPeek
$ sudo yum update
23 2 Jamie McPeek
</pre>
24 2 Jamie McPeek
25 2 Jamie McPeek
If the kernel was updated as part of this command, you should perform a restart to begin using it:
26 2 Jamie McPeek
27 2 Jamie McPeek
<pre>
28 2 Jamie McPeek
$ sudo shutdown -r now
29 2 Jamie McPeek
</pre>
30 2 Jamie McPeek
31 2 Jamie McPeek
h2. Installing Dependencies
32 3 Jamie McPeek
33 3 Jamie McPeek
Before beginning the installation of Redmine, there are a number of dependencies which need to be installed.
34 3 Jamie McPeek
35 4 Jamie McPeek
Depending on your needs, some of these may not be necessary. Depending on your preferences, you may choose alternatives to some of these.
36 3 Jamie McPeek
37 3 Jamie McPeek
<pre>
38 3 Jamie McPeek
apr-devel         - For Passenger
39 3 Jamie McPeek
apr-util-devel    - For Passenger
40 3 Jamie McPeek
curl-devel        - For Passenger
41 3 Jamie McPeek
gcc               - For JSON
42 3 Jamie McPeek
gcc-c++           - For Passenger
43 3 Jamie McPeek
git               - (Optional) For SCM Integration
44 3 Jamie McPeek
httpd             - Web Server
45 3 Jamie McPeek
httpd-devel       - For Passenger
46 3 Jamie McPeek
ImageMagick-devel - For RMagick
47 3 Jamie McPeek
mariadb-devel     - For Redmine
48 3 Jamie McPeek
mariadb-server    - For Redmine
49 3 Jamie McPeek
nano              - Configuration Editor
50 6 Jamie McPeek
postfix           - Email (MTA)
51 3 Jamie McPeek
ruby-devel        - For Redmine
52 3 Jamie McPeek
tar               - For Decompression
53 3 Jamie McPeek
wget              - For Download
54 3 Jamie McPeek
</pre>
55 3 Jamie McPeek
56 3 Jamie McPeek
All of these can be installed prior to starting with a single command:
57 3 Jamie McPeek
58 1 Jamie McPeek
<pre>
59 6 Jamie McPeek
$ sudo yum install apr-devel apr-util-devel curl-devel gcc gcc-c++ git httpd httpd-devel ImageMagick-devel mariadb-devel mariadb-server nano postfix ruby-devel tar wget
60 3 Jamie McPeek
</pre>
61 3 Jamie McPeek
62 3 Jamie McPeek
h2. Disable SELinux
63 3 Jamie McPeek
64 3 Jamie McPeek
Some users have noted issues installing Redmine with SELinux active. This can be disabled via the following command:
65 3 Jamie McPeek
66 3 Jamie McPeek
<pre>
67 3 Jamie McPeek
# sudo setenforce 0
68 3 Jamie McPeek
</pre>
69 3 Jamie McPeek
70 3 Jamie McPeek
Steps will be taken throughout the remainder of the guide to ensure that, if desired, SELinux can be re-enabled after and still maintain a fully functional Redmine installation.
71 3 Jamie McPeek
72 3 Jamie McPeek
h2. Enable Server Environment
73 3 Jamie McPeek
74 3 Jamie McPeek
With all of the dependencies installed, we need to ensure that the servers are setup, ready for use, and accessible external to the OS installation.
75 3 Jamie McPeek
76 3 Jamie McPeek
The first step is to open the standard port 80 in the firewall for the web server:
77 3 Jamie McPeek
78 3 Jamie McPeek
<pre>
79 3 Jamie McPeek
$ sudo firewall-cmd --zone=public --add-service=http
80 3 Jamie McPeek
$ sudo firewall-cmd --permanent --zone=public --add-service=http
81 3 Jamie McPeek
</pre>
82 3 Jamie McPeek
83 3 Jamie McPeek
The first line opens the port in the current configuration. The second line ensures that, after a restart, that port will remain open and available.
84 3 Jamie McPeek
85 3 Jamie McPeek
The second step is to start the web server and database server:
86 1 Jamie McPeek
87 3 Jamie McPeek
<pre>
88 6 Jamie McPeek
$ sudo systemctl start httpd mariadb postfix
89 6 Jamie McPeek
$ sudo systemctl enable httpd mariadb postfix
90 3 Jamie McPeek
</pre>
91 3 Jamie McPeek
92 1 Jamie McPeek
Similar to the firewall commands, the first line starts the servers in the current configuration. The second line ensures that, after a restart, both servers come back online.
93 4 Jamie McPeek
94 4 Jamie McPeek
h2. Configuring MariaDB
95 4 Jamie McPeek
96 4 Jamie McPeek
Now that you have a database server up and running, it needs to be configured for use. The initial setup can be performed with the following command:
97 4 Jamie McPeek
98 4 Jamie McPeek
<pre>
99 4 Jamie McPeek
$ mysql_secure_installation
100 4 Jamie McPeek
</pre>
101 4 Jamie McPeek
102 4 Jamie McPeek
This will prompt you to create a password for the root account as well as a number of other choices. For a standard setup, the default choice for each question is acceptable.
103 4 Jamie McPeek
104 4 Jamie McPeek
Advanced usages or installations may opt for different answers; however, that is beyond the scope of this guide.
105 4 Jamie McPeek
106 4 Jamie McPeek
h3. Creating a Redmine Database and Account
107 4 Jamie McPeek
108 4 Jamie McPeek
Now that you have MariaDB configured, it is time to create a database and user for use with your Redmine installation.
109 4 Jamie McPeek
110 4 Jamie McPeek
First, connect to the server:
111 4 Jamie McPeek
112 4 Jamie McPeek
<pre>
113 4 Jamie McPeek
$ mysql -u root -p
114 4 Jamie McPeek
</pre>
115 4 Jamie McPeek
116 4 Jamie McPeek
You will be prompted to enter the root password. Once provided, you will be able to issue the following commands:
117 4 Jamie McPeek
118 4 Jamie McPeek
<pre><code class="sql">
119 4 Jamie McPeek
CREATE DATABASE redmine CHARACTER SET utf8;
120 4 Jamie McPeek
CREATE USER 'redmine'@'localhost' IDENTIFIED BY '<user_password>';
121 4 Jamie McPeek
GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';
122 4 Jamie McPeek
</code></pre>
123 4 Jamie McPeek
124 4 Jamie McPeek
The above commands will create the database, create a user with a defined password, and ensure the created user has full access on the newly created database.
125 4 Jamie McPeek
126 4 Jamie McPeek
Once those commands have been entered, issue the following command to return to the command line:
127 4 Jamie McPeek
128 4 Jamie McPeek
<pre>
129 4 Jamie McPeek
quit
130 4 Jamie McPeek
</pre>
131 4 Jamie McPeek
132 4 Jamie McPeek
h2. Obtaining Redmine
133 4 Jamie McPeek
134 4 Jamie McPeek
Now that all the dependencies are installed and the servers are up and running it's time to get the stable release of Redmine and begin its installation.
135 4 Jamie McPeek
136 4 Jamie McPeek
In this example, we'll use wget to download the file from the Redmine server and tar to extract its contents:
137 4 Jamie McPeek
138 4 Jamie McPeek
<pre>
139 4 Jamie McPeek
$ wget http://www.redmine.org/releases/redmine-2.5.2.tar.gz
140 4 Jamie McPeek
$ tar xfzv redmine-2.5.2.tar.gz
141 4 Jamie McPeek
</pre>
142 4 Jamie McPeek
143 4 Jamie McPeek
h2. Redmine Database Configuration
144 4 Jamie McPeek
145 4 Jamie McPeek
To ensure proper functionality, the Redmine installation will need to communicate with the database that has just been created. This can be done by performing the following:
146 4 Jamie McPeek
147 4 Jamie McPeek
<pre>
148 4 Jamie McPeek
$ cd redmine-2.5.2/config
149 4 Jamie McPeek
$ cp database.yml.example database.yml
150 4 Jamie McPeek
$ nano -w database.yml
151 4 Jamie McPeek
</pre>
152 4 Jamie McPeek
153 4 Jamie McPeek
Once the file has been opened, the @production@ definition needs to be updated to match the database and account used above. It should look as follows:
154 4 Jamie McPeek
155 4 Jamie McPeek
<pre><code class="yaml">
156 4 Jamie McPeek
production:
157 4 Jamie McPeek
  adapter: mysql2
158 4 Jamie McPeek
  database: redmine
159 4 Jamie McPeek
  host: localhost
160 4 Jamie McPeek
  username: redmine
161 4 Jamie McPeek
  password: "<user_password>"
162 4 Jamie McPeek
  encoding: utf8
163 4 Jamie McPeek
</code></pre>
164 4 Jamie McPeek
165 4 Jamie McPeek
This replaces the user @root@ and the blank password in the example configuration file.
166 4 Jamie McPeek
167 4 Jamie McPeek
h2. Redmine Installation Directory
168 4 Jamie McPeek
169 4 Jamie McPeek
With most of the precursor work completed, it's time to move the installation to a folder more accessible than a user's home directory.
170 4 Jamie McPeek
171 4 Jamie McPeek
For the purposes of this guide, Redmine will be moved to @/var/www/redmine@; however, this could be moved to a variety of over locations based on personal needs.
172 4 Jamie McPeek
173 4 Jamie McPeek
This can be don with the following commands:
174 4 Jamie McPeek
175 4 Jamie McPeek
<pre>
176 4 Jamie McPeek
$ cd /var/www
177 4 Jamie McPeek
$ sudo cp -R ~/redmine-2.5.2 redmine
178 4 Jamie McPeek
$ cd redmine
179 4 Jamie McPeek
</pre>
180 4 Jamie McPeek
181 4 Jamie McPeek
To ensure proper functionality and access rights, the @public/plugin_assets@ folder needs to be created:
182 4 Jamie McPeek
183 4 Jamie McPeek
<pre>
184 4 Jamie McPeek
$ sudo mkdir public/plugin_assets
185 4 Jamie McPeek
</pre>
186 4 Jamie McPeek
187 4 Jamie McPeek
To allow read/write access to the folders, the user @apache@ needs to have access:
188 4 Jamie McPeek
189 4 Jamie McPeek
<pre>
190 4 Jamie McPeek
$ sudo chown apache:apache -R files log public/plugin_assets tmp
191 4 Jamie McPeek
</pre>
192 4 Jamie McPeek
193 4 Jamie McPeek
h3. Optional SELinux Configuration
194 4 Jamie McPeek
195 4 Jamie McPeek
If you plan to re-enable SELinux after installation, the following steps should be taken to ensure smooth execution.
196 4 Jamie McPeek
197 4 Jamie McPeek
<pre>
198 4 Jamie McPeek
$ sudo chcon -R --reference=/var/www/html /var/www/redmine
199 4 Jamie McPeek
</pre>
200 4 Jamie McPeek
201 4 Jamie McPeek
This command applies SELinux directory permissions typically for a web server to all sub-directories under the redmine top-level folder.
202 4 Jamie McPeek
203 4 Jamie McPeek
<pre>
204 4 Jamie McPeek
$ sudo chcon -t httpd_sys_content_rw_t -R files log public/plugin_assets tmp
205 4 Jamie McPeek
</pre>
206 4 Jamie McPeek
207 4 Jamie McPeek
This command enables the specific folders listed to have read/write access while SELinux is active. Under a normal configuration with SELinux, all web directories are read-only.
208 5 Jamie McPeek
209 5 Jamie McPeek
h2. Ruby Gem Installation
210 5 Jamie McPeek
211 5 Jamie McPeek
The ruby dependencies for Redmine are managed by bundler, so that must be installed first to determine what else must be downloaded and installed.
212 5 Jamie McPeek
213 5 Jamie McPeek
<pre>
214 5 Jamie McPeek
$ sudo gem install bundler
215 5 Jamie McPeek
</pre>
216 5 Jamie McPeek
217 5 Jamie McPeek
With bundler installed, the Redmine ruby dependencies can be sorted:
218 5 Jamie McPeek
219 5 Jamie McPeek
<pre>
220 5 Jamie McPeek
$ sudo /usr/local/bin/bundle install --without development test
221 5 Jamie McPeek
</pre>
222 5 Jamie McPeek
223 5 Jamie McPeek
*Note 1:* By default @/usr/local/bin@ is not on @$PATH@ for the @root@ user, so the absolute path must be provided.
224 5 Jamie McPeek
225 5 Jamie McPeek
*Note 2:* Bundle will complain about installing gems via sudo making them only usable by @root@. This is not true - by installing as @root@, these gems are available to all users.
226 5 Jamie McPeek
227 5 Jamie McPeek
h2. Native Extension Fixes
228 5 Jamie McPeek
229 5 Jamie McPeek
When running @bundler@ as root, the @mysql2@ and @rmagick@ native extensions get installed, but to a folder not on ruby's path. To correct this, the following steps should be taken:
230 5 Jamie McPeek
231 5 Jamie McPeek
<pre>
232 5 Jamie McPeek
$ sudo mkdir -p /usr/local/lib64/ruby/site_ruby/mysql2
233 5 Jamie McPeek
</pre>
234 5 Jamie McPeek
235 5 Jamie McPeek
This creates the path that ruby expects to find the @mysql2.so@ file at.
236 5 Jamie McPeek
237 5 Jamie McPeek
<pre>
238 5 Jamie McPeek
$ cd /usr/local/share/gems/gems/mysql2-0.3.16/ext/mysql2
239 5 Jamie McPeek
$ sudo ruby extconf.rb
240 5 Jamie McPeek
$ sudo make
241 5 Jamie McPeek
$ sudo make install
242 5 Jamie McPeek
</pre>
243 5 Jamie McPeek
244 5 Jamie McPeek
The above steps complete the install to the expected directory using default compile options. Special options are beyond the scope of this guide.
245 5 Jamie McPeek
246 5 Jamie McPeek
The same should now be performed for the @rmagick@ native extension:
247 5 Jamie McPeek
248 5 Jamie McPeek
<pre>
249 5 Jamie McPeek
$ cd /usr/local/share/gems/gems/rmagick-2.13.3/ext/RMagick
250 5 Jamie McPeek
$ sudo ruby extconf.rb
251 5 Jamie McPeek
$ sudo make
252 5 Jamie McPeek
$ sudo make install
253 5 Jamie McPeek
</pre>
254 5 Jamie McPeek
255 5 Jamie McPeek
Once again, the above steps complete the install to the expected directory using default compile options.
256 5 Jamie McPeek
257 5 Jamie McPeek
Finally, return to the installation directory to finish the remaining steps:
258 5 Jamie McPeek
259 5 Jamie McPeek
<pre>
260 5 Jamie McPeek
$ cd /var/www/redmine
261 5 Jamie McPeek
</pre>
262 5 Jamie McPeek
263 5 Jamie McPeek
h2. Redmine Database Initialization
264 5 Jamie McPeek
265 5 Jamie McPeek
We're on to the final steps of completing the Redmine installation now that everything else has been taken care of.
266 5 Jamie McPeek
267 5 Jamie McPeek
The first step is to generate the secret key for session management:
268 5 Jamie McPeek
269 5 Jamie McPeek
<pre>
270 5 Jamie McPeek
$ sudo /usr/local/bin/rake generate_secret_token
271 5 Jamie McPeek
</pre>
272 5 Jamie McPeek
273 5 Jamie McPeek
Next, the database needs to be setup:
274 5 Jamie McPeek
275 5 Jamie McPeek
<pre>
276 5 Jamie McPeek
$ sudo RAILS_ENV=production /usr/local/bin/rake db:migrate
277 5 Jamie McPeek
</pre>
278 5 Jamie McPeek
279 5 Jamie McPeek
Finally, the database needs to be populated with default data:
280 5 Jamie McPeek
281 5 Jamie McPeek
<pre>
282 5 Jamie McPeek
$ sudo RAILS_ENV=production /usr/local/bin/rake redmine:load_default_data
283 5 Jamie McPeek
</pre>
284 5 Jamie McPeek
285 5 Jamie McPeek
This will prompt you to pick your language, which defaults to [en].
286 5 Jamie McPeek
287 5 Jamie McPeek
h3. WEBRick Test Execution
288 5 Jamie McPeek
289 5 Jamie McPeek
Once this step has been completed, you have a fully functional Redmine installation and can run this for testing via WEBRick:
290 5 Jamie McPeek
291 1 Jamie McPeek
<pre>
292 1 Jamie McPeek
$ sudo ruby script/rails server webrick -e production
293 1 Jamie McPeek
</pre>
294 6 Jamie McPeek
295 6 Jamie McPeek
h2. Passenger Installation
296 6 Jamie McPeek
297 6 Jamie McPeek
For a more usable production setup, Redmine can be hosted through @apache2@ via Passenger. To get the Passenger bootstrap, issue the following command:
298 6 Jamie McPeek
299 6 Jamie McPeek
<pre>
300 6 Jamie McPeek
$ sudo gem install passenger
301 6 Jamie McPeek
</pre>
302 6 Jamie McPeek
303 6 Jamie McPeek
Once completed, the native extensions still need to be compiled. This can be done by issuing the following command:
304 6 Jamie McPeek
305 6 Jamie McPeek
<pre>
306 6 Jamie McPeek
$ sudo /usr/local/bin/passenger-install-apache2-module
307 6 Jamie McPeek
</pre>
308 6 Jamie McPeek
309 6 Jamie McPeek
This tool will help diagnose any issues as well as provide some default settings for your specific installation.
310 6 Jamie McPeek
311 6 Jamie McPeek
*Note 1:* The compilation of Passenger requires at least 1GB of RAM or RAM+Swap space combined. The compile will fail otherwise.
312 6 Jamie McPeek
313 6 Jamie McPeek
h2. Passenger Configuration
314 6 Jamie McPeek
315 6 Jamie McPeek
Now that the extensions have been installed, @apache2@ needs to know how to use it.
316 6 Jamie McPeek
317 6 Jamie McPeek
The first step is to create a configuration file for Passenger:
318 6 Jamie McPeek
319 6 Jamie McPeek
<pre>
320 6 Jamie McPeek
$ sudo nano -w /etc/httpd/conf.modules.d/passenger.conf
321 6 Jamie McPeek
</pre>
322 6 Jamie McPeek
323 6 Jamie McPeek
This file should contain the information presented from running @passenger-install-apache2-module@. An example:
324 6 Jamie McPeek
325 6 Jamie McPeek
<pre>
326 6 Jamie McPeek
LoadModule passenger_module /usr/local/share/gems/gems/passenger-4.0.48/buildout/apache2/mod_passenger.so
327 6 Jamie McPeek
<IfModule mod_passenger.c>
328 6 Jamie McPeek
   PassengerDefaultUser apache
329 6 Jamie McPeek
   PassengerRoot /usr/local/share/gems/gems/passenger-4.0.48
330 6 Jamie McPeek
   PassengerDefaultRuby /usr/bin/ruby
331 6 Jamie McPeek
</IfModule>
332 6 Jamie McPeek
</pre>
333 6 Jamie McPeek
334 6 Jamie McPeek
*Note 1: In addition to the default information from the installer, also add @PassengerDefaultUser apache@. This will ensure Passenger runs as the user apache and maintains write access only to the folders defined previously.
335 6 Jamie McPeek
336 6 Jamie McPeek
h2. Web Server Configuration
337 6 Jamie McPeek
338 6 Jamie McPeek
Now that the module is enabled, we have the choice of running the installation of Redmine at our root directory or as a subdirectory on the website.
339 6 Jamie McPeek
340 6 Jamie McPeek
h3. Top-Level Execution
341 6 Jamie McPeek
342 6 Jamie McPeek
To run straight at a base website, modify the @apache2@ configuration file:
343 6 Jamie McPeek
344 6 Jamie McPeek
<pre>
345 6 Jamie McPeek
$ sudo nano -w /etc/httpd/conf/httpd.conf
346 6 Jamie McPeek
</pre>
347 6 Jamie McPeek
348 6 Jamie McPeek
And add the following block to the bottom of the file:
349 6 Jamie McPeek
350 6 Jamie McPeek
<pre>
351 6 Jamie McPeek
<VirtualHost *:80>
352 6 Jamie McPeek
   ServerName www.website.com
353 6 Jamie McPeek
354 6 Jamie McPeek
   DocumentRoot /var/www/redmine/public
355 6 Jamie McPeek
356 6 Jamie McPeek
   <Directory /var/www/redmine/public>
357 6 Jamie McPeek
      # This relaxes Apache security settings.
358 6 Jamie McPeek
      AllowOverride all
359 6 Jamie McPeek
      # MultiViews must be turned off.
360 6 Jamie McPeek
      Options -MultiViews
361 6 Jamie McPeek
      # Uncomment this if you're on Apache >= 2.4:
362 6 Jamie McPeek
      Require all granted
363 6 Jamie McPeek
   </Directory>
364 6 Jamie McPeek
</VirtualHost>
365 6 Jamie McPeek
</pre>
366 6 Jamie McPeek
367 6 Jamie McPeek
h3. Sub-Directory Execution
368 6 Jamie McPeek
369 6 Jamie McPeek
To run from a sub-directory of the base of a website, modify the @apache2@ configuration file:
370 6 Jamie McPeek
371 6 Jamie McPeek
<pre>
372 6 Jamie McPeek
$ sudo nano -w /etc/httpd/conf/httpd.conf
373 6 Jamie McPeek
</pre>
374 6 Jamie McPeek
375 6 Jamie McPeek
And add the following block to the bottom of the file:
376 6 Jamie McPeek
377 6 Jamie McPeek
<pre>
378 6 Jamie McPeek
<VirtualHost *:80>
379 6 Jamie McPeek
   ServerName www.website.com
380 6 Jamie McPeek
381 6 Jamie McPeek
   DocumentRoot /var/www/html
382 6 Jamie McPeek
383 6 Jamie McPeek
   Alias /redmine /var/www/redmine/public
384 6 Jamie McPeek
385 6 Jamie McPeek
   <Location /redmine>
386 6 Jamie McPeek
      PassengerBaseURI /redmine
387 6 Jamie McPeek
      PassengerAppRoot /var/www/redmine
388 6 Jamie McPeek
   </Location>
389 6 Jamie McPeek
390 6 Jamie McPeek
   <Directory /var/www/redmine/public>
391 6 Jamie McPeek
      # This relaxes Apache security settings.
392 6 Jamie McPeek
      AllowOverride all
393 6 Jamie McPeek
      # MultiViews must be turned off.
394 6 Jamie McPeek
      Options -MultiViews
395 6 Jamie McPeek
      # Uncomment this if you're on Apache >= 2.4:
396 6 Jamie McPeek
      Require all granted
397 6 Jamie McPeek
   </Directory>
398 6 Jamie McPeek
</VirtualHost>
399 6 Jamie McPeek
</pre>
400 6 Jamie McPeek
401 6 Jamie McPeek
h2. Email Configuration
402 6 Jamie McPeek
403 6 Jamie McPeek
This section goes through the steps necessary to setup email notifications to be sent out from Redmine. Handling email input for issue creation and other purposes is beyond the scope of this guide.
404 6 Jamie McPeek
405 6 Jamie McPeek
The default configuration file for @postfix@ is very thorough; however, you may want to change the @myhostname@ option as follows:
406 6 Jamie McPeek
407 6 Jamie McPeek
<pre>
408 6 Jamie McPeek
myhostname = mail.website.com
409 6 Jamie McPeek
</pre>
410 6 Jamie McPeek
411 6 Jamie McPeek
The default will attempt to grab the FQDN from the server, which may not be what you want.
412 6 Jamie McPeek
413 6 Jamie McPeek
h3. Optional SELinux Configuration
414 6 Jamie McPeek
415 6 Jamie McPeek
By default with SELinux enabled, the web server cannot open external connections. This is necessary for sending email notifications, even when port 25 is being opened on the localhost. This can be done with the following command:
416 6 Jamie McPeek
417 6 Jamie McPeek
<pre>
418 6 Jamie McPeek
$ sudo setsebool httpd_can_network_connect 1
419 6 Jamie McPeek
</pre>
420 6 Jamie McPeek
421 6 Jamie McPeek
h3. Redmine Email Configuration
422 6 Jamie McPeek
423 6 Jamie McPeek
To use postfix, Redmine needs to know to communicate with it appropriately.
424 6 Jamie McPeek
425 6 Jamie McPeek
This can be done by making some more configuration changes:
426 6 Jamie McPeek
427 6 Jamie McPeek
<pre>
428 6 Jamie McPeek
$ cd /var/www/redmine/config
429 6 Jamie McPeek
$ sudo cp configuration.yml.example configuration.yml
430 6 Jamie McPeek
$ sudo nano -w configuration.yml
431 6 Jamie McPeek
</pre>
432 6 Jamie McPeek
433 6 Jamie McPeek
Assuming you are only running a production environment, just editing the @default@ section will be sufficient. An example of an authenticationless connection using postfix:
434 6 Jamie McPeek
435 6 Jamie McPeek
<pre><code class="yaml">
436 6 Jamie McPeek
default:
437 6 Jamie McPeek
  # Outgoing emails configuration (see examples above)
438 6 Jamie McPeek
  email_delivery:
439 6 Jamie McPeek
    delivery_method: :async_smtp
440 6 Jamie McPeek
</code></pre>
441 6 Jamie McPeek
442 6 Jamie McPeek
h2. Restart Web Server
443 6 Jamie McPeek
444 6 Jamie McPeek
With all of the configuration changes and module installations, the @apache2@ server needs to be restarted:
445 6 Jamie McPeek
446 6 Jamie McPeek
<pre>
447 6 Jamie McPeek
$ sudo systemctl restart httpd
448 6 Jamie McPeek
</pre>
449 6 Jamie McPeek
450 6 Jamie McPeek
Once that comes back up, you should be able to browse to a fully working stock installation of Redmine at either http://www.website.com/ or http://www.website.com/redmine.
451 6 Jamie McPeek
452 6 Jamie McPeek
h2. Enable SELinux
453 6 Jamie McPeek
454 6 Jamie McPeek
If you wish to re-enable SELinux at this point, you may do so by issuing the following command:
455 6 Jamie McPeek
456 6 Jamie McPeek
<pre>
457 6 Jamie McPeek
$ sudo setenforce 1
458 6 Jamie McPeek
</pre>
459 6 Jamie McPeek
460 6 Jamie McPeek
Assuming you have followed the optional SELinux sections, the Redmine installation should function identically with SELinux enabled or disabled.