1. composer をインストール
| 1 | sudo apt install composer | 
2. composer.jsonを作成
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | {     "config": {         "bin-dir": "bin"      },     "scripts": {         "post-install-cmd": [             "PhantomInstaller\\Installer::installPhantomJS"          ],         "post-update-cmd": [             "PhantomInstaller\\Installer::installPhantomJS"          ]     },     "require": {         "jonnyw/php-phantomjs": "4.*"      } }   | 
3. composer でインストール
| 1 |  composer require "jonnyw/php-phantomjs:4.*" | 
4. bin/phantomjsの展開
phantomjsをダウンロードして、展開します。
| 1 2 | wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 tar jxfv phantomjs-2.1.1-linux-x86_64.tar.bz2 | 
bin/phantomjsにパスを通しておくか、パスの通ったディレクトリに移動
 
  
  
  
  
