In this tutorial, I will explain “How to Install PHP5.4 and MariaDB 5.5 on Debian 6.x Squeez?”
MariaDB is a drop-in replacement for MySQL.
MariaDB strives to be the logical choice for database professionals looking for a robust, scalable, and reliable SQL server.
MariaDB provide repository for all famous linux distros. I’m going to use MariaDB repo for Debian 6.x
Edit /etc/apt/sources.list
1 |
nano -w /etc/apt/sources.list |
Past below lines in sources.list
1 2 3 4 |
# MariaDB 5.5 repository list - created 2013-08-04 16:33 UTC # http://mariadb.org/mariadb/repositories/ deb http://mariadb.biz.net.id//repo/5.5/debian squeeze main deb-src http://mariadb.biz.net.id//repo/5.5/debian squeeze main |
Now run
1 |
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db |
To install PHP5.4, I will use DOTDEB repo.
Edit /etc/apt/sources.list again
1 |
nano -w /etc/apt/sources.list |
Paste below lines
1 2 |
deb http://packages.dotdeb.org squeeze-php54 all deb-src http://packages.dotdeb.org squeeze-php54 all |
Now run
1 2 |
wget http://www.dotdeb.org/dotdeb.gpg cat dotdeb.gpg | apt-key add - |
Now run Debian update
1 |
apt-get -y update |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
root@localhost:~# apt-get -y update Hit http://packages.dotdeb.org squeeze-php54 Release.gpg Ign http://packages.dotdeb.org/ squeeze-php54/all Translation-en Hit http://ftp.de.debian.org squeeze Release.gpg Ign http://ftp.de.debian.org/debian/ squeeze/contrib Translation-en Ign http://ftp.de.debian.org/debian/ squeeze/main Translation-en Ign http://ftp.de.debian.org/debian/ squeeze/non-free Translation-en Hit http://ftp.de.debian.org squeeze/updates Release.gpg Ign http://ftp.de.debian.org/debian-security/ squeeze/updates/contrib Translation-en Ign http://ftp.de.debian.org/debian-security/ squeeze/updates/main Translation-en Ign http://ftp.de.debian.org/debian-security/ squeeze/updates/non-free Translation-en Hit http://packages.dotdeb.org squeeze-php54 Release Hit http://ftp.de.debian.org squeeze Release Hit http://packages.dotdeb.org squeeze-php54/all Sources Hit http://ftp.de.debian.org squeeze/updates Release Get:1 http://mariadb.biz.net.id squeeze Release.gpg [198 B] Hit http://packages.dotdeb.org squeeze-php54/all i386 Packages Hit http://ftp.de.debian.org squeeze/main i386 Packages Hit http://ftp.de.debian.org squeeze/contrib i386 Packages Hit http://ftp.de.debian.org squeeze/non-free i386 Packages Hit http://ftp.de.debian.org squeeze/updates/main i386 Packages Hit http://ftp.de.debian.org squeeze/updates/contrib i386 Packages Hit http://ftp.de.debian.org squeeze/updates/non-free i386 Packages Ign http://mariadb.biz.net.id//repo/5.5/debian/ squeeze/main Translation-en Get:2 http://mariadb.biz.net.id squeeze Release [2261 B] Hit http://mariadb.biz.net.id squeeze/main Sources Hit http://mariadb.biz.net.id squeeze/main i386 Packages Fetched 199 B in 2s (75 B/s) Reading package lists... Done |
Now we will install Apache, PHP5.4 and MariaDB 5.5
1 |
apt-get -y install apache2 php5 libapache2-mod-php5 mariadb-server php5-mysql php5-common php5-gd php5-mcrypt php5-imap php5-ldap php5-odbc php5-xmlrpc sendmail php5-curl libmysqlclient15-dev sqlite php5-sqlite libjpeg62 libjpeg62-dev libfreetype6 libfreetype6-dev zlib1g-dev libpng-dev imagemagick php5-imagick ffmpeg php5-ffmpeg unzip |
It will prompt for MariaDB root password, you will have to enter your desired password and press Enter.
Once completed, you will have Debian with Apache, PHP5.4 and MariaDB5.5 installed.
Comment Policy:
Your words are your own, so be nice and helpful if you can. Please, only use your real name, not your business name or keywords. Using business name or keywords instead of your real name will lead to the comment being deleted. Anonymous commenting is not allowed either. Limit the amount of links submitted in your comment. We accept clean XHTML in comments, but don't overdo it please.