Home > php教程 > php手册 > 升级PHP至5.4(ubuntu 12.04)

升级PHP至5.4(ubuntu 12.04)

WBOY
Release: 2016-06-06 20:12:42
Original
1200 people have browsed it

当前的虚拟机是12.04的系统,默认的PHP只有5.3.x,因为想用Trait的功能,所以就想升级了。结果。。。死活升不上。于是找了点资料,发现只要三句话: sudo?add-apt-repository?ppa:ondrej/php5?? sudo?apt-get?update?? sudo?apt-get?upgrade 三句话一运行,

当前的虚拟机是12.04的系统,默认的PHP只有5.3.x,因为想用Trait的功能,所以就想升级了。结果。。。死活升不上。于是找了点资料,发现只要三句话:

    sudo?add-apt-repository?ppa:ondrej/php5??
    sudo?apt-get?update??
    sudo?apt-get?upgrade
Copy after login

三句话一运行,世界就清静多了。只是原来自己装的一些组件就要重新编译了:redis,mongo,gearman,还有APC。因为extension_dir换了位置了。也不能直接将那些so文件拷过来。怕不正常,反正重编译一下也很快。。

如果你喜欢自己编译,也可以看这篇:https://gist.github.com/ziadoz/3130816

本文出自:http://neatstudio.com/, 原文地址:http://neatstudio.com/show-2414-1.shtml, 感谢原作者分享。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template