SilverStripeインストールメモ(2)


SilverStripeのバージョンは2.4。
サーバーOSは、Ubuntuサーバー版9.10。
Webサーバーは、Apache 2.2.12。


今回は、
MySQLのデータベース作成と、
インストールページのDatabese(Step: 2 of 5)設定部分のまとめ。


MySQLのデータベースの作成は、SilverStripeのインストール開始前にやっておく。
まずはそこから。


MySQLのバージョンは、5.1.37-1ubuntu5.1 。


1. SSHでサーバーに接続し、MySQLにrootでログインする。
$ mysql -u root -p
Enter password: (パスワード入力)


(以下が表示される)
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 43
Server version: 5.1.37-1ubuntu5.1 (Ubuntu)


Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


mysql>



2. デフォルトの状態で、データベースを確認。
mysql> show databases;


(以下が表示された。)

                                          • +
Database
                                          • +
information_schema
mysql
                                          • +


3. SilverStripe用のデータベースを作成。


こちらを参照:
MySQLのユーザ管理


mysql> CREATE DATABASE (データベースの名前);
(「.」は名前に使えない。)


(以下が表示された。)
Query OK, 1 row affected (0.05 sec)


4. 手順3で作成したデータベースの管理ユーザーを作成。
mysql> GRANT ALL PRIVILEGES ON (データベース名).*
-> TO (ユーザー名)
-> IDENTIFIED BY '(パスワード)';


(以下が表示された。)
Query OK, 0 rows affected (0.00 sec)


5. ユーザーを追加したら、最後にユーザーテーブルをリフレッシュする。
mysql> FLUSH PRIVILEGES;


(以下が表示された。)
Query OK, 0 rows affected (0.11 sec)


6. ユーザーを確認する。
mysql> SELECT host,user FROM mysql.user;


手順4で作ったユーザー名が表示されていればOK。


7. 一度ログアウトし、手順4で作成したユーザーでログインする。
mysql> \q
(以下が表示された。)
Bye


$ mysql - u (手順4のユーザー名) -p
Enter password: (手順4のユーザーのパスワード)


(以下が表示された。)
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 48
Server version: 5.1.37-1ubuntu5.1 (Ubuntu)


Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


8. データベースを確認する。
mysql> show databases;


(以下が表示された。)

                                                      • +
Database
                                                      • +
information_schema
(手順3で作成したデータベース)
                                                      • +


ここまででデータベースの作成は終了。


続いて、SilverStripeのインストール画面のDatabese(Step: 2 of 5)設定の部分から。


9. MySQL 4.1+ラジオが選択されているのを確認(初期設定まま)。


10. Database server:
 localhost
 (初期設定のまま)


11. Database username:
 root
 ↓
 (手順4のユーザー名)


12. Database password:
 (手順4のユーザーのパスワード)


13. Database name:
 SS_mysite
 ↓
 (手順3のデータベース名)


14. 「Re-check requirements」ボタンをクリック。


エラーが消えればOK。