CMS - Drupal - ports でインストール - ウェブ定義・データベースの設定
- 1. 概要
- 2. ウェブ定義
- 3. データベースの設定
1. 概要
クイックスタートにはウェブの定義ファイルについては書いていませんでした。
データベースは他の CMS と同様、事前に準備しておくようです。
2. ウェブ定義
/usr/local/etc/apache24/Includes/drupal.conf
を作成して以下のように記述します(記述内容はインストール時のメッセージのままではまずいので注意)。
Alias /drupal "/usr/local/www/drupal/"
<Directory "/usr/local/www/drupal/">
Options Indexes FollowSymlinks MultiViews
AllowOverride All
Require all granted
</Directory>
3. データベースの設定
PostgreSQL 10 は EC-CUBE のときに懲りておりますので、MySQL を使用します。
文字コードを確認しておきます。
mysql> show variables like "chara%";
+--------------------------+----------------------------------+
| Variable_name | Value |
+--------------------------+----------------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/local/share/mysql/charsets/ |
+--------------------------+----------------------------------+
8 rows in set (0.05 sec)
mysql>
となっていれば大丈夫。
そうでない場合は
/usr/local/etc/mysql/my.cnf
を編集して
[mysqld] ← のセクション内に
・・・
character-set-server = utf8 ← この1行を追加しておきます。
service mysql-server restart
しておきます。
データベースとユーザを作成します。
仮に
データベース drbase
ユーザ druser
として
> mysql -u root -p
Enter password: ← root パスワードを入力
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.22-log Source distribution
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> create database drbase;
Query OK, 1 row affected (0.03 sec)
mysql> GRANT ALL PRIVILEGES ON drbase.* to druser@localhost IDENTIFIED BY 'パスワード';
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> Bye Ctrl+D で終了
|
|