Skip to content

Instantly share code, notes, and snippets.

@gufranco-zz
Last active December 19, 2015 10:29
Show Gist options
  • Save gufranco-zz/5940970 to your computer and use it in GitHub Desktop.
Save gufranco-zz/5940970 to your computer and use it in GitHub Desktop.
PHP Installer
#!/bin/sh
#
# One line installer
# sudo apt-get -y update && sudo apt-get -y upgrade && sudo apt-get -y dist-upgrade && sudo apt-get -y install language-pack-pt curl git-core mysql-server mysql-client libmysqlclient-dev postgresql postgresql-client libpq-dev apache2 php5 libapache2-mod-php5 php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-json
# Locale
echo "Changing locale"
sudo apt-get -y install language-pack-pt
clear
# System update
echo "Updating repositories"
sudo apt-get -y update
clear
# System upgrade
echo "Upgrading system"
sudo apt-get -y upgrade
sudo apt-get -y dist-upgrade
clear
# Install Curl
echo "Installing curl"
sudo apt-get -y install curl
clear
# Install Git
echo "Installing Git"
sudo apt-get -y install git-core
clear
# Install MySQL
echo "Installing MySQL"
sudo apt-get -y install mysql-server mysql-client libmysqlclient-dev
clear
# Install PostgreSQL
echo "Installing PostgreSQL"
sudo apt-get -y install postgresql postgresql-client libpq-dev
clear
# Install Apache
echo "Installing Apache"
sudo apt-get -y install apache2
sudo adduser $USER www-data
sudo chown -R www-data:www-data /var/www
sudo chmod -R g+rw /var/www
clear
# Install PHP 5
echo "Installing PHP 5"
sudo apt-get -y install php5 libapache2-mod-php5 php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-json
clear
# End! ;)
echo "You MUST restart your system right now."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment