Created
April 14, 2021 06:15
-
-
Save fravelgue/6d973e7f53e3f398c5dffaf4e7e09fac to your computer and use it in GitHub Desktop.
Install Redmine 4.2.0 on Centos7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://www.rosehosting.com/blog/how-to-install-redmine-on-centos-8/ | |
# https://tecadmin.net/install-ruby-latest-stable-centos/ | |
yum update | |
yum group install "Development Tools" | |
yum install install epel-release | |
# yum config-manager --enable epel | |
# yum config-manager --set-enabled PowerTools | |
# create a user for redmine | |
useradd -m -U -r -d /opt/redmine redmine | |
yum install gcc-c++ patch readline readline-devel zlib zlib-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison sqlite-devel wget | |
yum install ruby ruby-devel rubygems zlib-devel curl-devel openssl-devel httpd-devel apr-devel apr-util-devel ImageMagick ImageMagick-devel | |
yum install mariadb mariadb-server mariadb-devel | |
systemctl enable mariadb | |
systemctl start mariadb | |
systemctl status mariadb | |
mysql_secure_installation | |
mysql -u root -p | |
# inside db | |
CREATE DATABASE redmine_db; | |
CREATE USER 'redmine_user'@'localhost' IDENTIFIED BY 'Vh8uyqXe'; | |
GRANT ALL ON redmine_db.* TO 'redmine_user'@'localhost' IDENTIFIED BY 'Vh8uyqXe'; | |
FLUSH PRIVILEGES; | |
EXIT; | |
su - redmine | |
# install rvm to get ruby 2.7.2 version | |
curl -sSL https://rvm.io/mpapis.asc | gpg2 --import - | |
curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import - | |
curl -L get.rvm.io | bash -s stable | |
source /home/vagrant/.rvm/scripts/rvm | |
rvm reload | |
rvm requirements run | |
rvm install 2.7.2 | |
rvm use 2.7.2 --default | |
# use git instead of https://www.redmine.org/releases/redmine-4.2.0.tar.gz | |
wget https://github.com/redmine/redmine/archive/refs/tags/4.2.0.tar.gz | |
tar -xvf 4.2.0.tar.gz | |
mv redmine-4.2.0 redmine | |
cp /opt/redmine/redmine/config/database.yml.example /opt/redmine/redmine/config/database.yml | |
cp /opt/redmine/redmine/config/configuration.yml.example /opt/redmine/redmine/config/configuration.yml | |
#update database.yml with right values | |
# production: | |
# adapter: mysql2 | |
# database: redmine_db | |
# host: localhost | |
# username: redmine_user | |
# password: "Vh8uyqXe" | |
# encoding: utf8mb4 | |
cd redmine | |
gem install bundler | |
bundle install --without development test postgresql sqlite --path vendor/bundle | |
bundle exec rake generate_secret_token | |
RAILS_ENV=production bundle exec rake db:migrate | |
RAILS_ENV=production REDMINE_LANG=en bundle exec rake redmine:load_default_data | |
# bundle exec rails server webrick -e production |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment