Page 4 the LEMP stack - Nginx, PHP, MySQL
In the past, with Debian 5, it was very frustrating trying to stay up to date with the latest versions of PHP, MySQL and Nginx because the packages were always so outdated. Debian 6 shipped with up to date versions but if you want the latest performance packages your going to need the Dotdeb repositories.
Dotdeb is a repository containing packages to turn your Debian boxes into powerful, stable and up-to-date LAMP servers :
- PHP 5.3
- useful PHP extensions : APC, imagick, Pinba, xcache, Xdebug, XHprof…
- MySQL 5.1 and its performant InnoDB plugin,
Add the Dotdeb repos to /etc/apt/sources.list
deb http://packages.dotdeb.org stable all deb-src http://packages.dotdeb.org stable all
Now fetch the appropriate GnuPG keys
wget http://www.dotdeb.org/dotdeb.gpg cat dotdeb.gpg | apt-key add -
Run apt-get update and you should see your server connecting to the dot deb mirrors.
Install Nginx, PHP-FPM, MySQL, APC
apt-get install nginx-full php5-fpm php5 php5-mysql php5-apc php5-mysql php5-xsl php5-xmlrpc php5-sqlite php5-snmp php5-curl
You will be prompted to accept installs and apt-get will make sure all dependencies are met and install additional packages if needed. When you get to the MySQL install a semi-graphical interface will pop up. Make sure you choose a password for the root mysql user.
If you have made it this far go grab a beer or an espresso you deserve it, Systems Administrator.
Next Page: the .confs