Skip to content

Instantly share code, notes, and snippets.

@andresamayadiaz
Created March 15, 2017 22:22
Show Gist options
  • Save andresamayadiaz/5a474e157d1576426e154e800597f926 to your computer and use it in GitHub Desktop.
Save andresamayadiaz/5a474e157d1576426e154e800597f926 to your computer and use it in GitHub Desktop.
Installs LAMP with PHP 5.6 on Ubuntu 16.04
#!/bin/bash
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y apache2
sudo ufw allow in "Apache Full"
sudo apt-get install -y mysql-server
# After running this command, select (Y), option 2, then (Y) for the rest of the prompts.
sudo mysql_secure_installation
sudo apt install -y php5.6 libapache2-mod-php5.6 php5.6-curl php5.6-gd php5.6-mbstring php5.6-mcrypt php5.6-mysql php5.6-xml php5.6-xmlrpc
# This will, and should, return a "does not exist!" message.
sudo a2dismod php7.0
# This will, and should, return a "already enabled" message.
sudo a2enmod php5.6
sudo systemctl restart apache2
@andresamayadiaz
Copy link
Author

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C

sudo apt-cache search php56 gettext
sudo apt-cache search php gettext
sudo apt-get install php56-common
sudo apt-get install php5.6-common
sudo apt-get install php-gettext

sudo nano /etc/apache2/mods-enabled/dir.conf

sudo dpkg-reconfigure locales

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment