ということで、先にpostgresの設定
1) パッケージのインストール
apt-get install postgresql
2) DBの初期設定
postgresユーザができているので、パスワードを設定しsu -、psqlでひとまずdbにログインできたらOK。
psql -lを打ってみると
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+----------+----------+-------------+-------------+-----------------------
postgres | postgres | UTF8 | ja_JP.UTF-8 | ja_JP.UTF-8 |
template0 | postgres | UTF8 | ja_JP.UTF-8 | ja_JP.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | ja_JP.UTF-8 | ja_JP.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
(3 rows)
という状態だった。
再度psqlでログインして、以下の設定を行う。
CREATE ROLE redmine LOGIN ENCRYPTED PASSWORD 'my_password' NOINHERIT VALID UNTIL 'infinity';
※'my_password' は適宜変更しないとねっ。間違ってそのまま打っちゃったよw そんな時はalterで変更だねっ^^;
CREATE DATABASE redmine WITH ENCODING='UTF8' OWNER=redmine;
psql -lを打ってみると
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+----------+----------+-------------+-------------+-----------------------
postgres | postgres | UTF8 | ja_JP.UTF-8 | ja_JP.UTF-8 |
redmine | redmine | UTF8 | ja_JP.UTF-8 | ja_JP.UTF-8 |
template0 | postgres | UTF8 | ja_JP.UTF-8 | ja_JP.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | ja_JP.UTF-8 | ja_JP.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
(4 rows)
できてるできてる。
/var/lib/redmine/configに移動して、configuration.yml.exampleをもとに、configuration.yml作成。
例ではipaフォントを指定していたので、私もIPAフォントをwgetで落として/usr/share/fontsに解凍して設定。
3) database.ymlの設定
以下のように設定
production:
adapter: postgresql
database: redmine
host: localhost
username: redmine
password: "ひみつ"
encoding: utf8
schema_search_path: public
1) パッケージのインストール
apt-get install postgresql
2) DBの初期設定
postgresユーザができているので、パスワードを設定しsu -、psqlでひとまずdbにログインできたらOK。
psql -lを打ってみると
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+----------+----------+-------------+-------------+-----------------------
postgres | postgres | UTF8 | ja_JP.UTF-8 | ja_JP.UTF-8 |
template0 | postgres | UTF8 | ja_JP.UTF-8 | ja_JP.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | ja_JP.UTF-8 | ja_JP.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
(3 rows)
という状態だった。
再度psqlでログインして、以下の設定を行う。
CREATE ROLE redmine LOGIN ENCRYPTED PASSWORD 'my_password' NOINHERIT VALID UNTIL 'infinity';
※'my_password' は適宜変更しないとねっ。間違ってそのまま打っちゃったよw そんな時はalterで変更だねっ^^;
CREATE DATABASE redmine WITH ENCODING='UTF8' OWNER=redmine;
psql -lを打ってみると
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+----------+----------+-------------+-------------+-----------------------
postgres | postgres | UTF8 | ja_JP.UTF-8 | ja_JP.UTF-8 |
redmine | redmine | UTF8 | ja_JP.UTF-8 | ja_JP.UTF-8 |
template0 | postgres | UTF8 | ja_JP.UTF-8 | ja_JP.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | ja_JP.UTF-8 | ja_JP.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
(4 rows)
できてるできてる。
/var/lib/redmine/configに移動して、configuration.yml.exampleをもとに、configuration.yml作成。
例ではipaフォントを指定していたので、私もIPAフォントをwgetで落として/usr/share/fontsに解凍して設定。
3) database.ymlの設定
以下のように設定
production:
adapter: postgresql
database: redmine
host: localhost
username: redmine
password: "ひみつ"
encoding: utf8
schema_search_path: public