Install Redmine 4.1.1 on CentOS 7


Install Redmine 4.1.1 on the server where CentOS 7 is installed. Basically, you should be able to update the package with the yum command. SELinux is disabled for some reason, so SELinux is not considered.

Installation procedure

# cat /etc/redhat-release
CentOS Linux release 7.8.2003 (Core)


Added SCL repository to install Ruby 2.5 from SCL repository. Also, add the packages required for Ruby-related builds.

# yum install centos-release-scl
# yum group install "Development tools"
# yum install zlib-devel
# yum install ImageMagick ImageMagick-devel

Install Ruby and build RoR

# yum install rh-ruby25 rh-ruby25-ruby-devel
# echo '/opt/rh/rh-ruby25/root/usr/lib64' > /etc/
# ldconfig

# update-alternatives --display ruby
# update-alternatives --install /usr/bin/ruby ruby /opt/rh/rh-ruby25/root/bin/ruby 25 \
  --slave /usr/bin/gem gem /opt/rh/rh-ruby25/root/usr/bin/gem

# ruby -v
ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-linux]

# gem install rails
# gem install bundler

# update-alternatives --install /usr/bin/ruby ruby /opt/rh/rh-ruby25/root/bin/ruby 25 \
  --slave /usr/bin/gem gem /opt/rh/rh-ruby25/root/usr/bin/gem \
  --slave /usr/local/bin/rails rails /opt/rh/rh-ruby25/root/usr/local/bin/rails \
  --slave /usr/local/bin/rake rake /opt/rh/rh-ruby25/root/usr/local/bin/rake \
  --slave /usr/local/bin/bundle bundle /opt/rh/rh-ruby25/root/usr/local/bin/bundle

MariaDB installation and initialization

# yum install mariadb-server mariadb-devel
# systemctl start mariadb
# systemctl enable mariadb
# mysql_secure_installation

# mysql -u root -p
MariaDB [(none)]> CREATE DATABASE redmine CHARACTER SET utf8;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON redmine.* TO redmine@localhost IDENTIFIED BY 'P@ssw0rd!';
MariaDB [(none)]> quit

Install Redmine

# cd /var/www
# wget
# tar xvzf redmine-4.1.1.tar.gz

# cd /var/www/redmine-4.1.1/config
# cp database.yml.example database.yml
# vi database.yml

Changed according to MariaDB settings. Since it is MariaDB 5.5, it is ** encoding: utf8 **.


      adapter: mysql2
      database: redmine
      host: localhost
-     username: root
+     username: redmine
-     password: ""
+     password: "P@ssw0rd!"
      # Use "utf8" instead of "utfmb4" for MySQL prior to 5.7.7
-     encoding: utf8mb4
+     encoding: utf8
# cd /var/www/redmine-4.1.1
# bundle install --without development test --path vendor/bundle
# bundle exec rake generate_secret_token
# RAILS_ENV=production bundle exec rake db:migrate
# RAILS_ENV=production bundle exec rake redmine:load_default_data

# cd /var/www/redmine-4.1.1/public
# cp dispatch.fcgi.example dispatch.fcgi
# cp htaccess.fcgi.example .htaccess

# yum install httpd mod_fcgid fcgi fcgi-devel mod_ssl
# gem install fcgi

# cd /var/www/redmine-4.1.1
# vi Gemfile.local

Added to the end of Gemfile.local.


+   gem 'fcgi'
# bundle install --without development test --path vendor/bundle
# chown -R apache:apache /var/www/redmine-4.1.1

Apache httpd settings

Setting that only overwrites DocumentRoot for the time being. If you need to install VirtualHost or SSL, set it as such. If ** FcgidMaxRequestLen ** is not set, the file size that can be uploaded will be limited, so describe a value larger than the setting value in Redmine.


DocumentRoot /var/www/redmine-4.1.1/public
FcgidMaxRequestLen 10485760
<Directory /var/www/redmine-4.1.1/public>
  Require all granted
  AllowOverride All

Added to the end of fcgid.conf. Without it, it will not work in production.


    # Use FastCGI to process .fcg .fcgi & .fpl scripts
    AddHandler fcgid-script fcg fcgi fpl

    # Sane place to put sockets and shared memory file
    FcgidIPCDir /run/mod_fcgid
    FcgidProcessTableFile /run/mod_fcgid/fcgid_shm
+   DefaultInitEnv RAILS_ENV production

After that, configure Firewalld and restart Apache httpd to finish.

Recommended Posts

Install Redmine 4.1.1 on CentOS 7
Install Golang on CentOS 8
Install Neo4j 4.1.3 on centOS
Install Vertica 10.0 on CentOS 6.10
Install PostgreSQL 12 on Centos8
Install nginx on centOS7
Install Python 3 on CentOS 7
Install Mattermost on CentOS 7
Install PostGIS 2.5.5 on CentOS7
Smokeping Install on CentOS7
Install PostgreSQL 13 on CentOS 7.5
Install OpenFOAM v2006 on CentOS
Install Jenkins on Docker's CentOS
Install Apache on CentOS on VirtualBox
Install Ruby 2.7 on CentOS 7 (SCL)
Try DPDK20 SDK on CentOS7 â‘ Install
Install Ruby 2.5 on CentOS 7 using SCL
Install Java Open JDK 8 on CentOS 7
How to install MariaDB 10.4 on CentOS 8
Install apache 2.4.46 from source on CentOS7
Steps to install MySQL 8 on CentOS 8
Install Java 9 on windows 10 and CentOS 7
Install MariaDB (CentOS 8)
[CentOS] Install apache-loggen
OpenVPN on CentOS 8
Redmine on Docker
Install the webmail client Rainloop on CentOS 8
How to install beta php8.0 on CentOS8
Install CentOS 7 on Raspberry pi 4 Model B
Install the project management tool "Redmine" on CentOS8 (database is Postgre)
Install NextCloud on CentOS 7 with Alibaba Cloud ECS
Install gradle on mac
Command to install nginx / PHP7 / php-fpm on CentOS7
Maven on CentOS 7 tutorial
Install OpenJDK on macOS
Install Java on Mac
Docker installation on CentOS 6
Use perltidy on CentOS 8
Install pyqt5 on ubuntu
Try OpenLiteSpeed on CentOS8
Tomcat v8 on CentOS7
[CentOS7] Install aws cli
Zabbix 5 installation on CentOS 8
Use mod_auth_cas on CentOS 8
Install GitLab on CentOS 8 with no internet connection
Use bat on Centos.
Jetty v8 on CentOS7
Install Autoware on Ubuntu 18.04.5
OpenJDK installation on CentOS 7
Install Homebrew on Ubuntu 20.04
Install OpenJDK 8 on mac
Install BookStack Documentation Wiki on Elastic Compute Service on CentOS 7
Install the latest hardware drivers from ELRepo on CentOS
Install MySQL 5.6 on CentOS6 [How to specify the version]
Introduced view customization plugin to Redmine installed on CentOS8
Install ag (the silver searcher) [on CentOS / Ubuntu / Mac]
Try RabbitMQ + PHP on CentOS
Install Docker on Raspberry Pi
Install Docker on Windows 10 PRO
Network install CentOS 8 with Kickstart.
Make exFat available on CentOS 7