Created
November 26, 2012 06:20
-
-
Save kadashu/4146824 to your computer and use it in GitHub Desktop.
PhantomJS on Debian 6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. prepare | |
# fonts | |
sudo apt-get install ttf-arphic-bkai00mp ttf-arphic-bsmi00lp ttf-arphic-gbsn00lp ttf-arphic-gbsn00lp xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic | |
# depends | |
sudo apt-get install build-essential libqt4-dev libqt4-webkit qt4-qmake | |
# xvfb | |
sudo apt-get install xvfb | |
# 2. build | |
$ wget http://phantomjs.googlecode.com/files/phantomjs-1.3.0-source.tar.gz | |
$ tar zxvf phantomjs-1.3.0-source.tar.gz | |
$ cd phantomjs-1.3.0 | |
$ qmake-qt4 && make | |
# 3. run | |
$ Xvfb :2 -screen 0 1024x768x24 2> /dev/null & | |
$ export DISPLAY=:2.0 | |
$ bin/phantomjs ../examples/rasterize.js http://www.baidu.com bd-1.3.png |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment