
As is known, the support of the 5th Debian ended a month and a half ago (in February) and it officially sunk into oblivion, i.e. archive archive.debian.org.
What to do next? - Many hosters thought. After all, switching to the 6th Debian is not so easy due to several factors:
1) Some control panels do not support it (at a minimum, the ISP Manager has its own oddities, although the developers have localized almost all the problems)
2) PHP 5.3 is available out of the box instead of the already familiar 5.2, which is fraught with the fact that many sites will stop working. One of the most unpleasant moments is the lack of the ereg function, which is used by a huge number of people in scripts, in informal modules to popular CMS (the latest versions of the CMS themselves are already compatible with it).
But no one stands still, much less looking back, and in any case, it is necessary to switch to the 6th one, so let's get started.
First, let's look at the transition itself. In principle, it occurred without surprises. I will describe:
')
1) Add the necessary repositories to /etc/sources.list:
# Squeeze deb http:
2) Update the package lists with the command:
# apt-get update
3) We update the operating system itself:
# apt-get dist-upgrade
Personally, everything went smoothly for me, but, as they say on the Internet, some splashy package may interfere, just in case, delete it before installation.
# apt-get purge splashy
Everything, we reboot and enjoy (hopefully) a fresh version of Debian.
The next step I mentioned above is PHP 5.2.
Let's get started The method, in principle, is trivial.
1) You need to remove PHP5. If it is installed (when upgrading, I think it has been updated for everyone):
# aptitude remove `dpkg -l | grepphp| awk '{print $2}' |tr "\n" " "`
2) Open our:
sources.list
Add a repository from lenny deb:
http:
3) Next, you need to prioritize the work of the apt service. Open:
# vi /etc/apt/preferences
And we write the following there:
Package: php5* Pin: release a=oldstable Pin-Priority: 700 Package: * Pin: release a=stable Pin-Priority: 600
4) Install php:
# apt-get update # apt-get -t oldstable install `dpkg -l | grep php5| awk '{print $2}' |tr "\n" " "`
Perhaps at this stage dependencies will come out, but they can be very easily fixed by installing the necessary ones.
5) Check the version and restart the Apache:
# dpkg -l | grep php5 # /etc/init.d/apache2 restart
This completes the installation.
This method was tested on a server with ISPManager and DebianLenny 5 - everything went fine.
If you plan to install the server from scratch, then installing php, in principle, only one step disappears - the removal of the old version. And so everything is saved.
Hopefully this article will help you!
Author: Roman Malinovsky, Head of Technical Support Services, Unlimits Telecom hosting project.
Original
article in English published on
slashdot.orgUPD: Thanks
tbicr for the found inaccuracy:
# apt-getpurgesplashy
Replace with:
# apt-get purge splashy
and
#aptitude remove `dpkg -l | grepphp| awk '{print $2}' |tr "\n" " "`
Replace with:
# aptitude remove `dpkg -l | grepphp | awk '{print $2}' |tr "\n" " "`