Skip to content

Instantly share code, notes, and snippets.

@Ivanca
Last active December 9, 2017 08:26
Show Gist options
  • Save Ivanca/4bc69a4153092a9565d7285bab7b9b32 to your computer and use it in GitHub Desktop.
Save Ivanca/4bc69a4153092a9565d7285bab7b9b32 to your computer and use it in GitHub Desktop.
Upgrading from php5.3 to php5.6 on Amazon Linux AMI
#!/bin/bash
# Stop it all
sudo service httpd stop
sudo service php-fpm stop
# Remove problematic packages
sudo yum remove -y httpd httpd-tools apr apr-util
# Remove old php and php extensions
sudo yum remove -y php-*
# Install php56-FPM
sudo yum install -y php56-fpm
# Install php56 extensions
sudo yum install -y php56-gd php56-devel php56-pdo php56-mbstring php56-cli php56-odbc php56-imap php56-xml php56-soap
# Install php mysql
sudo yum install -y php56-mysqlnd
# Install php56-APC
sudo yum install -y php56-pecl-apc
sudo yum install -y pcre-devel
# Move old php56-FPM configuration to new installation folder
sudo mv /etc/php-fpm.d/www.conf /etc/php-fpm-5.6.d/www.conf
# Reboot if it says it failed and try again
sudo service php-fpm-5.6 start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment