CMS - NetCommons - 概要・ダウンロード・インストール
- 1. 概要
- 2. インストール要件
- 3. ダウンロード
- 4. コンテンツの配置
- 5. index.php 修正
- 6. apache 構成ファイル作成
1. 概要
OpenPNE のインストールに失敗したので、いささか打ちひしがれております。
NetCommons も以前はインストールに成功していたのですが、どうなっちゃうんだろう。
NetCommons については「ウィキペディア - NetCommons」をご参照ください。
本家のサイトが下記になります。
「NetCommons 公式サイト」
2. インストール要件
公式サイトの説明によれば、NetCommons3 のインストール要件は下記になります(2018年7月24日)。
サーバ等 | モジュール | バージョン | 備考 |
ウエブサーバ | Apache | 不明 | mod_rewrite が必須とのこと |
データベース | MySQL | 5.5 以上 | |
処理言語 | PHP | 5.4 以上 | |
いずれも十分、新しいものを持っていますが、新しいモジュールであるためにエラーになる可能性もあるのでいささか不安です。
3. ダウンロード
以下のサイトよりダウンロードします。
「NetCommons3 ダウンロード」
2018年7月24日時点で入手可能な最新版は 3.1.9 でした。
4. コンテンツの配置
ダウンロードした NetCommons-3.1.9.zip をサーバーの適切な位置に配置して解凍します。
unzip NetCommons-3.1.9.zip
「NetCommons」のルートを
/usr/local/www/ntcm
として
http://ドメイン/ntcm
でアクセスするものとします。
解凍したディレクトリ配下をルートへ移動して、パーミッションを変更します。
mv NetCommons3 /usr/local/www/ntcm
cd /usr/local/www/
chown -R www:www ntcm
5. index.php 修正
「CentOS」ではまともに起動できるようですが・・・。
「FreeBSD」と「XAMPP」では同じような現象で、このままでは起動できません。
本家の「NetCommons3 のインストールについて」と題するサイトに現象と対策が書いてありますが、2016年07月15日に発生していた現象に対して、何ら対策は打たれていないようです。
(参考サイトを掲載していましたが、リンク切れになりました)
初期起動画面を表示しようとするとウェブサーバのエラーログに
[Tue Jul 24 16:11:29.521079 2018] [php7:notice] [pid 92888] [client 172.20.10.2:57349] PHP Notice: Constant CAKE_CORE_INCLUDE_PATH already defined in /パス/ntcm/app/webroot/index.php on line 63
[Tue Jul 24 16:11:29.521673 2018] [php7:warn] [pid 92888] [client 172.20.10.2:57349] PHP Warning: include(/パス/ntcm/lib/Cake/bootstrap.php): failed to open stream: No such file or directory in /パス/ntcm/app/webroot/index.php on lin
e 93
[Tue Jul 24 16:11:29.521786 2018] [php7:warn] [pid 92888] [client 172.20.10.2:57349] PHP Warning: include(): Failed opening '/パス/ntcm/lib/Cake/bootstrap.php' for inclusion (include_path='.:/usr/local/share/pear') in /パス/ntcm/app/webroot/index.php on line 93
[Tue Jul 24 16:11:29.521902 2018] [php7:error] [pid 92888] [client 172.20.10.2:57349] PHP Fatal error: CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing you
r /cake core directory and your /vendors root directory. in /パス/ntcm/app/webroot/index.php on line 98
と出力されて、ブラウザには真っ白な画面が表示されます。
対策として、ルートの index.php を修正します。
if (!defined('CAKE_CORE_INCLUDE_PATH')) {
define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'lib');
}
の部分を以下のように書き換えます。
if (!defined('CAKE_CORE_INCLUDE_PATH')) {
define('CAKE_CORE_INCLUDE_PATH', ROOT . DS .'vendors'. DS .'cakephp'. DS .'cakephp'. DS . 'lib');
}
6. apache 構成ファイル作成
/usr/local/etc/apache24/ntcm.conf
を作成して下記のように記述します。
Alias /ntcm/ "/usr/local/www/ntcm/"
<Directory "/usr/local/www/ntcm/">
Options None
AllowOverride None
Require all granted
</Directory>
apache を再起動します。
service apache24 configtest
service apache24 restart
|
|