Debian LAMP stack in one command

Start out with the basics – Apache, MySQL and PHP + extensions

apt-get install mysql-server mysql-client apache2 php5 php5-cli libapache2-mod-php5 php5-mysql php5-curl php5-gd php-pear php5-imagick php5-mcrypt php5-memcache php5-mhash php5-sqlite php5-xmlrpc php5-xsl php5-json php5-dev libpcre3-dev

I recommend using this on Debian Jessie. That way you get a bleeding edge version of PHP (5.5.8 as of right now)

OpCode cache and APCu (Optional)

pecl install ZendOpcache-beta
pecl install apcu-beta

Add the following to /etc/php5/apache2/php.ini

Configure Opcache by adding this to /etc/php5/apache2/php.ini


Restart apache. The extensions should be available and configured. (You can verify this via phpinfo(); )

Useful tools (Optional)

apt-get install htop vim

4 thoughts on “Debian LAMP stack in one command

  1. B-Rad

    Dude, I love have you’ve included all of the most used extensions, CURL, MD5, Crypt..

    Good job, thanks a ton.

  2. Pingback: Installation of a Web Server and Laravel 5 on a Raspberry PI 2 - Valentin's blog

  3. Pingback: Установка WEB-сервера на Raspberry — Лабораторные записки

Leave a Reply

Your email address will not be published. Required fields are marked *

Markdown is allowed in comments.