Created
September 23, 2011 17:52
-
-
Save masaki/1238005 to your computer and use it in GitHub Desktop.
PhantomJS on CentOS-5
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
# 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice script, very useful. Any ideas how to run Xvfb as a service, so it can be accessible any time?
Thanks