Skip to content

Instantly share code, notes, and snippets.

@legendtang
Forked from chrishaff/gist:83b0a3b621c3301ecc32
Last active August 29, 2015 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save legendtang/54e34bd14849bc26d3fb to your computer and use it in GitHub Desktop.
Save legendtang/54e34bd14849bc26d3fb to your computer and use it in GitHub Desktop.
# sudo su and run the following
sudo apt-get update && \
sudo apt-get -y upgrade && \
# install all dependencies
sudo apt-get -y install \
build-essential \
checkinstall \
gcc \
python \
python-dev \
libpng12-dev \
libtiff5-dev \
libpng-dev \
libjasper-dev \
libwebp-dev \
libcurl4-openssl-dev \
python-pgmagick \
libmagick++-dev \
graphicsmagick \
libopencv-dev \
python-pip \
python-opencv && \
# install thumbor, will take a while
sudo pip install pycurl numpy thumbor && \
# set default thumbor config
thumbor-config > /etc/thumbor.conf && \
read -d "" ThumborUpstart <<"EOF"
description "Thumbor image manipulation service"
author "Jason Ormand <jason.ormand1@gmail.com>"
start on startup
stop on shutdown
exec thumbor -c /etc/thumbor.conf
post-start script
PID=`status thumbor | egrep -oi '([0-9]+)$' | head -n1`
echo $PID > /var/run/thumbor.pid
end script
post-stop script
rm -f /var/run/thumbor.pid
end script
EOF
sudo echo "$ThumborUpstart" > /etc/init/thumbor.conf && \
sudo chmod 755 /etc/init/thumbor.conf && \
init-checkconf /etc/init/thumbor.conf && \
initctl reload-configuration && \
sudo service thumbor start && \
echo "Done!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment