2008/07/01 17:33
tar zxvf cake_x.x.xx.xxxx.tar.gz解凍されたファイルを設置する。(設置場所はセキュリティを考慮する為に後々考える。今は開発環境なので解凍されたフォルダをDocumentRootとする。)
vi /etc/httpd/conf/httpd.conf今回は、ドキュメントルートに設置してあるのでルートのディレクティブを変更する。変更箇所は以下の部分。
</Directory (DocumentRoot)>
AllowOverride All
Options Indexes FollowSymLinks
Order allow,deny
Allow from all
</Directory>
変更後はApacheの再起動。
/sbin/service httpd restart
chown -R apache (DocumentRoot)/app/tmp
vi (DocumentRoot)/.htaccessRewriteEngine onの直下に以下を追加。
RewriteBase /UserDirで公開時には、
RewriteBase /~(UserName)2つ目。
vi (DocumentRoot)/app/.htaccessRewriteEngine onの直下に以下を追加。
RewriteBase /appUserDirで公開時には、
RewriteBase /~(UserName)/app3つ目。
vi (DocumentRoot)/app/webroot/.htaccessRewriteEngine onの直下に以下を追加。
RewriteBase /app/webrootUserDirで公開時には、
RewriteBase /~(UserName)/app/webroot
cp (DocumentRoot)/app/config/database.php.default (DocumentRoot)/app/config/database.php vi (DocumentRoot)/app/config/database.phpdatabase.phpの最下部に、
var $default = array(
'driver' => 'mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'user',
'password' => 'password',
'database' => 'database_name',
'prefix' => '',
);
var $test = array(
'driver' => 'mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'user',
'password' => 'password',
'database' => 'test_database_name',
'prefix' => '',
);
という部分があるので、以下の様に書き換える。文字エンコーディングの指定を忘れない様に。
var $default = array(
'driver' => 'mysql',
'persistent' => false,
'host' => 'localhost',
'login' => '(任意のユーザ名)',
'password' => '(任意のパスワード)',
'database' => '(任意のデータベース名)',
'prefix' => '',
'encoding' => 'utf8'
);
vi (DocumentRoot)/app/config/core.phpデフォルトで記述されている文字列を任意の文字列に変更する。
Configure::write('Security.salt', '(任意の文字列)');
関連記事