您的位置:首页 > 编程语言 > PHP开发

ubuntu12.04 安装 php5.4/php5.5

2016-01-10 00:00 531 查看
1:修改源(我使用163的源)直接修改/etc/apt/sources.list

deb http://mirrors.163.com/ubuntu/ precise main universe restricted multiverse
deb-src http://mirrors.163.com/ubuntu/ precise main universe restricted multiverse
deb http://mirrors.163.com/ubuntu/ precise-security universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ precise-security universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ precise-updates universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ precise-proposed universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ precise-proposed universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ precise-backports universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ precise-backports universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ precise-updates universe main multiverse restricted

2:添加ppa源

$ apt-get install python-software-properties
$ add-apt-repository ppa:ondrej/php5 (php.5.5,若使用php5.4.x add-apt-repository ppa:ondrej/php5-oldstable)
$ apt-get update


3:安装php5.5(fpm+各个模块)

$ apt-get install php5-fpm
$ apt-get install php5-mysql php5-gd #还有其他扩展按需安装


4:安装 Nginx

$ apt-get install nginx
$ service nginx start #启动服务

5:安装MySQL

$ apt-get install mysql-server mysql-client


原文地址:
ubuntu12.04 安装 php5.4/php5.5

智能推荐

开启 NFS 文件系统提升 Vagrant 共享目录的性能

nginx处理问题笔记

virtualbox + ubuntu虚拟机 目录共享

OAuth的机制原理讲解及开发流程

Python 虚拟环境Virtualenv
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: