照 ArchWiki Redmine 敘述安裝
- Ruby - rvm (gemset ruby 2.2.0)
- Database - MariaDB
- Webserver - Apache
Ruby (RVM)
>>> rvm use 2.2.0
>>> rvm gemset create redmine
>>> gem evn
>>> rvm use 2.2.0@redmine
MariaDB setting
>>>> mysql -u root -p
CREATE DATABASE redmine CHARACTER SET UTF8;
CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'redmine_say_hello';
GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';
#MariaDB [(none)]> CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'redmine_say_hello';
>>> cd /usr/share/webapps/redmine/config
>>> vi database.yml
production:
adapter: mysql2
database: redmine
host: localhost
username: redmine
password: "redmine_say_hello"
encoding: utf8
configure apache to use passenger
>>> echo "Include conf/extra/httpd-rails.conf" >> /etc/httpd/conf/httpd.conf
>>> cd /etc/httpd/conf/extra
>>> sudo touch httpd-rails.conf
>>> sudo cat > httpd-rails.conf <<EOF
LoadModule passenger_module /usr/local/rvm/gems/ruby-2.2.0@redmine/gems/passenger-5.0.4/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
PassengerRoot /usr/local/rvm/gems/ruby-2.2.0@redmine/gems/passenger-5.0.4
PassengerDefaultRuby /usr/local/rvm/gems/ruby-2.2.0@redmine/wrappers/ruby
</IfModule>
<VirtualHost \*:80>
ServerName www.yourhost.com
# !!! Be sure to point DocumentRoot to 'public'!
DocumentRoot /somewhere/public
<Directory /somewhere/public>
# This relaxes Apache security settings.
AllowOverride all
# MultiViews must be turned off.
Options -MultiViews
# Uncomment this if you're on Apache >= 2.4:
#Require all granted
</Directory>
</VirtualHost>
EOF
>>> sudo systemctl restart httpd
redmine admin 無法設定帳號
看 log (如果是用 apache )
>>> tail -f /var/log/httpd error_log
>>> chmod 777 /srv/www/appname/tmp/cache
設定 email (與 Gmail 搭配)
config/configuration.yml (Redmine Email Configuration)
>>> vi /srv/http/rails/redmine/config/configuration.yml
production:
email_delivery:
delivery_method: :smtp
smtp_settings:
enable_starttls_auto: true
address: "smtp.gmail.com"
port: '587'
domain: "smtp.gmail.com"
authentication: :plain
user_name: "test@gmail.com"
password: "test"