Follow through this guide to learn how to install Redmine with Apache and MySQL 8 on Fedora 30/29/31.
Want to use CentOS 8 instead? Follow the link below to learn how to install Redmine on CentOS 8.
Install Redmine with Apache and MariaDB on CentOS 8
Install Redmine with Apache and MySQL 8 on Fedora 30/29/31
Run System Update
You can update your system packages by running;
Install Required Redmine Dependencies
Run the command below to install required Redmine dependencies and other packages.
dnf install ruby-devel rpm-build libxml2-devel make automake libtool ImageMagick ImageMagick-devel mariadb-devel gcc
httpd-devel libcurl-devel gcc-c++ vim
During the installation, Ruby is also installed. Verify installed version.
ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-linux]
The version here shown may vary with your version of installed Ruby.
Create Redmine System User
In this guide, we will install Redmine on
/opt/redmine directory and run it as non-privileged redmine system user.
Therefore, create a redmine user (or any other non-privileged user that Redmine will run as for that case) and assign the
/opt/redmine as its home directory.
useradd -r -m -d /opt/redmine redmine
man useradd to learn what the options used above means.
Install Apache HTTP Server
To install Apache HTTP server on Fedora 30/29/31, simply execute;
dnf install httpd
Start and enable Apache to run on system boot.
systemctl enable httpd --now
Next, add Apache to Redmine group.
usermod -aG redmine apache
Install MySQL 8 Redmine Database Backend
We have covered the installation MySQL 8 on Fedora in our previous guide. Follow the link below to install it.
Install MySQL 8 on Fedora 30/Fedora 29/31
Once installed, login to MySQL and create Redmine database and Redmine database user. Replace the database, database user and password accordingly.
mysql -u root -p
Next, create the database.
create database redminedb;
Create Redmine database user.
create user [email protected] identified by '[email protected]#8';
Grant the user all privileges on the Redmine database created.
grant all on redminedb.* to [email protected];
Reload privileges tables and quit.
flush privileges; quit
Download Redmine Tarball
To install the latest version of Redmine, navigate to the Download’s page and grab the latest stable release version.
You can simply use wget command to pull latest Redmine tarball, version 4.0.5 as of this writing.
wget http://www.redmine.org/releases/redmine-4.0.5.tar.gz -P /tmp
Install Redmine on Fedora 30/29/31
Extract the Redemine tarball to Redmine user’s home directory once the download is completes.
sudo -u redmine tar xzf /tmp/redmine-4.0.5.tar.gz -C /opt/redmine/ --strip-components=1
You should now have redmine files under /opt/redmine.
app bin config.ru db extra Gemfile log public README.rdoc tmp appveyor.yml config CONTRIBUTING.md doc files lib plugins Rakefile test vendor
Switch to Redmine user and rename the following sample Redmine configurations.
su - redmine
Set the Redmine database connection details.
... production: adapter: mysql2 database: redminedb host: localhost username: redmineuser password: "[email protected]#8" encoding: utf8 ...
Install Ruby GEM Dependencies
While in still logged in as Redmine user and from its home directory, execute the commands below;
gem install bundler
bundle install --without development test --path vendor/bundle
Generate Secret Session Token
To prevent tempering of the cookies that stores session data, you need to generate a random secret key that Rails uses to encode them.
bundle exec rake generate_secret_token
Create Database Schema Objects
Create Rails database structure by running the command below;
RAILS_ENV=production bundle exec rake db:migrate
Once the database migration is done, insert default configuration data into the database by executing;
RAILS_ENV=production REDMINE_LANG=en bundle exec rake redmine:load_default_data
Configure FileSystem Permissions
Ensure that the following directories are available on Redmine directory, /opt/redmine.
- tmp and tmp/pdf
- public and public/plugin_assets
If they do not exist, simply create them and ensure that they are owned by the user used to run Redmine.
for i in tmp tmp/pdf public/plugin_assets; do [ -d $i ] || mkdir -p $i; done
chown -R redmine:redmine files log tmp public/plugin_assets
chmod -R 755 /opt/redmine/
Testing Redmine Installation
The setup of Redmine on CentOS 8 is now done. You can test Redmine using WEBrick by executing the command below;
bundle exec rails server webrick -e production
=> Booting WEBrick => Rails 5.2.3 application starting in production on http://0.0.0.0:3000 => Run `rails server -h` for more startup options [2019-10-31 21:37:32] INFO WEBrick 1.4.2 [2019-10-31 21:37:32] INFO ruby 2.5.5 (2019-03-15) [x86_64-linux] [2019-10-31 21:37:32] INFO WEBrick::HTTPServer#start: pid=11811 port=3000
You can now access Redmine via the browser using the address,
If firewallD is running, open port 3000/tcp on firewalld. Run the commands below as privileged user. (If you are logged in as Redmine user, simply press Ctrl+d to log out).
firewall-cmd --add-port=3000/tcp --permanent firewall-cmd --reload
Once the port is opened, navigate to the browser and access Redmine. You should see a welcome page.
Click sign in and use the credentials, User:
admin and Password:
admin to login.
Configure Apache for Redmine
WEBrick is not suitable for serving Redmine in production environments. As such, we are using Apache with Phusion Passenger in this guide to server Redmine.
Install Apache Phusion Passenger modules.
dnf install passenger mod_passenger
Once the installation is done, edit the Apache passenger configuration file such that it looks like as shown below;
<IfModule mod_passenger.c> PassengerRoot /usr/share/passenger//phusion_passenger/locations.ini PassengerRuby /usr/bin/ruby </IfModule> # Deploying a Ruby on Rails application: an example Listen 3000 <VirtualHost *:3000> ServerName redmine.kifaruni-demo.com DocumentRoot /opt/redmine/public CustomLog "logs/redmine_access.log" combined ErrorLog "logs/redmine_error.log" <Directory /opt/redmine/public> Options -MultiViews AllowOverride all Require all granted </Directory> </VirtualHost>
Save and quit the configuration file.
Check HTTP server syntax.
If the syntax is Okay,
Syntax OK, restart Apache.
systemctl restart httpd
Check if anything is listening on Port 3000.
lsof -i :3000
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME httpd 2614 root 6u IPv4 148831 0t0 TCP *:hbci (LISTEN) httpd 2663 apache 6u IPv4 148831 0t0 TCP *:hbci (LISTEN) httpd 2664 apache 6u IPv4 148831 0t0 TCP *:hbci (LISTEN) httpd 2665 apache 6u IPv4 148831 0t0 TCP *:hbci (LISTEN)
That is great.
Access Redmine from Browser
If SELinux is running, I suggest that you set it in permissive mode as it may cause problems with accessing some pages on Redmine. If however you are conversant with how SELinux works, you can deal with it.
sed -i 's/=enforcing/=permissive/' /etc/selinux/config
Reboot the system to effect SELinux changes.
To temporarily disable SELinux, run;
Since we have already opened port 3000/tcp on firewallD, you should now be able to access Redmine web interface now. Replace the server-IP-or-Hostname accordingly.
Sign in with the default credentials and reset the admin password.
Setup your Redmine admin profile.
You can now Navigate through Redmine tabs to learn more about it.
Redmine Administration Tab.
Redmine Projects tab
You have successfully installed Redmine with Apache and MySQL 8 on Fedora 30/29/31.
Other Related Tutorials
Install GoAccess On Fedora 30/Fedora 29
Setup HAProxy Load Balancer on Fedora 30/Fedora 29
Install ManageEngine AssetExplorer on CentOS 7/Fedora 30/29