version : BETA3 (正式リリース後, 改変の可能性あり)
2011年6月4日のSymfony2勉強会に向けて, Symfony2 standard ディストリビューションのインストールを行ったので, そのメモを。
ちなみに OS は Mac OS X 10.6 です。
とりあえずgitとAPCのインストール
① まず, homebrewをインストールします
ruby -e "$(curl -fsSL https://gist.github.com/raw/323731/install_homebrew.rb)"
② git のインストール
brew install git
③ homebrewのアップデート
brew update を行うのだが, このコマンドでエラーが生じて途中で止まってしまったため, 以下を実行
$ cd /usr/local/
$ git remote add origin git://github.com/mxcl/homebrew.git
$ git fetch origin
$ git reset --hard origin/master
$ git remote add origin git://github.com/mxcl/homebrew.git
$ git fetch origin
$ git reset --hard origin/master
そして, homebrewをアプデ!! (ちなみに, ② のgitインストールは, ここで必要っぽい)
brew update
④ Symfony2でAPC(Alternative PHP Cache) があるとよいので, APCをインストール
brew install apc
ちなみに, この時の出力は以下 (青字の部分は, あとでphp.iniの最後に追記すること)
To finish installing APC:
* Add the following lines to php.ini:
[apc]
extension="/usr/local/Cellar/apc/3.1.6/apc.so"
apc.enabled=1
apc.shm_segments=1
apc.shm_size=64M
apc.ttl=7200
apc.user_ttl=7200
apc.num_files_hint=1024
apc.mmap_file_mask=/tmp/apc.XXXXXX
apc.enable_cli=1
* Restart your webserver
* Copy "/usr/local/Cellar/apc/3.1.6/apc.php" to any site to see APC's usage.
==> Summary
/usr/local/Cellar/apc/3.1.6: 2 files, 204K, built in 17 seconds
* Add the following lines to php.ini:
[apc]
extension="/usr/local/Cellar/apc/3.1.6/apc.so"
apc.enabled=1
apc.shm_segments=1
apc.shm_size=64M
apc.ttl=7200
apc.user_ttl=7200
apc.num_files_hint=1024
apc.mmap_file_mask=/tmp/apc.XXXXXX
apc.enable_cli=1
* Restart your webserver
* Copy "/usr/local/Cellar/apc/3.1.6/apc.php" to any site to see APC's usage.
==> Summary
/usr/local/Cellar/apc/3.1.6: 2 files, 204K, built in 17 seconds
⑤ 次にとうとうSymfony2をダウンロード!
symfony sandbox というものがあるらしく , git で 入れても良いのだが, Symfony2 standard ディストリビューション ということで, ちょっとよくわからなかった。ただ、勉強会ではSymfony2(Standard Edition)のインストール方法 等を学ぶということで, とりあえず http://symfony.com/download からダウンロードしたものを使用した。
まぁ, これを展開するだけです。
⑥ app/check.php にアクセスし, 正しくインストールされているか確認
例として, 以下のような感じです。
⑦ インストールできていれば, web/ ディレクトリをDocumentRootにする。
これは apache の方の設定ですね。
⑧ .....ということだけど, intlが無いって言われてしまったので, intlモジュール入れました!
brew install icu4c
php-5.3.6 をダウンロードし, その中の ext/intlに移動し以下のコマンドを実行
phpize
./configure --enable-intl --with-icu-dir=/usr/local/Cellar/icu4c/4.4.1
make
make test
sudo make install.
./configure --enable-intl --with-icu-dir=/usr/local/Cellar/icu4c/4.4.1
make
make test
sudo make install.
php.ini に, extension=intl.so を追記し, apache再起動
これでOKかな?大変だった〜。
参考にさせて頂いたサイトは以下
・ Symfony2勉強会向けのセットアップ準備(Mac向け)
・ Homebrewのupdateでエラー
0 コメント:
コメントを投稿