|
|
|
**STEP 1**
|
|
-Update the system
|
|
sudo yum update
|
|
|
|
|
|
**STEP 2**
|
|
- Install Dependencies and Database
|
|
Add EPEL repository:
|
|
sudo dnf install epel-release -y
|
|
|
|
|
|
**STEP 3**
|
|
Install development tools and required packages:
|
|
sudo dnf groupinstall "Development Tools" -y
|
|
|
|
|
|
**STEP 4**
|
|
Install ImageMagick:
|
|
sudo dnf install curl git ImageMagick ImageMagick-devel -y
|
|
|
|
|
|
**STEP 5**
|
|
---------------------------------
|
|
Install MariaDB:
|
|
sudo dnf install mariadb mariadb-server
|
|
|
|
**STEP 6**
|
|
After installing MariaDB, start the database server and enable it to start automatically on system boot:
|
|
sudo systemctl start mariadb
|
|
sudo systemctl enable mariadb
|
|
|
|
**STEP**
|
|
Secure the MariaDB installation:
|
|
sudo mysql_secure_installation
|
|
|
|
**STEP 7**
|
|
Create a Database and User for Redmine
|
|
sudo mysql -u root -p
|
|
|
|
# Run the following commands in the MariaDB shell
|
|
CREATE DATABASE redmine CHARACTER SET utf8mb4;
|
|
CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'your_password';
|
|
GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';
|
|
FLUSH PRIVILEGES;
|
|
EXIT;
|
|
------------------------------------------
|
|
|
|
|
|
**STEP 8**
|
|
Create a new user and group, with home directory /opt/redmine that will run the Redmine instance:
|
|
sudo useradd -m -U -r -d /opt/redmine redmine
|
|
|
|
|
|
**STEP 9**
|
|
Install Apache web server by running the following command:
|
|
sudo dnf install httpd
|
|
|
|
Start Apache web server by running the following command:
|
|
sudo systemctl start httpd
|
|
|
|
Enable Apache to start automatically on boot by running the following command:
|
|
sudo systemctl enable httpd
|
|
|
|
To verify that Apache is running, you can run the following command:
|
|
sudo systemctl status httpd
|
|
|
|
|
|
**STEP 10**
|
|
Add the apache user to the redmine group and change the /opt/redmine directory permissions so that the Apache can access it:
|
|
sudo usermod -a -G redmine apache
|
|
sudo chmod 750 /opt/redmine
|
|
|
|
|
|
**STEP 11**
|
|
Switch to Redmine user:
|
|
sudo su - redmine
|
|
|
|
**STEP 12**
|
|
Install RVM: (https://help.dreamhost.com/hc/en-us/articles/217185247-Ruby-Version-Manager-RVM-)
|
|
|
|
Install RVM's public keys:
|
|
gpg --keyserver keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
|
|
|
|
Install the latest stable version of RVM:
|
|
curl -sSL https://get.rvm.io | bash -s
|
|
|
|
Run this to unset your GEM_HOME:
|
|
unset GEM_HOME
|
|
|
|
Run this to source your new RVM install:
|
|
source ~/.rvm/scripts/rvm
|
|
|
|
Run the following to disable autolibs:
|
|
rvm autolibs disable
|
|
|
|
Check if RVM is installed and functioning:
|
|
rvm --version
|
|
|
|
|
|
**STEP 13**
|
|
Install Ruby
|
|
Install the exact version of Ruby you require. This example installs version 3.0.1:
|
|
rvm install 3.1.0
|
|
|
|
You can now tell your system to use this version by default:
|
|
rvm use 3.1.0 --default
|
|
|
|
Check the version of Ruby to confirm it's been updated.
|
|
ruby -v
|
|
|
|
|
|
**STEP 14**
|
|
Install Rails:
|
|
|
|
Install a specific version:
|
|
gem install rails --version 6.1.0
|
|
|
|
|
|
**STEP 15**
|
|
Install Redmine 5
|
|
curl -L http://www.redmine.org/releases/redmine-5.0.1.tar.gz -o redmine.tar.gz
|
|
tar -xvf redmine.tar.gz
|
|
mv redmine-5.0.1/ redmine/
|
|
rm redmine.tar.gz
|
|
|
|
|
|
**STEP 16**
|
|
cp /opt/redmine/redmine/config/database.yml.example /opt/redmine/redmine/config/database.yml
|
|
nano /opt/redmine/redmine/config/database.yml
|
|
|
|
Update:
|
|
|
|
production:
|
|
adapter: mysql2
|
|
database: redmine
|
|
host: localhost
|
|
username: redmine
|
|
password: “<redmine db user password>”
|
|
encoding: utf8mb4
|
|
|
|
|
|
**STEP 17**
|
|
6. Install Ruby Dependencies
|
|
cd ~/redmine
|
|
WARNING^^
|
|
gem install bundler
|
|
|
|
sudo bundle install --without development test
|
|
*WARNING ERROR: An error occurred while installing mysql2 (0.5.5), and Bundler cannot continue.*
|
|
|
|
|
|
bundle exec rake generate_secret_token
|
|
RAILS_ENV=production bundle exec rake db:migrate
|
|
|
|
|
|
**STEP 18**
|
|
Apache Configuration:
|
|
sudo nano /etc/httpd/conf.d/redmine.conf
|
|
|
|
|
|
<VirtualHost *:80>
|
|
ServerName example.com _(IP address)_
|
|
ServerAlias www.example.com _(IP address)_
|
|
DocumentRoot /opt/redmine/redmine/public
|
|
|
|
<Directory /opt/redmine/redmine-4.1.0/public>
|
|
Options Indexes ExecCGI FollowSymLinks
|
|
Require all granted
|
|
AllowOverride all
|
|
</Directory>
|
|
|
|
ErrorLog /var/log/httpd/example.com-error.log
|
|
CustomLog /var/log/httpd/example.com-access.log combined
|
|
</VirtualHost>
|
|
|
|
|
|
**STEP 19**
|
|
Restart Apache:
|
|
$ sudo systemctl restart httpd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|