Ubuntu 20.04 安裝 RedMine 專案管理工具
伺服器系統是 Ubuntu 20.04,這裡以該系統為例記錄 RedMine 的安裝步驟及注意事項。
安裝 RVM 和 Ruby 2.8
RVM 的簡介和安裝步驟參考我寫的這篇部落格。
安裝 MySQL
已經安裝了 MariaDB 10.5:
$ mysql --version
mysql Ver 15.1 Distrib 10.5.6-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
建立資料庫和連線資訊:
MariaDB [(none)]> create database redmine default charset utf8mb4 default collate utf8mb4_unicode_ci; MariaDB [(none)]> grant all on redmine.* to 'redmine_user'@'localhost' identified by 'xxx';
安裝 Redmine
安裝依賴包:
$ sudo apt install libmysqlclient-dev imagemagick
下載最新版 Redmine 4.2.3(最新版本檢視):
$ wget https://www.redmine.org/releases/redmine-4.2.3.tar.gz
解壓縮到指定目錄並建立軟連結:
$ sudo tar xzvf redmine-4.2.3.tar.gz -C /opt/app
$ sudo ln -s /opt/app/redmine-4.2.3/ /opt/app/redmine
配置資料庫引數:
$ cd /opt/app/redmine/config $ sudo cp database.yml.example database.yml $ sudo vi database.yml
修改為正確的連線資訊,注意替換 my_password
為正確的密碼:
production:
adapter: mysql2
database: redmine
host: localhost
username: redmine_user
password: "my_password"
# Use "utf8" instead of "utfmb4" for MySQL prior to 5.7.7
encoding: utf8mb4
Redmine 使用 Bundler
管理 gems 依賴,因此要先安裝 Bundler
。安裝前先切換到 root 使用者:
$ sudo su
安裝 Bundler
:
# gem install bundler
使用 Bundler
安裝 Redmine
依賴:
# cd /opt/app/redmine
bundle config set --local without 'development test postgresql sqlite'
bundle install
設定金鑰:
bundle exec rake generate_secret_token
建立資料表:
bundle exec rake db:migrate RAILS_ENV=production
初始化資料表:
bundle exec rake redmine:load_default_data RAILS_ENV=production
使用 webrick
測試安裝:
bundle exec rails server webrick -e production
啟動成功之後,預設是監聽的 3000 埠,注意檢視伺服器防火牆是否開啟了 3000 埠的流量。訪問 http://ip:3000
即可開啟 Redmine,預設的使用者名稱和密碼,均是 admin,首次登入會要求修改密碼。
郵箱設定
TODO……
代理設定
TODO……
線上版體驗
我在伺服器上已經安裝好了 Redmine 4.2.3,有需要使用體驗的使用者聯絡我 yxz_blue#126.com
(# 替換為 @)。
參考連結
CentOS 7 安裝 Redmine 4.1 - Zhanming's blog
RedMine安裝教程(Redmine3.4.5) - 簡書
如何在Ubuntu 18.04上安裝和配置Redmine
RVM 實用指南 · Ruby China
RedmineInstall - Redmine
untrusted connection: Redmine, Passenger, and Nginx on Ubuntu 16.04
微信公眾號:PHP和Laravel學習