织梦CMS - 轻松建站从此开始!

文档之家-IT技术文档共享平台

Ubuntu/Debian_php downgrading

时间:2016-08-09 17:20来源:未知 作者:admin 点击:
#!/bin/sh #this scripts used to downgrading php5.3 to php5.2 echo start remove the PHP 5.3 packages from your system sudo aptitude purge `dpkg -l | grep php| awk '{print $2}' |tr \n ` echo start Clean the cache just to be rm -f /var/cache/

 #!/bin/sh

 
#this scripts used to downgrading php5.3 to php5.2
 
echo "start remove the PHP 5.3 packages from your system"
sudo aptitude purge `dpkg -l | grep php| awk '{print $2}' |tr "\n" " "`
 
echo "start Clean the cache just to be"
rm -f /var/cache/apt/archives/php5*
 
echo "Use Karmi. for PHP packages"
echo -e "Package: php5\nPin: release v=karmic\nPin-Priority: 991\n" | sudo tee /etc/apt/preferences.d/php > /dev/null
apt-cache search php5-|grep php5-|awk '{print "Package:", $1,"\nPin: release v=karmic\nPin-Priority: 991\n"}'|sudo tee /etc/apt/preferences.d/php > /dev/null
 
echo "swap to /etc/apt"
cd /etc/apt
 
echo "backup source.list and import new source.list"
cp sources.list sources.list.bak
echo "deb http://old-releases.ubuntu.com/ubuntu/ karmic main universe multiverse restricted" > sources.list
echo "deb-src http://old-releases.ubuntu.com/ubuntu/ karmic main universe multiverse restricted" >> sources.list
echo " " >> sources.list
echo "deb http://old-releases.ubuntu.com/ubuntu/ karmic-updates main universe multiverse restricted" >> sources.list
echo "deb-src http://old-releases.ubuntu.com/ubuntu/ karmic-updates main universe multiverse restricted" >> sources.list
echo " " >> sources.list
echo "deb http://old-releases.ubuntu.com/ubuntu/ karmic-security main universe multiverse restricted" >> sources.list
echo "deb-src http://old-releases.ubuntu.com/ubuntu/ karmic-security main universe multiverse restricted" >> sources.list
 
echo "update source.list"
apt-get update
(责任编辑:admin)
织梦二维码生成器
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 验证码:点击我更换图片
栏目列表
推荐内容