Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
PHANTOM_JS="phantomjs-1.9.8-linux-x86_64"
if [[ $EUID -ne 0 ]]; then
echo "You must be a root user" 2>&1
exit 1
else
apt-get update
apt-get install -y build-essential chrpath libssl-dev libxft-dev
apt-get install -y libfreetype6 libfreetype6-dev
apt-get install -y libfontconfig1 libfontconfig1-dev
cd ~
wget https://bitbucket.org/ariya/phantomjs/downloads/$PHANTOM_JS.tar.bz2
mv $PHANTOM_JS.tar.bz2 /usr/local/share/
cd /usr/local/share/
tar xvjf $PHANTOM_JS.tar.bz2
ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/share/phantomjs
ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin/phantomjs
ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/bin/phantomjs
rm -fr $PHANTOM_JS.tar.bz2
fi
@talpa

This comment has been minimized.

Copy link
Owner Author

commented Jan 4, 2015

install phantomjs bash skript

@askz

This comment has been minimized.

Copy link

commented Jan 5, 2015

awsome!!!!! thanks

@dhilditch

This comment has been minimized.

Copy link

commented Jan 7, 2015

Perfect - would be nice if there was a simple apt-get for phantomjs but this will do nicely in the meantime, worked perfectly for me.

@ishe-ua

This comment has been minimized.

Copy link

commented Jan 10, 2015

perfect, thanks too!!

@metalaureate

This comment has been minimized.

Copy link

commented Jan 21, 2015

+1 thank you

@ghost

This comment has been minimized.

Copy link

commented Feb 13, 2015

Perfect!

@pankajclabs

This comment has been minimized.

Copy link

commented Feb 27, 2015

phantomjs --version

getting this:

Fontconfig warning: ignoring UTF-8: not a valid region tag
1.9.8

@moyeen52

This comment has been minimized.

Copy link

commented Apr 10, 2015

Keep it up bro. That's really nice

@loretoparisi

This comment has been minimized.

Copy link

commented Apr 5, 2016

Latest version is phantomjs-2.1.1-linux-i686.tar.bz2.

@NbR404

This comment has been minimized.

Copy link

commented Dec 10, 2016

Thank You!!! Great

@StevenFlecha

This comment has been minimized.

Copy link

commented Dec 12, 2016

not working for me it says:
ln: accessing /usr/local/bin/phantomjs': Not a directory ln: accessing /usr/bin/phantomjs': Not a directory

Debian 7 with phantomjs-2.1.1-linux-i686.tar.bz2

@malayka66

This comment has been minimized.

Copy link

commented Dec 15, 2016

very useful ! thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.