Logo
  • PHP
    • HipHop / HHVM
    • Modern PHP
    • PHPStorm
    • LAMP
    • Laravel
    • Composer
    • PDO
  • JavaScript
    • node.js
    • AngularJS
  • CSS
    • SASS
    • “CSS4” (CSS level 4)
  • HTML
  • Git
  • LAMP
  • Vagrant
  • UI / UX
  • Architecture of …
  • Off-Topic
With ♥ from Berlin
How to install/setup a basic LAMP stack (Linux, Apache, MySQL, PHP) on Ubuntu 12.04 or Debian 7.0/7.1

How to install/setup a basic LAMP stack (Linux, Apache, MySQL, PHP) on Ubuntu 12.04 or Debian 7.0/7.1

This little tutorial shows how to setup Apache, MySQL and PHP on a Linux server, in this case Ubuntu 12.04

September 1, 2013
Chris
Debian, LAMP, Linux, PHP, Ubuntu
Comments Off on How to install/setup a basic LAMP stack (Linux, Apache, MySQL, PHP) on Ubuntu 12.04 or Debian 7.0/7.1
PreviousNext

This little tutorial shows how to setup Apache, MySQL and PHP on a Linux server, in this case Ubuntu 12.04 LTS (by the way, if you want to know what LTS means, have a look into the wikipedia article) or Debian 7.0/7.1.

Most tutorials are making it overcomplicated, and beside that most commands (like apache restarting etc.) are not necessary anymore today. Log into your server…

1. Do an update and an upgrade to keep everything up-to-date:

sudo apt-get update
sudo apt-get upgrade

2. Install Apache:

sudo apt-get install apache2

3. Install PHP:

sudo apt-get install php5

4. Install MySQL, mysql module for PHP and PDO stuff:

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

Provide a new mysql root password when asked. Then restart the server:

sudo service apache2 restart

By the way, then you think you messed something up while installing a package then you can remove the package and its config files via

sudo apt-get autoremove phpmyadmin

 

Have a look on your server to make sure Apache runs:

lamp apache mysql php on ubuntu 12.04

Cool ! Now let’s install PHPMyAdmin to make sure PHP and the MySQL server run and work together:

sudo apt-get install phpmyadmin

Select “apache2” when asked, select with SPACE and confirm with ENTER. Press ENTER when asked for auto-configuration and provide a new password for the phpmyadmin root user and mysql root passwords when asked for password (I use the same for this, to keep things simple). You don’t need to restart anything and there’s no need to config anything right now.

Have a look on PHPMyAdmin via

http://YOUR_IP/phpmyadmin/

and you’ll see the phpmyadmin login screen. Log in to prove that everything runs fine.

Done!

NOTE: in a real live application you should not log into the server as the root user, not provide the root password to phpmyadmin and in general not have phpmyadmin available on the live server, but for a development server that’s totally okay.

 

apachedebianLAMPMySQLPHPphpmyadminUbuntu
Share this

[Link] Interesting: Designing a Nuclear Waste Warning Symbol That Will Still Make Sense in 10,000 Years

Interesting article for everybody with a faible for UI/UX: Slate – Designing a Nuclear Waste Warning Symbol That Will Still

You made a mess with Git ? Here’s a flowchart guideline on how to fix

Extremely useful. Originally created by Justin Hileman in the presentation Changing History, or How to Git pretty. You’ll also find

php

Redesigning the PHP logo – who wants ?

The current PHP logo is a really lovely one, it is highly accepted and has its own charme, transports a

Adobe releases Firebug-like developer tools to edit and extract PSDs

A big step in frontend-development: According to this presentation on Adobe Max 2014 Adobe has just released a very interesting

vagrant

Generate Vagrant boxes with Laravel, HipHop, Nginx, WordPress, MySQL, MariaDB, MongoDB, RabbitMQ etc. with one click

Excellent new web tool: Protobox allows extremely easy setup of Vagrant boxes using a wonderful web UI. Beside the standard

logo-internet-explorer

How to professionally test on old Internet Explorer versions

If you have (or want) to test your websites and applications on older versions of Internet Explorer, then there’s a

php ide

Sitepoint asks for your favourite PHP IDE – take part!

Bruno Skvorc ask for your favourite PHP IDE in this new article on Sitepoint. If you use one, then take

composer

A short & simple Composer tutorial

In this little Composer tutorial we’ll walk through the absolute basics of Composer, the PHP dependency management tool. Composer has

java vs php

Switching from Java to PHP. Seriously. A very interesting and pre-judice-free talk with Ph.D. Aris Zakinthinos

Ph.D. Aris Zakinthinos, CTO of achievers.com, a well-scalability-experienced guy and former IT employee of the military, has just delivered one

How to install/setup latest version of PHPMyAdmin on Ubuntu 12.04 LTS (Precise Pangolin)

As the official installation packages of most linux distributions are usually totally out of date (but that’s pure intention, to

1/4

Categories

Search

Dangerous Performance Myths in the Web (video talk by Thomas Lohner, PHPUG Latvia)
phpstorm-8
PHPStorm 8 (early access version) released – for free
Google I/O 2014 – HTTPS Everywhere (video)
What’s new in PHPStorm 10 (Official promo video)
Adobe releases Firebug-like developer tools to edit and extract PSDs
Ghost
[FREE SERVER PROMO] Install GHOST for free on a free SSD server with this coupon
[Link] Improving Smashing Magazine’s Performance: A Case Study
hearthbleed-ssl-bug
A quick guideline on how to fix the Hearthbleed bug (and update OpenSSL) on Ubuntu
Frontend Ops Conf 2014 – Sarah Goff-Dupont: Git, Continuous Integration and Making It Pretty (31min video)
mod-rewrite-ubuntu-14-04-lts
How to enable mod_rewrite in Ubuntu 12.04 LTS
php
12 tools for better PHP quality
Frontend Ops Conf 2014 – Rebooting Flickr On A Node.js Stack, One Page At A Time (from PHP) by Bertrand Fan
redaktionelle-hochlastseiten
Hochlastseiten mit PHP, MySQL und Apache am Beispiel stern.de (deutscher Artikel)
GitHub finally introduces repo traffic stats
MINI, an extremely simple barebone PHP application

Tags

apache bash centos composer conference coupon CSS debian fonts framework git GitHub hack HHVM HipHop HTML HTML5 IDE JavaScript JS LAMP laravel linux mod_rewrite MVC MySQL Nginx optimization PHP PHP 5.5 PHP 5.6 phpmyadmin PHPStorm security server SSD Ubuntu UI UX vagrant video virtual machine voucher VPS wordpress
Side-Project: Wordle-Solver:
www.wordle-helper.info

Pages

  • Privacy Policy