2008/03/07 17:09
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
chmod 777 (DocumentRoot)/app/tmp/cache/models
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',
'connect' => 'mysql_connect',
'host' => 'localhost',
'login' => 'user',
'password' => 'password',
'database' => 'project_name',
'prefix' => '');
という部分があるので、以下の様に書き換える。
var $default = array('driver' => 'mysql',
'connect' => 'mysql_connect',
'host' => 'localhost',
'login' => '(任意のユーザ名)',
'password' => '(任意のパスワード)',
'database' => '(任意のデータベース名)',
'prefix' => '');
関連記事