Last active
November 1, 2018 10:47
-
-
Save enoch85/c504c4516e68bdcae7a2 to your computer and use it in GitHub Desktop.
Install APCu 4.0.7. This script requires PHP 5.6.
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/bash | |
# | |
# Tech and Me 2015 - https://www.en0ch.se | |
# | |
# 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 | |
echo Current apcu version is | |
sudo dpkg -s php5-apcu |grep Version: | |
sleep 5 | |
echo | |
# Remove old version | |
sudo php5dismod apcu | |
sudo apt-get purge php5-apcu -y | |
# Install APCu 4.0.7 | |
sudo apt-get update | |
wget http://launchpadlibrarian.net/195966887/php5-apcu_4.0.7-1build1_amd64.deb | |
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