Skip to content

Instantly share code, notes, and snippets.

@xiris
Forked from julionc/00.howto_install_phantomjs.md
Created November 16, 2016 11:03
Show Gist options
  • Save xiris/06b5e452921000c0f0ede0747f7d6470 to your computer and use it in GitHub Desktop.
Save xiris/06b5e452921000c0f0ede0747f7d6470 to your computer and use it in GitHub Desktop.

Revisions

  1. @julionc julionc renamed this gist Mar 20, 2015. 1 changed file with 0 additions and 0 deletions.
  2. @julionc julionc revised this gist Mar 20, 2015. 2 changed files with 40 additions and 12 deletions.
    20 changes: 8 additions & 12 deletions phantomjs_install.md → 00.howto_instal_phantomjs.md
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,9 @@
    # How to install PhantomJS on Ubuntu

    Version: `1.9.7`
    Version: `1.9.8`

    Platform: `x86_64`


    First, install or update to the latest system software.

    sudo apt-get update
    @@ -19,18 +18,15 @@ Install these packages needed by PhantomJS to work correctly.
    Get it from the [PhantomJS website](http://phantomjs.org/).

    cd ~
    export PHANTOM_JS="phantomjs-1.9.7-linux-x86_64"
    export PHANTOM_JS="phantomjs-1.9.8-linux-x86_64"
    wget https://bitbucket.org/ariya/phantomjs/downloads/$PHANTOM_JS.tar.bz2
    sudo tar xvjf $PHANTOM_JS.tar.bz2

    Once downloaded, move compress file to `/usr/local/share/`, and create symlinks:
    Once downloaded, move Phantomjs folder to `/usr/local/share/` and create a symlink:

    sudo mv $PHANTOM_JS.tar.bz2 /usr/local/share/
    cd /usr/local/share/
    sudo tar xvjf $PHANTOM_JS.tar.bz2
    sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/share/phantomjs
    sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin/phantomjs
    sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/bin/phantomjs
    sudo mv $PHANTOM_JS /usr/local/share
    sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin

    Now, It (should) have PhantomJS properly on your system.
    Now, It should have PhantomJS properly on your system.

    phantomjs --version
    phantomjs --version
    32 changes: 32 additions & 0 deletions install_phantomjs.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,32 @@
    #!/usr/bin/env bash
    # This script install PhantomJS in your Debian/Ubuntu System
    #
    # This script must be run as root:
    # sudo sh install_phantomjs.sh
    #

    if [[ $EUID -ne 0 ]]; then
    echo "This script must be run as root" 1>&2
    exit 1
    fi

    PHANTOM_VERSION="phantomjs-1.9.8"
    ARCH=$(uname -m)

    if ! [ $ARCH = "x86_64" ]; then
    $ARCH="i686"
    fi

    PHANTOM_JS="$PHANTOM_VERSION-linux-$ARCH"

    sudo apt-get update
    sudo apt-get install build-essential chrpath libssl-dev libxft-dev -y
    sudo apt-get install libfreetype6 libfreetype6-dev -y
    sudo apt-get install libfontconfig1 libfontconfig1-dev -y

    cd ~
    wget https://bitbucket.org/ariya/phantomjs/downloads/$PHANTOM_JS.tar.bz2
    sudo tar xvjf $PHANTOM_JS.tar.bz2

    sudo mv $PHANTOM_JS /usr/local/share
    sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin
  3. @julionc julionc revised this gist Oct 24, 2014. 1 changed file with 13 additions and 7 deletions.
    20 changes: 13 additions & 7 deletions phantomjs_install.md
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,19 @@ Version: `1.9.7`

    Platform: `x86_64`

    First, Get it from the [PhantomJS website](http://phantomjs.org/).

    First, install or update to the latest system software.

    sudo apt-get update
    sudo apt-get install build-essential chrpath libssl-dev libxft-dev

    Install these packages needed by PhantomJS to work correctly.

    sudo apt-get install libfreetype6 libfreetype6-dev
    sudo apt-get install libfontconfig1 libfontconfig1-dev


    Get it from the [PhantomJS website](http://phantomjs.org/).

    cd ~
    export PHANTOM_JS="phantomjs-1.9.7-linux-x86_64"
    @@ -22,9 +34,3 @@ Once downloaded, move compress file to `/usr/local/share/`, and create symlinks:
    Now, It (should) have PhantomJS properly on your system.

    phantomjs --version


    These packages needed by PhantomJS to work correctly

    sudo apt-get install libfreetype6 libfreetype6-dev
    sudo apt-get install libfontconfig1
  4. @julionc julionc revised this gist Sep 30, 2014. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions phantomjs_install.md
    Original file line number Diff line number Diff line change
    @@ -1,20 +1,20 @@

    # How to install PhantomJS on Ubuntu

    Version: `1.9.2`
    Version: `1.9.7`

    Platform: `x86_64`

    First, Get it from the [PhantomJS website](http://phantomjs.org/).

    cd ~
    export PHANTOM_JS="phantomjs-1.9.2-linux-x86_64"
    wget https://phantomjs.googlecode.com/files/$PHANTOM_JS.tar.bz2
    export PHANTOM_JS="phantomjs-1.9.7-linux-x86_64"
    wget https://bitbucket.org/ariya/phantomjs/downloads/$PHANTOM_JS.tar.bz2

    Once downloaded, move compress file to `/usr/local/share/`, and create symlinks:

    sudo mv $PHANTOM_JS.tar.bz2 /usr/local/share/
    cd /usr/local/share/
    sudo tar xvjf $PHANTOM_JS.tar.bz2
    sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/share/phantomjs
    sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin/phantomjs
    sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/bin/phantomjs
  5. @julionc julionc created this gist Nov 14, 2013.
    30 changes: 30 additions & 0 deletions phantomjs_install.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,30 @@

    # How to install PhantomJS on Ubuntu

    Version: `1.9.2`

    Platform: `x86_64`

    First, Get it from the [PhantomJS website](http://phantomjs.org/).

    cd ~
    export PHANTOM_JS="phantomjs-1.9.2-linux-x86_64"
    wget https://phantomjs.googlecode.com/files/$PHANTOM_JS.tar.bz2

    Once downloaded, move compress file to `/usr/local/share/`, and create symlinks:

    sudo mv $PHANTOM_JS.tar.bz2 /usr/local/share/
    cd /usr/local/share/
    sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/share/phantomjs
    sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin/phantomjs
    sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/bin/phantomjs

    Now, It (should) have PhantomJS properly on your system.

    phantomjs --version


    These packages needed by PhantomJS to work correctly

    sudo apt-get install libfreetype6 libfreetype6-dev
    sudo apt-get install libfontconfig1