FreezeJ' Blog

centos7安装redmine3.4

2020-04-20

centos7安装redmine3.4

系统版本

Linux centos7 3.10.0-1062.18.1.el7.x86_64 #1 SMP Tue Mar 17 23:49:17 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

安装步骤

systemctl stop firewalld  # 关闭防火墙
yum install mariadb-libs mariadb mariadb-devel mariadb-server ImageMagick-devel  ImageMagick ruby rubygems ruby-devel -y  # 安装所需包
wget https://www.redmine.org/releases/redmine-3.4.7.tar.gz  # 获取安装包
tar xf redmine-3.4.7.tar.gz -C  /usr/local/
cd /usr/local/redmine-3.4.7/config
cp configuration.yml.example  configuration.yml
cp database.yml.example database.yml
vim database.yml  # 配置数据库用户名密码



systemctl start mariadb  # 开启数据库

mysq插入数据

CREATE DATABASE redmine CHARACTER SET utf8mb4;
CREATE USER 'redmine'@'localhost' IDENTIFIED BY '123456';
GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';

RUBY

gem source -l  # 查看源
gem sources -a http://mirrors.aliyun.com/rubygems/  # 添加国内源
gem sources --remove  https://rubygems.org/  # 删除国外源
gem source -u  # 更新源
gem source -l  # 查看源

升级RUBY


# Install mpapis public key (might need `gpg2` and or `sudo`)
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3

# Download the installer
curl -O https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer
curl -O https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer.asc

# Verify the installer signature (might need `gpg2`), and if it validates...
gpg --verify rvm-installer.asc &&

# Run the installer
bash rvm-installer stable





rvm -v  # 查看rvm版本

rvm list known  # 查看Ruby版本
rvm install 2.5


gem install bundler  #Redmine使用Bundler来管理gems依赖项,需要先安装Bundler
bundle install --without development test  production  #安装Redmine所需的所有gem
bundle exec rake generate_secret_token  # 生成Rails使用的随机密钥,用于编码存储会话数据的cookie,从而防止其被篡改。
生成新的机密令牌会在重新启动后使所有现有会话无效。将此秘密存储在config/secrets.yml中
Tags: Linux