ubuntu降级php(默认安装apache,php,mysql)
来源:互联网 发布:淘宝水滴工具箱 编辑:程序博客网 时间:2024/06/14 04:21
sudo apt-get install apache2sudo apt-get install mysql-serversudo apt-get install mysql-clientsudo apt-get install php5sudo apt-get install phpmyadminsudo apt-get install php5-mysqlsudo apt-get install libapache2-mod-php5sudo apt-get install php5-gdsudo apt-get install php5-commonsudo apt-get install php5-ffmpegsudo apt-get install php5-imagicksudo apt-get install php5-clisudo apt-get install php5-cgisudo apt-get install php-pearsudo apt-get install php5-xcachesudo apt-get install php5-devsudo apt-get install php5-memcachesudo apt-get install memcache
重启 apache
sudo /etc/init.d/apache2 restart
有时这两个比重起好
sudo /etc/init.d/apache2 stop
sudo /etc/init.d/apache2 start
卸载重新安装 sudo apt-get remove libapache2-mod-* apapace2* php5* --purge
win字符转linux需要安装dos2unix
php降级操作:
执行sh php.sh
#!/bin/bash# by Ruben Barkow (rubo77) http://www.entikey.z11.de/# Originally Posted by Bachstelze http://ubuntuforums.org/showthread.php?p=9080474#post9080474# OK, here's how to do the Apt magic to get PHP packages from the karmic repositories:echo "Am I root? "if [ "$(whoami &2>/dev/null)" != "root" ] && [ "$(id -un &2>/dev/null)" != "root" ] ; then echo " NO!Error: You must be root to run this script.Entersudo su" exit 1fiecho " OK";#install aptitude before, if you don`t have it:apt-get install aptitude# or if you prefer apt-get use:# alias aptitude='apt-get'# finish all apt-problems:aptitude updateaptitude -f install#apt-get -f install# remove all your existing PHP packages. You can list them with dpkg -l| grep phpPHPLIST=$(for i in $(dpkg -l | grep php|awk '{ print $2 }' ); do echo $i; done)echo these pachets will be removed: $PHPLIST # you need not to purge, if you have upgraded from karmic:aptitude remove $PHPLIST# on a fresh install, you need purge:# aptitude remove --purge $PHPLIST#Create a file each in /etc/apt/preferences.d like this (call it for example /etc/apt/preferences.d/php5_2);##Package: php5#Pin: release a=karmic#Pin-Priority: 991##The big problem is that wildcards don't work, so you will need one such stanza for each PHP package you want to pull from karmic:echo ''>/etc/apt/preferences.d/php5_2for i in $PHPLIST ; do echo "Package: $iPin: release a=karmicPin-Priority: 991">>/etc/apt/preferences.d/php5_2; done# duplicate your existing sources.list replacing lucid with karmic and save it in sources.list.d:#sed s/lucid/karmic/g /etc/apt/sources.list | sudo tee /etc/apt/sources.list.d/karmic.list# better exactly only the needed sources, cause otherwise you can get a cachsize problem:echo "# needed sources vor php5.2:deb http://old-releases.ubuntu.com/ubuntu/ karmic main restricteddeb-src http://old-releases.ubuntu.com/ubuntu/ karmic main restricteddeb http://old-releases.ubuntu.com/ubuntu/ karmic-updates main restricteddeb-src http://old-releases.ubuntu.com/ubuntu/ karmic-updates main restricteddeb http://old-releases.ubuntu.com/ubuntu/ karmic universedeb-src http://old-releases.ubuntu.com/ubuntu/ karmic universedeb http://old-releases.ubuntu.com/ubuntu/ karmic-updates universedeb-src http://old-releases.ubuntu.com/ubuntu/ karmic-updates universedeb http://old-releases.ubuntu.com/ubuntu/ karmic multiversedeb-src http://old-releases.ubuntu.com/ubuntu/ karmic multiversedeb http://old-releases.ubuntu.com/ubuntu/ karmic-updates multiversedeb-src http://old-releases.ubuntu.com/ubuntu/ karmic-updates multiversedeb http://old-releases.ubuntu.com/ubuntu karmic-security main restricteddeb-src http://old-releases.ubuntu.com/ubuntu karmic-security main restricteddeb http://old-releases.ubuntu.com/ubuntu karmic-security universedeb-src http://old-releases.ubuntu.com/ubuntu karmic-security universedeb http://old-releases.ubuntu.com/ubuntu karmic-security multiversedeb-src http://old-releases.ubuntu.com/ubuntu karmic-security multiverse" > /etc/apt/sources.list.d/karmic.listaptitude updateapache2ctl restartecho install new from karmic:aptitude -t karmic install $PHPLIST# at the end retry the modul libapache2-mod-php5 in case it didn't work the first time:aptitude -t karmic install libapache2-mod-php5apache2ctl restart
0 0
- ubuntu降级php(默认安装apache,php,mysql)
- Ubuntu下Apache、php、mysql默认安装路径
- Ubuntu下Apache、php、mysql默认安装路径
- Ubuntu下Apache、php、mysql默认安装路径
- Ubuntu下Apache、php、mysql默认安装路径
- Ubuntu下Apache、php、mysql默认安装路径
- Ubuntu安装php+apache+mysql
- ubuntu 安装mysql+apache+php
- Ubuntu安装php+apache+mysql
- Ubuntu安装 php + apache + mysql
- ubuntu安装apache+php+mysql
- ubuntu 安装apache- php- mysql
- Ubuntu安装 php + apache + mysql
- Ubuntu安装apache+php+mysql
- ubuntu 安装mysql+apache+php
- Ubuntu安装Apache+MySQL+PHP
- Ubuntu安装PHP,MySQL,Apache
- Ubuntu安装PHP Apache MySQL
- C/C++获取当前系统时间
- http://blog.csdn.net/xiancaifu/article/details/6076289
- linux 学习之路----编译
- 多区域显示(5)-粘贴为图片链接
- 四个步骤实现在ESRI ArcMap中加载17.6G离线卫星地图的方法
- ubuntu降级php(默认安装apache,php,mysql)
- .NET中string和StringBuilder的区别
- Python模块学习--random 随机数生成
- GIT 升级
- spring的事务的传播特性
- Intent和IntentFilter详解
- FCIP详解
- “黑马程序员” 用Java打印出九九乘法表
- 分数拆分