Update PHP to 5.6 @ debian wheezy

I’ve just updated PHP version to 5.6. Check the migration guide for incompatibilities (no big thing there). You will get slightly better performance and some new features.

# sudo nano /etc/apt/sources.list.d/dotdeb.list

And insert these two lines:

deb http://packages.dotdeb.org wheezy-php56 all
deb-src http://packages.dotdeb.org wheezy-php56 all

And add the key:

# wget http://www.dotdeb.org/dotdeb.gpg -O- |apt-key add -

You are ready to go, just update & upgrade your system.

# apt-get update && apt-get upgrade

If you get The following packages have been kept back: you have to run:

# apt-get dist-upgrade


Upgrade from MySQL to MariaDB at Debian

Since I’ve decided to improve performance of my webservers (and migrate from Apache2 to Lighttpd) I wondered if I could do something with an MySQL. And after a research I made a decision that I am going to migrate my servers to MariaDB.
If you never heard about MariaDB you should probably know that MariaDB is a fork of MySQL because MySQL has been bought by an evil company and it’s not so much open sourced and the origin creators of MySQL have decided to do better db server and that’s MariaDB and so on and so on. Boring stuff mostly.Why to migrate?

  • open sourced
  • better engines (in my opinion)
  • performance might be slightly better
  • and it’s fully compatible with MySQL. For a now.

How to migrate?

Surprisingly simple. Python software properties are just for adding new repository by add-apt-repository, you don’t need to install this, if you know how to add repository.

# apt-get install python-software-properties

And add keys:

# apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db

Add repository:

# add-apt-repository 'deb http://mirror.stshosting.co.uk/mariadb/repo/10.0/debian wheezy main'

Update packages:

apt-get update

And install MariaDB:

apt-get install mariadb-server


That’s it. During installation will be stopped the MySQL server, installed MariaDB, you will be asked for root password and then will started mariaDB server. Service is still mysqld, actually for you  – nothing changed. Everything works the same way as with the MySQL.

And if have not used the latest mysql version, you should run


after installation.