さくらのレンタルサーバでのfuelphpセットアップ手順
はじめに
さくらのレンタルサーバーでの話です。
新規の案件に入る前に必ずやる作業ですが近頃では面倒くさくなって直近の案件のフォルダごとコピーしていらない部分を削除していくっていうやり方やってました。
けどそれ続けていくと
・fuelphpのバージョンが過去のまま
・案件とは直接関係ないファイルが少しずつ増えていきそう
な気がしたのでこれからはちゃんとセットアップしようと思います。
流用案件とかではこっちのほうが早いとは思いますが。
マニュアルみてそのままやるだけなんですけど、、、自分用にメモ
ダウンロード
なにあともわれfuelphpをおとしてくる。上記のページから使用したいバージョンのurlをコピー
(ここでは「http://fuelphp.com/files/download/25」とする)
cd ~/www/docroot #ドキュメントルートへ移動して wget -O fuel.zip http://fuelphp.com/files/download/25 #ダウンロード unzip fuel.zip #解凍 今回はfuelphp-1.7という名前 mv fuelphp-1.7 example #プロジェクトに合わせてフォルダ名変更
アクセスしてみる
http://example.com/public/
上記にアクセスしてみると以下のエラーがでました、、、
Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, support@sakura.ad.jp and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log.
再度アクセスしてみる
Composer is not installed. Please run "php composer.phar update" in the root to install Composer
次は上記のメッセージがでてきます。これはfuelphpを最新にアップデートしてくださいと解釈します
php composer.phar update
書かれてある通りにコマンドを実行して再度アクセスすると無事にページが表示されました
to retrieve a token. It will be stored in "/home/***/.composer/auth.json" for future use by Composer. Token (hidden):
久々にやったら上記のようなエラーが出たのでその対応
https://github.com/settings/tokensこちらからtokenを作成してToken(hidden):に入力して解決しました
以上です