Skip to content

Instantly share code, notes, and snippets.

@atouchard
Last active December 13, 2015 18:08
Show Gist options
  • Save atouchard/4952511 to your computer and use it in GitHub Desktop.
Save atouchard/4952511 to your computer and use it in GitHub Desktop.
Simple PHP installation for Ubuntu
#!/bin/bash
# Install base packages
sudo apt-get install aptitude
sudo aptitude safe-upgrade
sudo apt-get update
sudo aptitude install build-essential
dpkg-reconfigure tzdata
sudo apt-get install language-pack-fr
dpkg-reconfigure locales
sudo update-alternatives --config editor
# Install & configure apache
sudo apt-get install apache2 php5 php-pear php5-gd mysql-server-5.0
dpkg -l | grep php
dpkg -l | grep php
sudo a2enmod rewrite
sudo a2enmod expires
sudo a2enmod deflate
sudo a2dismod cgi
sudo a2dismod autoindex
sudo sed -i 's/memory_limit = .*/memory_limit = 128M/' /etc/php5/apache2/php.ini
sudo sed -i 's/upload_max_filesize = .*/upload_max_filesize = 128M/' /etc/php5/apache2/php.ini
sudo sed -i 's/post_max_size = .*/post_max_size = 128M/' /etc/php5/apache2/php.ini
sudo apt-get install curl
sudo apt-get install php-apc
sudo apt-get install php5-xdebug
sudo apt-get install php5-mysql
sudo pecl install uploadprogress
sudo apt-get install ant
sudo aptitude install openjdk-6-jdk
sudo apt-get install git-core
sudo pear upgrade PEAR
sudo pear config-set auto_discover 1
sudo pear upgrade-all
sudo pear channel-update pear.php.net
sudo pear channel-discover pear.phpunit.de
sudo pear channel-discover pear.pdepend.org
sudo pear channel-discover pear.phpmd.org
sudo pear channel-discover pear.phpdoc.org
sudo pear install --alldeps phpunit/PHPUnit
sudo pear install --alldeps PHP_CodeSniffer
sudo pear install pdepend/PHP_Depend
sudo pear install phpmd/PHP_PMD
sudo pear install phpunit/phpcpd
sudo pear install phpunit/phploc
sudo pear install --alldeps phpunit/PHP_CodeBrowser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment