Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Install APCu 4.0.7. This script requires PHP 5.6.
# Tech and Me 2015 -
# This requires PHP 5.6
# Must be root
[[ `id -u` -eq 0 ]] || { echo "Must be root to run script, in Ubuntu type: sudo -i"; exit 1; }
# Print current version
echo Current apcu version is
sudo dpkg -s php5-apcu |grep Version:
sleep 5
# Remove old version
sudo php5dismod apcu
sudo apt-get purge php5-apcu -y
# Install APCu 4.0.7
sudo apt-get update
sudo dpkg -i php5-apcu_4.0.7-1build1_amd64.deb
sudo php5enmod apcu
rm php5-apcu_4.0.7-1build1_amd64.deb
# Final configuration
sudo rm /etc/php5/mods-available/apcu-cli.ini
sudo touch /etc/php5/mods-available/apcu-cli.ini
sudo echo 'apc.enable_cli = 1' > /etc/php5/mods-available/apcu-cli.ini
sudo php5enmod apcu-cli
sudo service apache2 restart
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.