15d6183f7f
are necessary to make the package work and avoid any confusion on the part of the user. More changes for this package forthcoming.
93 lines
2.4 KiB
Text
93 lines
2.4 KiB
Text
===========================================================================
|
|
$NetBSD: MESSAGE,v 1.4 2015/04/26 14:50:28 rodent Exp $
|
|
|
|
To use Redmine with nginx, you will need to perform the following steps.
|
|
|
|
1. If you want to use with MySQL server (by default),
|
|
install databases/mysql55-* and enable it, then create database.
|
|
|
|
2. Install nginx httpd server, www/nginx.
|
|
|
|
3. Setup Redmine database.
|
|
|
|
$ mysql -u root -p
|
|
> create database redmine character set utf8;
|
|
> create database redmine_development character set utf8;
|
|
> create user 'redmine'@'localhost' identified by 'redmine_password';
|
|
> grant all privileges on redmine.* to 'redmine'@'localhost';
|
|
> grant all privileges on redmine_development.* to 'redmine'@'localhost';
|
|
|
|
4. Write authentication information to
|
|
${PREFIX}/share/redmine/app/config/database.yml .
|
|
$ vi ${PREFIX}/share/redmine/app/config/database.yml .
|
|
production:
|
|
adapter: mysql2
|
|
database: redmine
|
|
host: localhost
|
|
username: redmine
|
|
password: "redmine_password"
|
|
encoding: utf8
|
|
development:
|
|
adapter: mysql2
|
|
database: redmine_development
|
|
host: localhost
|
|
username: redmine
|
|
password: "redmine_password"
|
|
encoding: utf8
|
|
|
|
5. Create secret token and write to
|
|
${PREFIX}/share/redmine/app/config/configuration.yml .
|
|
|
|
# cd ${PREFIX}/share/redmine/app
|
|
# GEM_HOME=${PREFIX}/share/redmine/gems \
|
|
GEM_PATH=${PREFIX}/share/redmine/gems \
|
|
${PREFIX}/bin/rake22 secret
|
|
|
|
# vi config/configuration.yml
|
|
[...]
|
|
secret_token: YOUR_SECRET_KEY
|
|
[...]
|
|
|
|
6. Import some data to Redmine database, and select your locale.
|
|
|
|
# cd ${PREFIX}/share/redmine/app
|
|
# GEM_HOME=${PREFIX}/share/redmine/gems \
|
|
GEM_PATH=${PREFIX}/share/redmine/gems \
|
|
${PREFIX}/bin/rake22 db:migrate
|
|
|
|
6. Setup nginx.
|
|
|
|
# vi ${PREFIX}/etc/nginx/nginx.conf
|
|
http {
|
|
upstream unicorn_redmine {
|
|
server unix:${PREFIX}/share/redmine/unicorn.redmine.sock fail_timeout=0;
|
|
}
|
|
server {
|
|
listen 80;
|
|
server_name localhost;
|
|
|
|
root ${PREFIX}/share/redmine/app;
|
|
|
|
try_files $uri @unicorn_redmine;
|
|
|
|
location @unicorn_redmine {
|
|
proxy_set_header Host $http_host;
|
|
proxy_pass http://unicorn_redmine;
|
|
}
|
|
|
|
error_page 500 502 503 504 /50x.html;
|
|
location = /50x.html {
|
|
root share/examples/nginx/html;
|
|
}
|
|
}
|
|
|
|
7. Start Redmine with Unicorn.
|
|
|
|
# ${RCD_SCRIPTS_DIR}/redmine_unicorn start
|
|
|
|
8. Start nginx.
|
|
|
|
# ${RCD_SCRIPTS_DIR}/nginx start
|
|
|
|
9. Access Redmine with username: admin and password: admin.
|
|
===========================================================================
|