The project homepage for PhantomJS can be found here: http://phantomjs.org/
In this post we will show you how to download and install this package onto a Linux / CentOS machine. Most of the time this code would be included as a source code library within your websites code package. However there may be times that this code should be installed at the server level.
For this post we will use the 64Bit version of the code and download it from BitBucket. We will also use the 1.9.8 version of the software. Newer versions may be available so be sure to check the projects download pages.
# Install in the /usr/bin directory cd /usr/bin # Get the package from BitBucket wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2 # Un Zip it tar jxf phantomjs-1.9.8-linux-x86_64.tar.bz2 # Create a handy link to the installed version ln -s phantomjs-1.9.8-linux-x86_64/bin phantomjs # All done for now...
Well, that’s about it. The script is pretty straight forward. Let us know how you are using PhantomJS in your projects.