-
-
Save wizardishungry/830310 to your computer and use it in GitHub Desktop.
getting phantomjs working on Debian 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
# not a blank gist | |
sudo apt-get install git-core apache2 libqtwebkit-dev libqt4-dev xvfb g++ php5 libapache2-mod-php5 php5-memcache memcached php5-curl php5-mysql | |
qmake && make | |
sudo cp bin/phantomjs /usr/local/bin/ | |
#Xvfb :0 -screen 0 1024x768x24 & | |
sudo update-rc.d Xvfb defaults # need the init script in place | |
export DISPLAY=:0 | |
phantomjs examples/rasterize.js http://twitter.com/WIZARDISHUNGRY test.png | |
# this stuff probably only useful for maintainers :) | |
sudo ln -s ../mods-available/rewrite.load /etc/apache2/mods-enabled | |
# set AllowOverride directive to "all" in /etc/apache2/sites-enabled/000-default | |
sudo rm -r /var/www | |
sudo mkdir /var/www | |
sudo chown ubuntu:ubuntu /var/www | |
git clone $$$$$$GIT REPO URL HERE ;)$$$$$$ | |
sudo ln -s ~/REPOPATHHERE /var/www | |
cd REPO | |
git submodule update --init | |
# setup the extensions directory and then… | |
ln -s ../../extensions/AWSSDKforPHP.config.inc.php libraries/AWSSDKforPHP/config.inc.php | |
sudo apachectl restart |
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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: Xvfb | |
# Required-Start: $local_fs $remote_fs | |
# Required-Stop: | |
# X-Start-Before: | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: | |
### END INIT INFO | |
N=/etc/init.d/Xvfb | |
set -e | |
case "$1" in | |
start) | |
Xvfb :0 -screen 0 1024x768x24 & | |
;; | |
stop|reload|restart|force-reload) | |
;; | |
*) | |
echo "Usage: $N {start|stop|restart|force-reload}" >&2 | |
exit 1 | |
;; | |
esac | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment