summaryrefslogtreecommitdiff
path: root/devel/ruby-redmine/MESSAGE
blob: 9b2972917b672be75e70ed219c4d4082dac6c700 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
===========================================================================
$NetBSD: MESSAGE,v 1.2 2015/08/13 12:22:13 ryoon Exp $

To use Redmine with nginx, you will need to perform the following steps.

0. Fix some of the Redmine gems (this step will be removed eventually):

	# redmine_fix_gems${RUBY_SUFFIX}.sh

1. If you want to use with MySQL server (by default), install
   databases/mysql5[1|5|6]-* and enable it. Then, create the 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}/${RM_DIR}/app/config/database.yml:
	# vi ${PREFIX}/${RM_DIR}/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}/${RM_DIR}/app/config/configuration.yml and secrets.yml

	# redmine_generate_secret${RUBY_SUFFIX}.sh
	# vi config/configuration.yml
	  [...]
	  secret_token: 'YOUR_SECRET_KEY'
	  [...]
	# vi config/secrets.yml
	  [...]
	  production:
	    secret_key_base: 'YOUR_SECRET_KEY'
	  [...]

6. Import some data to Redmine database, select your locale, and migrate the DB:

	# redmine_migrate_db${RUBY_SUFFIX}.sh

6. Setup nginx.

	# vi ${PREFIX}/etc/nginx/nginx.conf
	http {
	upstream unicorn_redmine {
		server unix:${PREFIX}/${RM_DIR}/unicorn.redmine.sock fail_timeout=0;
	}
	server {
	listen       80;
	server_name  localhost;

	root ${PREFIX}/${RM_DIR}/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${RUBY_SUFFIX} start

8. Start nginx.

	# ${RCD_SCRIPTS_DIR}/nginx start

9. Access Redmine with username: admin and password: admin.
===========================================================================