Created
February 9, 2015 04:35
-
-
Save okor/79c38cfb03b153bd4eb2 to your computer and use it in GitHub Desktop.
Install Thumbor on Ubuntu 14.04
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
# 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 && \ | |
# 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 <[email protected]>" | |
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!" |
Thanks, help-me alot.
@okor, I've updated the dependencies, you actually don't need graphicsmagick, if you're using Pillow.
https://gist.github.com/guilhermef/297680f457f82fb27b3d
Thanks for the great script!
upstart is deprecated now so init-checkconf wont work unless you forcefully install upstart by:
sudo apt-get install upstart-sysv sudo update-initramfs -u sudo reboot
Check out https://askubuntu.com/questions/614970/vivid-failed-to-connect-to-upstart-connection-refused
Also, there is a dependency to libssl
sudo apt-get install libssl-dev
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This was super helpful, thanks!
I made a fork that just adds one line for python-opencv for folks that want to use feature/face detection.
https://gist.github.com/chrishaff/83b0a3b621c3301ecc32