Last active
December 27, 2015 20:28
-
-
Save masayuki5160/7384405 to your computer and use it in GitHub Desktop.
AWS で FuelPHPうごかしてみたときのメモ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
【環境】 | |
AWS EC2 | |
【事前準備てきな】 | |
・GitHubにリポジトリ作成 | |
・EC2上でキー作成 | |
$ ssh-keygen -t rsa -C "github-hoge" | |
・作成した公開キーをGithubに登録しとく(あとでらくちん) | |
・EC2の環境整える | |
PHPなどインストールしたり | |
sudo yum update | |
sudo yum -y install httpd php mysql | |
gitのインストール | |
sudo yum install git | |
Fuelの用意 | |
sudo curl get.fuelphp.com/oil |sh | |
/etc/php.iniにtimezoneの設定を追記。 | |
※これをやっとかないとoilコマンドを使用したときにエラーがでます。 | |
date.timezone = "Asia/Tokyo" | |
【作業手順】 | |
・oilコマンドでもろもろ準備 | |
sudo oil create masayuki | |
原因はよくわからんけど下記フォルダが原因でgit addできなかったので削除(おそらくアプリに影響はないはず。。) | |
sudo rm -r $(grep -rl "modules/fuel" *) | |
sudo rm -rf masayuki/docs/ | |
確認 | |
grep -r ".git/modules" * | |
gitの初期化(これももうちょっとうまくやる方法あるんだろうけど、しらべてない。。) | |
sudo rm -rf .git | |
sudo rm -rf .gitignore | |
sudo git status | |
gt初期化 | |
sudo git init | |
sudo git add . | |
sudo git commit -m "first commit" | |
sudo git remote add origin [email protected]:masayuki5160/hogehoge.git | |
sudo git push -u origin master | |
timezoneの設定を修正 | |
vim fuel/app/config/config.php | |
90 /** | |
91 * DateTime settings | |
92 * | |
93 * server_gmt_offset in seconds the server offset from gmt timestamp when time() is used | |
94 * default_timezone optional, if you want to change the server's default timezone | |
95 */ | |
96 'server_gmt_offset' => 0,//ココ | |
97 'default_timezone' => 'Asia/Tokyo',//ココ | |
98 | |
【アクセス】 | |
http://AWSのドメイン/作成したアプリ名/public/index.php/welcome/ | |
【参考】 | |
http://okochang.blogspot.jp/2010/12/githubpushssh.html | |
http://to-developer.com/blog/?p=395 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment