How to Install PhantomJS in cPanel / WHM Server

Here is what i did to install PhantomJS in cPanel / WHM 🙂

First, create a directory.

cd /
mkdir phantomjs
cd phantomjs

Second, run these commands.

sudo yum -y install gcc gcc-c++ make flex bison gperf ruby \
  openssl-devel freetype-devel fontconfig-devel libicu-devel sqlite-devel \
  libpng-devel libjpeg-devel

wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2

tar -xjf phantomjs-2.1.1-linux-x86_64.tar.bz2

ln -s /kitchen/phantomjs/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/bin/phantomjs

Last, test if phantomjs is successfully installed.

phantomjs -v

Join the Conversation

1 Comment

Leave a comment

Your email address will not be published. Required fields are marked *