Tag Archives: DotDeb

DotDeb updates: Repo now GPG signed!

i know its actually slightly older news but its worth sharing anyway, the DotDeb repositories are now GPG signed so you can be more assured that the mirrors are as safe and secure as the central mirror and you also dont have to worry about the this repository is not encrypted/signed error any more. am writing an update from my old tutorial which can be found here basically because i have fielded quite a few questions from people wondering if the uk mirror was broke or something because it needed the gpg key now. as always latest instructions for the DotDeb mirrors can be found over at dotdeb.org/instructions below is a tutorial for debian users to add the UK mirrors into your system, it is totally interchangeable with the other dotdeb mirrors, just switch the URL’s for your required mirror. In other related news, over the weekend I successfully moved the UK mirror over onto the new SAN 2.0 infrastructure at VPS.net so it should be twice as redundant now!

for this guide i am assuming you are logged in to ssh at root level or ssh’ed in and using sudo su to operate at root level and have nano installed on debian (any debian image works)

first off you need to edit your sources list

nano /etc/apt/sources.list

in this file you will see lots of lines beginning in deb or deb-src these are the other repositories your server will connect to for updates, you do not need to touch these. press the down arrow until you get to the bottom, for ease of reading create a new line and then either type or copy and paste in the following code to add the dotdeb repositories to apt

deb http://dotdeb.mirror.somersettechsolutions.co.uk stable all
deb-src http://dotdeb.mirror.somersettechsolutions.co.uk stable all

note if you are outside the UK you may experience better results by using another mirror repo of which the listing can be found at : http://www.dotdeb.org/mirrors/

once that is done press control-x to exit and say y to save changes

and hit enter to save as the same file name, this should send you back to the shell

you will then need to fetch the GPG key and add it into the apt system


gpg --keyserver keys.gnupg.net --recv-key 89DF5277

gpg -a --export 89DF5277 | apt-key add -

NOTE: if you use a firewall like CSF and it also blocks outgoing ports, be sure to trust the keys.gnupg.net server or allow the tcp outgoing port of: 11371 through the firewall

now type

apt-get update

this will update apt with all the package lists and tell it about the new packages available

now you can type

apt-get upgrade

for me and i suspect for all users it will update all your php packages with the latest 5.2.14 (at time of writing) from dotdeb
but not mysql. i am not quite sure why this is the case but it may be because the virtual packages are already installed so you have to “reinstall” them to update them to the new ones.

BEFORE you do this however, if like me you like to retain your current config files and then merge changes down to it rather than make your tweaks to a new file you will hit a bug, the latest version of mysql has now fully stopped supporting Berkeley databases, in the 5.0.51a release with debian this support is disabled which is fine but if you try to update, mysql will fail to start and therefore error out your upgrade/install because it reads an invalid configuration (but it doesnt tell you this when it happens). all you have to do is edit your mysql config file (most commonly found on debian in /etc/mysql/my.cnf) and comment out the line

skip-bdb

as the latest version of mysql doesnt support it, now you should be able to run

apt-get install mysql-server mysql-client

to reinstall the packages from the new 5.1 branch from dotdeb with no problems at all

some quirks from this though

in order to prevent against segfaults with apache the php5-mysql module has been compiled against the old mysql libraries this means that php will report your mysql client as 5.0.51a where it is actually 5.1.50 (at time of writing) this shouldnt cause any problems and i have only seen so far that phpmyadmin complains but doesnt have any problems.

also apache is not yet included in the repository, neither is lighttpd or nginx, hopefully this will change soon and the above quirk will no longer be seen

if you want php5.3 its currently stored in a seperate repository because the author thinks that its still too early days to be using php 5.3 widely on production servers personally i think this a good call but if you want to use php 5.3 you will need to add the following repos as well as the basic ones

deb http://php53.dotdeb.org stable all
deb-src http://php53.dotdeb.org stable all

for more info regarding php5.3 and dotdeb check here: http://www.dotdeb.org/2009/11/30/php-5-3-1-packages-for-debian-lenny-theyre-here but they are now at php 5.3.3 which also includes php-FPM 🙂

Updating PHP and MySQL on Debian

so a client particularly wanted php 5.3 for a project and mysql 5.1 but at the moment needs to operate on smallest possible footprint.

i did some research on it and actually found a useful resource for updated php and mysql resources called Dotdeb – http://dotdeb.org

the idea of this repository is to keep the core lamp stack binaries up to date and keep support for the ease of updating (via apt-get)

so upon taking a look i decided to trial it on my personal vps and with my niggles i rolled it out to the work server i manage along with the client too. i did notice they didnt have a UK mirror so am in the process of becoming that mirror but still awaiting the official anouncement from there site. this mini tutorial will show how to update your apt sources list and upgrade php and mysql. its a reasonably simple process but has one or 2 quirks

for this guide i am assuming you are logged in to ssh at root level or ssh’ed in and using sudo su to operate at root level and have nano installed on debian (any debian image works)

first off you need to edit your sources list

nano /etc/apt/sources.list

in this file you will see lots of lines beginning in deb or deb-src these are the other repositories your server will connect to for updates, you do not need to touch these. press the down arrow until you get to the bottom, for ease of reading create a new line and then either type or copy and paste in the following code to add the dotdeb repositories to apt

deb http://dotdeb.mirror.somersettechsolutions.co.uk stable all
deb-src http://dotdeb.mirror.somersettechsolutions.co.uk stable all

note if you are outside the UK you may experience better results by using another mirror repo of which the listing can be found at : http://www.dotdeb.org/mirrors/

once that is done press control-x to exit and say y to save changes
and hit enter to save as the same file name, this should send you back to the shell

now type

apt-get update

this will update apt with all the package lists and tell it about the new packages available

now you can type

apt-get upgrade

and this will update your system with the latest versions of the packages you can say yes to the questions, one of which is do you wish to continue without verification, this is because the original repo creator has not yet gotten around to creating GPG keys for the repo yet. its safe to say yes at this stage

for me and i suspect for all users it will update all your php packages with the latest 5.2.11 (at time of writing) from dotdeb
but not mysql. i am not quite sure why this is the case but it may be because the virtual packages are already installed so you have to “reinstall” them to update them to the new ones.

BEFORE you do this however, if like me you like to retain your current config files and then merge changes down to it rather than make your tweaks to a new file you will hit a bug, the latest version of mysql has now fully stopped supporting Berkeley databases, in the 5.0.51a release with debian this support is disabled which is fine but if you try to update, mysql will fail to start and therefore error out your upgrade/install because it reads an invalid configuration (but it doesnt tell you this when it happens). all you have to do is edit your mysql config file (most commonly found on debian in /etc/mysql/my.cnf) and comment out the line

skip-bdb

as the latest version of mysql doesnt support it, now you should be able to run

apt-get install mysql-server mysql-client

to reinstall the packages from the new 5.1 branch from dotdeb with no problems at all

some quirks from this though

in order to prevent against segfaults with apache the php5-mysql module has been compiled against the old mysql libraries this means that php will report your mysql client as 5.0.51a where it is actually 5.1.41 (at time of writing) this shouldnt cause any problems and i have only seen so far that phpmyadmin complains but doesnt have any problems.

also apache is not yet included in the repository, neither is lighttpd or nginx, hopefully this will change soon and the above quirk will no longer be seen

if you want php5.3 its currently stored in a seperate repository because the author thinks that its still too early days to be using php 5.3 widely on production servers personally i think this a good call but if you want to use php 5.3 you will need to add the following repos as well as the basic ones

deb http://php53.dotdeb.org stable all
deb-src http://php53.dotdeb.org stable all

for more info regarding php5.3 and dotdeb check here: http://www.dotdeb.org/2009/11/30/php-5-3-1-packages-for-debian-lenny-theyre-here/