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
Consult 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.
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, http://Server-IP:3000/.
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).
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;
vim /etc/httpd/conf.d/passenger.conf
<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>
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;
setenforce 0
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.
http://server-IP-or-Hostname:3000
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.
We're passionate about sharing our knowledge and experiences with you through our blog. If you appreciate our efforts, consider buying us a virtual coffee. Your support keeps us motivated and enables us to continually improve, ensuring that we can provide you with the best content possible. Thank you for being a coffee-fueled champion of our work!
koromicha
I am the Co-founder of Kifarunix.com, Linux and the whole FOSS enthusiast, Linux System Admin and a Blue Teamer who loves to share technological tips and hacks with others as a way of sharing knowledge as:
"In vain have you acquired knowledge if you have not imparted it to others".