Skip to content

Instantly share code, notes, and snippets.

@sintret
Created May 4, 2018 04:23
Show Gist options
  • Save sintret/4fa56a65bd2b0d66bb2aaa392e1fa7fa to your computer and use it in GitHub Desktop.
Save sintret/4fa56a65bd2b0d66bb2aaa392e1fa7fa to your computer and use it in GitHub Desktop.
install phantomjs in aws ec2
# download and unpack distribution
sudo wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
sudo mkdir /opt/phantomjs
bzip2 -d phantomjs-2.1.1-linux-x86_64.tar.bz2
sudo tar -xvf phantomjs-1.9.8-linux-x86_64.tar --directory /opt/phantomjs/ --strip-components 1
sudo ln -s /opt/phantomjs/bin/phantomjs /usr/bin/phantomjs
#try phantomjs
phantomjs /opt/phantomjs/examples/hello.js
@thomkenn
Copy link

hey you need to change

sudo tar -xvf phantomjs-1.9.8-linux-x86_64.tar --directory /opt/phantomjs/ --strip-components 1

to

sudo tar -xvf phantomjs-2.1.1-linux-x86_64.tar --directory /opt/phantomjs/ --strip-components 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment