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
php

Must-read PHP blog: PHPweekly.com

Probably one of the best ressources for your weekly doze of news from the PHP scene: phpweekly.com simply publishes a

“Fuck you. Pay Me.” How to deal with clients, the professional way. An excellent talk with Mike Monteiro.

Excellent (and very useful) speech by Mike Monteiro about how to deal with clients, how to create a professional relation

Symfony devs: Creator of Symfony framework is hiring (Cologne, Germany)!

Probably one of the most interesting companies for a PHP developer is currently hiring Juniors and Seniors in Cologne, Germany.

css

How to center a div vertically and horizontally (modern methods, without fixed size!)

“How to center a div” (inside another div or inside the body itself) is one of the most discussed questions

steam sale coupon voucher

-30% to -90% on Steam and Origin

Soft off-topic, but as most developers like to play from time to time, this might be your change to grab

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

A list of downloadable Vagrant boxes (CentOS 5.9 / 6.4, Ubuntu 12 / 13, Debian 6 / 7 / 7.1 / 7.2)

Offical boxes (directly from Vagrant) Ubuntu 12.04 LTS 32-bit http://files.vagrantup.com/precise32.box Ubuntu 12.04 LTS 64-bit http://files.vagrantup.com/precise64.box   Boxes from puppetlabs.com Seems

hiphop php

HipHop VM reaches 100% green Unit Tests in Laravel, Drupal, Slim, CodeIgniter etc.

In September 2013 the PHP HipHop VM dev team wrote a very interesting article [1] about failing Unit Tests of

Frontend Ops Conf 2014 – Rebooting Flickr On A Node.js Stack, One Page At A Time (from PHP) by Bertrand Fan

https://www.youtube.com/watch?v=vBo0aFtg1_M

phpstorm-8

PHPStorm 8 has just been released

The excellent PHP IDE PHPStorm just had a major release these days: Version 8 is out, coming with latest PHP

Frontend Ops Conf 2014 – Paul Irish: Delivering The Goods In Under 1000ms (40min video)

https://www.youtube.com/watch?v=E5lZ12Z889k

1/4

Categories

Search

How to setup a config-free WordPress, PHP and MySQL (for local development) in Windows 7 / 8 in under 3 minutes
hiphop php
Vote for “Hack” for HipHop/HHMV support (future style PHP) in PHPStorm 8
php
“Belt” adds very clever everyday functions to PHP, comes with JavaScript naming styles and eventually solves the needle/haystack problem
GitHub introduces revert button / rollback for merged pull requests
composer
A short & simple Composer tutorial
github-logo-octocat
GitHub buys Easel.io, a code-free full website creator worth a look
frontend-workflow
[german] Modernes Frontend-Development mit Bower, Grunt, Yeoman (45min Video, Thorsten Rinne auf der IPC2013)
Redesigning Windows 8 – fantastic and clever drafts by Jay Machalani
8 awesome pure CSS spinner / loader
All new features of WordPress 3.9 in this 2 minute video
phpstorm-8
A PHPStorm shortcuts cheat sheet (for Windows, Mac OS and Linux)
harper reed about big data
Harper Reed – The magic and mystery of Big Data (30min video from Webstock’15)
mod-rewrite-ubuntu-14-04-lts
How to enable mod_rewrite in Ubuntu 12.04 LTS
Interesting stats on SONY’s hacked passwords
bitdeli git github stats
php-login goes #2 PHP script worldwide in BitDeli stats

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