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
bash-command-line-tutorial

Best introduction to unix command line / bash ever (by André Augusto Costa Santos)

A quick history of Comic Sans, the most wrongly used font ever

Excellent 10min presentation every frontend developer should see. Yes, even if you never touched Photoshop and never chose a font,

set up a local virtual machine for development with vagrant and puphpet / puppet (and ubuntu, linux, php, apache, mysql)

A super-simple pre-configured Vagrant box with HipHop, Hack and Hack code examples

Another game-changing project: Victor Berchet‘s HHVM Vagrant box is a simple Ubuntu 12.04 LTS Vagrant-box that comes with preinstalled HHVM/HipHop

php

How to setup / install PHP 5.6 on Ubuntu 14.04 LTS

Ubuntu 14.04 LTS ships with PHP 5.5 by default, but if you want to use PHP 5.6, then it’s just

Google I/O 2014 – HTTPS Everywhere (video)

Excellent, essential and game-changing talk by Ilya Grigorik and Pierre Far (both of Google), explaining why you should always use

How to get a single table out of a massive MySQL .sql database backup file (mysql dump splitter)

Imagine the following situation: Somebody backs up an entire MySQL database – a very large one – with common tools.

Experimenting with HHVM at Etsy (Link)

Extremely interesting blog post of Etsy on how they try out HHVM / HipHop: https://codeascraft.com/2015/04/06/experimenting-with-hhvm-at-etsy/

Support FLARUM, the future of PHP forum scripts (with some dollars on Kickstarter)

PHP forum scripts are horrible, let’s face it. Nearly everything that’s available is hard to install, hard to handle, hard

october cms

October CMS, built on top of Laravel, is beautiful, clever and on the way to be the new #1 CMS

Do you remember when you tried to edit one line of code inside TYPO3 or Contao ? And the extreme

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

1/4

Categories

Search

php
[Link] How to create, read, update and delete (CRUD) with PDO, MySQLi and MySQL the right way (prepared statements)
php
A super-simple introduction into PHP namespaces (7min video)
Ghost
[FREE SERVER PROMO] Install GHOST for free on a free SSD server with this coupon
forbes 30 under 30
Need motivation ? Check out these 2 awesome “FORBES 30 under 30” lists (web, UI, games)
Install Laravel 4 on Ubuntu 12.04 LTS (a how-to tutorial)
(Links) How to fix an extremely slow Symfony inside a Vagrant box
js javascript
JavaScript Testing Tactics (21min video by Justin Searls)
Hacking ATMs – A conference talk about the current security state of Windows XP driven cash machines
css
How to center a div vertically and horizontally (modern methods, without fixed size!)
js javascript
Push database changes to all clients in real-time (!) with AngularJS and Firebase
mod-rewrite-ubuntu-14-04-lts
EOL lists of Ubuntu, Debian and CentOS for your server plannings
php
PHP 5.7 gets refactored core, is 10%-30% faster than PHP 5.5! Wow!
Disappointed by Watch Dogs’s graphics ? See how it looks with unlocked, hidden settings. Awesome!
vagrant
How to copy Vagrant boxes (or duplicate them)
How to get a single table out of a massive MySQL .sql database backup file (mysql dump splitter)

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