Ubuntu – What’s the easiest way to set up a LAMP stack

lampsoftware installation

I set up a new VPS instance of Ubuntu and am wondering what the easiest way is to get up and running with a basic LAMP stack (i.e. which packages are required, which configuration options need to be tweaked, if any, etc.).

Best Answer

  • sudo apt-get update
    sudo apt-get install tasksel
    sudo tasksel install lamp-server
    

    It will install all the basic LAMP stack for you, prompt for MySQL root password, etc.

    More specifically it will install the following packages, and their dependencies.

    mysql-client-core-5.1 libwrap0 apache2  
    libaprutil1-dbd-sqlite3 tcpd  
    libapache2-mod-php5 apache2.2-common  
    apache2-utils php5-common  
    libaprutil1-ldap libaprutil1  
    php5-mysql mysql-server-core-5.1  
    libdbi-perl libplrpc-perl mysql-server  
    apache2.2-bin libdbd-mysql-perl  
    libhtml-template-perl  
    libnet-daemon-perl libapr1  
    mysql-server-5.1 libmysqlclient16  
    ssl-cert apache2-mpm-prefork  
    mysql-common mysql-client-5.1  
    

    You might also want to take a peek at the Ubuntu Server Guide.

  • Related Question