Skip to content

Instantly share code, notes, and snippets.

@benlemasurier
Last active December 30, 2015 04:29
Show Gist options
  • Select an option

  • Save benlemasurier/7775947 to your computer and use it in GitHub Desktop.

Select an option

Save benlemasurier/7775947 to your computer and use it in GitHub Desktop.
wheezy php 5.5 upgrade notes
# very rough php 5.4->5.5 upgrade guide
# your environment may differ slightly, just let me know and I'll help out where I can.
# go to http://www.dotdeb.org/instructions/ and add the wheezy php 5.5 repositories under
# section 2 to /etc/apt/sources.list
#
# It's safe to leave the default dotdeb entries if you want.
# method 1 (preferred, easiest)
# upgrade all packages
# ___ DO NOT ALLOW THE INSTALLER TO OVERWRITE YOUR CONFIGURATIONS! ___
# ___ answer the default 'N' to all overwrite questions ___
sudo apt-get update && sudo apt-get dist-upgrade
# method 2 (you're on your own)
# upgrade all php* packages to 5.5 manually
#dpkg --get-selections | grep php
# manually upgrade each package ^
#apt-get upgrade <pkg>
# okay, now a few php modules need to be reinstalled from source
# if you see any errors here regarding a package not being installed
# that's fine, just continue along.
sudo pecl uninstall mongo
sudo pecl uninstall markdown
sudo pecl uninstall scrypt
sudo pecl uninstall memcache
sudo pecl install mongo
sudo echo "extension=mongo.so" > /etc/php5/mods-available/mongo.ini
sudo pecl install memcache
# answer 'yes'
sudo echo "extension=memcache.so" > /etc/php5/mods-available/memcache.ini
sudo pecl install markdown
sudo echo "extension=discount.so" > /etc/php5/mods-available/markdown.ini
sudo pecl install scrypt
# answer 'yes'
sudo echo "extension=scrypt.so" > /etc/php5/mods-available/scrypt.ini
cd /etc/php5/cli/conf.d/
sudo ln -s ../../mods-available/mongo.ini 20-mongo.ini
sudo ln -s ../../mods-available/markdown.ini 20-markdown.ini
sudo ln -s ../../mods-available/scrypt.ini 20-scrypt.ini
sudo ln -s ../../mods-available/memcache.ini 20-memcache.ini
cd /etc/php5/fpm/conf.d/
sudo ln -s ../../mods-available/mongo.ini 20-mongo.ini
sudo ln -s ../../mods-available/markdown.ini 20-markdown.ini
sudo ln -s ../../mods-available/scrypt.ini 20-scrypt.ini
sudo ln -s ../../mods-available/memcache.ini 20-memcache.ini
# finish
sudo /etc/init.d/php5-fpm restart && sudo /etc/init.d/nginx restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment