サーバー上で Joomla! を動作させるには、まずは Joomla! が動作できる環境を整えてやる必要があります。 クラウド上のサーバーは CentOS です。Joomla! が動作するには、Webサーバー、PHP、MySQL が必要ですので、それらをインストールします。その辺については別のサイトで詳しく書かれていますので、そちらを参考にしてください。PHPのインストールはWebサーバー構築の中に含まれています。
≫Webサーバー構築(Apache) - CentOSで自宅サーバー構築
≫データベースサーバー構築(MySQL) - CentOSで自宅サーバー構築
これらのインストールを終えたら、次は Joomla! 用にデータベースを準備します。
php-mysql のインストール
Joomla! は PHPベースの CMSです。PHP を通して MySQL データベースにアクセスするために、php-mysql パッケージをインストールします。まずは既にインストールされているかどうかの確認です。
[root@host ~]# rpm -q php-mysql |
インストールされていなければ、以下のコマンドを入力して php-mysql をインストールします。
[root@host ~]# rpm -y install php-mysql |
MySQLデータベースの設定
MySQL データベースに、Joomla!用のデータベースを作成し、さらにそのデータベースに Joomla! がアクセスする権限を与えます。
[root@host ~]# mysql -u root -p Enter password: (パスワードを入力) Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is NNNNN Server version: 5.5.x Source distribution Copyright (c) 2000, 2012, 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 buffer. mysql> create database joomla; Query OK, 1 row affected (0.00 sec) mysql> grant all privileges on joomla.* to joomla@localhost identified by 'password'; Query OK, 1 row affected (0.00 sec) mysql> quit Bye |
これで Joomla! を動作させるための環境ができあがりました。