HowTo Install Redmine 3.0.3 on Fedora 22
- How To Install Redmine-3.0.3 on Fedora 22
- System Requirements
- Updating the System
- Installing Dependencies
- Disable SELinux
- Enable Server Environment
- Configuring MariaDB
- Obtaining Redmine
- Redmine Database Configuration
- Redmine Installation Directory
- Ruby Gem Installation
- Native Extension Fixes
- Redmine Database Initialization
- Passenger Installation
- Passenger Configuration
- Web Server Configuration
- Email Configuration
- Restart Web Server
- Enable SELinux
System Requirements
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.
The hardware requirements are not significant, so a small VM with 10gb storage and 1GB ram and 1GB swap file should be sufficient.
This guide can be used on top of an already existing system or, from scratch, downloading from the Fedora website.
An ISO for installation can be downloaded from here.
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.
Updating the System
Before beginning, you should ensure all of your installed packages are up-to-date. This can be done by issuing the following command:
If the kernel was updated as part of this command, you should perform a restart to begin using it:
Installing Dependencies
Before beginning the installation of Redmine, there are a number of dependencies which need to be installed.
Depending on your needs, some of these may not be necessary. Depending on your preferences, you may choose alternatives to some of these.
All of these can be installed prior to starting with a single command:
Disable SELinux
Some users have noted issues installing Redmine with SELinux active. This can be disabled via the following command:
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.
Enable Server Environment
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.
* apply after to check the default-zone
The first step is to open the standard port 80 in the firewall for the web server:
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.
The second step is to start the web server and database server:
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.
Configuring MariaDB
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:
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.
Advanced usages or installations may opt for different answers; however, that is beyond the scope of this guide.
Creating a Redmine Database and Account
Now that you have MariaDB configured, it is time to create a database and user for use with your Redmine installation.
First, connect to the server:
You will be prompted to enter the root password. Once provided, you will be able to issue the following commands:
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.
Once those commands have been entered, issue the following command to return to the command line:
Obtaining Redmine
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.
In this example, we'll use wget to download the file from the Redmine server and tar to extract its contents:
Redmine Database Configuration
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:
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:
This replaces the user root
and the blank password in the example configuration file.
Redmine Installation Directory
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.
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.
This can be don with the following commands:
To ensure proper functionality and access rights, the public/plugin_assets
folder needs to be created:
To allow read/write access to the folders, the user apache
needs to have access:
Optional SELinux Configuration
If you plan to re-enable SELinux after installation, the following steps should be taken to ensure smooth execution.
This command applies SELinux directory permissions typically for a web server to all sub-directories under the redmine top-level folder.
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.
Ruby Gem Installation
The ruby dependencies for Redmine are managed by bundler, so that must be installed first to determine what else must be downloaded and installed.
With bundler installed, the Redmine ruby dependencies can be sorted:
Note 1: By default /usr/local/bin
is not on $PATH
for the root
user, so the absolute path must be provided.
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.
* When the following error occured
- error message
An error occurred while installing nokogiri (1.6.6.2), and Bundler cannot continue.
- To install libxml2-devel, libxslt-devel
$ sudo dnf -y install libxml2-devel libxslt-devel
$ sudo bundle config build.nokogiri --use-system-libraries
$ sudo /usr/local/bin/bundle install --without development test
Native Extension Fixes
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:
This creates the path that ruby expects to find the mysql2.so
file at.
The above steps complete the install to the expected directory using default compile options. Special options are beyond the scope of this guide.
The same should now be performed for the rmagick
native extension:
Once again, the above steps complete the install to the expected directory using default compile options.
Finally, return to the installation directory to finish the remaining steps:
Redmine Database Initialization
We're on to the final steps of completing the Redmine installation now that everything else has been taken care of.
The first step is to generate the secret key for session management:
Next, the database needs to be setup:
Finally, the database needs to be populated with default data:
This will prompt you to pick your language, which defaults to [en].
WEBRick Test Execution
Once this step has been completed, you have a fully functional Redmine installation and can run this for testing via WEBRick:
Passenger Installation
For a more usable production setup, Redmine can be hosted through apache2
via Passenger. To get the Passenger bootstrap, issue the following command:
Once completed, the native extensions still need to be compiled. This can be done by issuing the following command:
This tool will help diagnose any issues as well as provide some default settings for your specific installation.
Note 1: The compilation of Passenger requires at least 1GB of RAM or RAM+Swap space combined. The compile will fail otherwise.
Passenger Configuration
Now that the extensions have been installed, apache2
needs to know how to use it.
The first step is to create a configuration file for Passenger:
This file should contain the information presented from running passenger-install-apache2-module
. An example:
*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.
Web Server Configuration
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.
Top-Level Execution
To run straight at a base website, modify the apache2
configuration file:
And add the following block to the bottom of the file:
Sub-Directory Execution
To run from a sub-directory of the base of a website, modify the apache2
configuration file:
And add the following block to the bottom of the file:
Email Configuration
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.
The default configuration file for postfix
is very thorough; however, you may want to change the myhostname
option as follows:
The default will attempt to grab the FQDN from the server, which may not be what you want.
Optional SELinux Configuration
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:
Redmine Email Configuration
To use postfix, Redmine needs to know to communicate with it appropriately.
This can be done by making some more configuration changes:
Assuming you are only running a production environment, just editing the default
section will be sufficient. An example of an authenticationless connection using postfix:
Restart Web Server
With all of the configuration changes and module installations, the apache2
server needs to be restarted:
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/ orhttp://www.website.com/redmine.
Enable SELinux
If you wish to re-enable SELinux at this point, you may do so by issuing the following command:
Assuming you have followed the optional SELinux sections, the Redmine installation should function identically with SELinux enabled or disabled.
source - http://www.redmine.org/projects/redmine/wiki/FedoraInstallation
* Permission denied in tmp
# cat /var/log/error_log
ActionView::Template::Error (Permission denied @ dir_s_mkdir - /var/www/redmine/tmp/cache/D38):
- To resolve
# chmod 777 /var/www/redmine/tmp/cache
'OpenSource > Common' 카테고리의 다른 글
Setting Up Xmind in Fedora 20 (0) | 2015.06.23 |
---|---|
redmine - bitnami redmine 한글 파일명, 디렉토리명 깨짐 (2) | 2015.06.18 |
opensource - load balancing Software (0) | 2014.04.10 |
open source issue and bug tracking software (0) | 2014.01.09 |
elasticsearch 사용 (0) | 2014.01.08 |