wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
Check the download url for new verion from Phantomjs site
tar -xvzf phantomjs-2.1.1-linux-x86_64.tar.bz2
Change the tar name if diff version is downloaded.
sudo cp -r phantomjs-2.1.1-linux-x86_64 /usr/share/
copy anywhere you want. I usually keep in usr/share.
sudo cp phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin
To check phantom is ready
phantomjs --version
wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-macosx.zip
Check the download url for new verion from Phantomjs site
unzip phantomjs-2.1.1-macosx
Change the zip name if diff version is downloaded.
sudo cp -r phantomjs-2.1.1-macosx /usr/share/
copy anywhere you want. I usually keep in usr/share.
sudo cp phantomjs-2.1.1-macosx/bin/phantomjs /usr/local/bin
To check phantom is ready
phantomjs --version