Step 1 – Prerequsities
First, of all, you need to install the required packages needed by PhantomJS to work correctly. RedHat 8 & Fedora Users CentOS 7/6 Users:
Step 2 – Install FantomJS
Now download the latest FantomJS from its official website. After downloading the archive file, just extract this to the desired system location. You don’t need to install this. Now simply create a soft link phantomjs binary file to systems bin dirctory as below: pre> sudo ln -sf /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin
Step 3 – Verify FantomJS Version
After completing installation, let’s verify the installed version of phantomjs. You can also find the version details from PhantomJS prompt. To get PhantomJS prompt type “phantomjs” on shell prompt and you will get the prompt. Now type phantom.version to get version details.