Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
PhantomJS on CentOS-5
# SEE: http://d.hatena.ne.jp/shim0mura/20110730/1312046133
# SEE: https://gist.github.com/1031961
# SEE: http://atrpms.net/documentation/install/
# 1. prepare
$ cat /etc/yum.repos.d/atrpms.repo
[atrpms-stable]
name=ATrpms RHEL5 stable
baseurl=http://dl.atrpms.net/el5-$basearch/atrpms/stable/
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms
gpgcheck=1
enabled=1
[atrpms-testing]
name=ATrpms RHEL5 testing
baseurl=http://dl.atrpms.net/el5-$basearch/atrpms/testing/
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms
gpgcheck=1
enabled=1
$ wget http://packages.atrpms.net/RPM-GPG-KEY.atrpms
$ sudo rpm --import RPM-GPG-KEY.atrpms
$ sudo yum install qt47-webkit qt47-webkit-devel qt47-devel sqlite sqlite-devel
# 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-qt47 && make
# 3. run
$ sudo yum install xorg-x11-server-Xvfb xorg-x11-fonts*
$ Xvfb :2 -screen 0 1024x768x24 2> /dev/null &
$ export DISPLAY=:2.0
$ bin/phantomjs example.js
@eneko

This comment has been minimized.

Copy link

@eneko eneko commented Dec 22, 2011

Nice script, very useful. Any ideas how to run Xvfb as a service, so it can be accessible any time?
Thanks

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