Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save alexcodenet/7805956 to your computer and use it in GitHub Desktop.

Select an option

Save alexcodenet/7805956 to your computer and use it in GitHub Desktop.
My fork of https://gist.github.com/DaRaFF/3995789, which describes the full cycle LAMP installation on Ubuntu 13.10 Saucy Salamander.

#Introduction If you're a PHP developer on Ubuntu 13.10, there comes the time where you have to install/reinstall your system. I did it already a few times and i decided to write down the steps for a typical web developer stack with PHP. This is for a developer machine and not for a live environment!

I hope it helps you too!

#Installation stack

#Installation LAMP Environment ##Apache2

sudo apt-get install apache2
sudo apt-get install libapache2-mod-php5
sudo a2enmod rewrite

##PHP5

sudo apt-get install php5-cli php5-common php5 php5-dev

##MySQL

sudo apt-get install mysql-server
sudo apt-get install php5-mysql

#Installation PHP QA Environment

##PHPUnit

sudo pear channel-discover pear.phpunit.de
sudo pear update-channels
sudo pear upgrade-all
sudo pear config-set auto_discover 1
sudo pear install --alldeps pear.phpunit.de/PHPUnit
sudo pear install --force --alldeps pear.phpunit.de/PHPUnit

#phpunit extensions

sudo pear install pear.phpunit.de/PHPUnit_SkeletonGenerator
sudo pear install pear.phpunit.de/DbUnit
sudo pear install --force phpunit/PHPUnit_MockObject

##xDebug

sudo apt-get install php5-xdebug

*edit /etc/php5/mods-available/xdebug.ini

zend_extension=/usr/lib/php5/YOUR_DIR/xdebug.so
xdebug.remote_enable=on
xdebug.remote_host=localhost
xdebug.remote_handler=dbgp
xdebug.remote_port=9000
xdebug.idekey="netbeans-xdebug"

#GitHub support ##Git

sudo apt-get install git
git config --global user.name "NewUser"
git config --global user.email newuser@example.com

#Using SSH

mkdir /home/username/.ssh
cd .ssh
ssh-keygen -t rsa -C "your_email@example.com"
//specify your current location
ssh-add id_rsa
ssh -T git@github.com
//if "The authenticity of host 'github.com' can't be established." error
//start ssh-agent
env | grep ^SSH
exec ssh-agent bash
ssh-add id_rsa
//if netbeans reports an error ssh-key permission denied
cp ~/.ssh/id_rsa /home/username/GitHubProjects/.ssh
chmod 0755 /home/username/GitHubProjects/.ssh

#General Environment

##memcache

sudo apt-get install memcached
sudo apt-get install php5-memcache

##cURL

sudo apt-get install curl
sudo apt-get install php5-curl

##Composer

curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment