2012年5月25日金曜日

OS X LionにbrewでAPCをインストールした

まずはFormulaを検索

$ brew search apc
josegonzalez/php/php53-apc  josegonzalez/php/php54-apc

2つありました。 phpはv5.3.10なのでphp53-apcをインストールします。

リポジトリを追加

$ brew tap josegonzalez/php
Cloning into '/usr/local/Library/Taps/josegonzalez-php'...
remote: Counting objects: 1011, done.
remote: Compressing objects: 100% (491/491), done.
remote: Total 1011 (delta 480), reused 929 (delta 416)
Receiving objects: 100% (1011/1011), 140.43 KiB | 109 KiB/s, done.
Resolving deltas: 100% (480/480), done.
Tapped 48 formula

インストール実行

$ brew install php53-apc
......
To finish installing php53-apc:
  * Add the following lines to /usr/local/etc/php.ini:
    [apc]
    extension="/usr/local/Cellar/php53-apc/3.1.10/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.
  * Write a PHP page that calls "phpinfo();"
  * Load it in a browser and look for the info on the apc module.
  * If you see it, you have been successful!
  * You can copy "/usr/local/Cellar/php53-apc/3.1.10/apc.php" to any site to see APC's usage.
......

指示通りphp.iniに設定を追加して、php-fpmを再起動 (これがいまいちまだよくわかってない…)

$ ps ax | grep php
  493   ??  Ss     0:00.17 /usr/local/Cellar/php/5.3.10/sbin/php-fpm
  494   ??  S      0:01.15 /usr/local/Cellar/php/5.3.10/sbin/php-fpm
  495   ??  S      0:01.37 /usr/local/Cellar/php/5.3.10/sbin/php-fpm
$ kill -TERM 493
$ php-fpm

↑とりあえずkillしてから実行してみてる phpinfo()で確認OK!

1 件のコメント:

  1. casino with slots machines - Dr.MCD
    Casino With Slots Machines. The first casino in Michigan, 삼척 출장샵 Casino With 김제 출장마사지 Slots Machines has a 안성 출장샵 more traditional gameplay 서귀포 출장샵 than other land based casinos. 부천 출장마사지 In this

    返信削除