ubuntu 使用apt-get install 安装php5.6--php7
2018-01-16 17:03
696 查看
使用ppa增加源:
$ sudo apt-get install python-software-properties $ sudo add-apt-repository ppa:ondrej/php $ sudo apt-get update $ sudo apt-get install -y php7.0 php7.0-mysql php7.0-curl php7.0-json php7.0-cgi
然后可以查看php版本:
php -v
关于php5.4--php5.6版本
$ sudo apt-get install python-software-properties $ sudo add-apt-repository ppa:ondrej/php $ sudo apt-get update $ sudo apt-get -y install php5.6 php5.6-mcrypt php5.6-mbstring php5.6-curl php5.6-cli php5.6-mysql php5.6-gd php5.6-intl php5.6-xsl php5.6-zip
查看php7的扩展
sudo apt-cache search php7-*
或者可以源码安装
1.下载php7的源码包
2.tar -zxvf 解压
3.安装一些依赖
sudo apt-get install php5-mcrypt libmcrypt-dev
sudo apt-get install libxslt-dev libxml2-dev
4./configure --prefix=/zhou.data/php/php7 --enable-maintainer-zts -with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-mhash --with-openssl --with-zlib --with-bz2 --with-curl --with-zlib --enable-mbstring --with-mcrypt --enable-sockets --with-xsl --enable-zip --with-pear --enable-session --enable-xml --enable-shared --enable-bcmath --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-mbregex --enable-pcntl --with-xmlrpc
5.make && make install
6.如果报错,缺少哪些依赖,就一次安装即可
相关文章推荐
- ubuntu 使用apt-get install 安装php5.6--php7
- ubuntu 使用apt-get install 安装php5.6--php7
- ubuntu 使用apt-get install 安装php5.6--php7
- ubuntu 使用apt-get install 安装php5.6--php7
- ubuntu 使用apt-get install 安装php5.6--php7
- ubuntu使用apt get install 安装nginx和php-fpm
- Ubuntu下使用 apt-get install 安装php扩展库mcrypt、curl、gd
- Ubuntu使用apt-get install 安装软件时报错:could not get lock /var/lib/dpkg/lock -open
- ubuntu 使用apt-get 升级php5.4到 php5.6
- ubuntu中使用apt-get install时如何指定安装版本
- 在ubuntu中使用apt-get install 安装软件时出现无法获得锁
- ubuntu使用”apt-get install“安装程序时遇到错误提示: you might want to run 'apt-get -f install' to correct these
- 重装Ubuntu 14.04后使用apt-get安装build-essential(即sudo apt-get install build-essential)时出现包依赖项问题的解决方法
- Ubuntu使用apt-get install下载安装一些软件包的时候连接不到cn.archive.ubuntu.com
- Ubuntu使用命令安装jdk失败的解决方案--sudo apt-get install sun-java6-jdk
- Ubuntu使用命令安装jdk失败的解决方案--sudo apt-get install sun-java6-jdk
- Ubuntu 下使用apt-get install安装mysql的目录及一些配置
- Ubuntu使用命令安装jdk失败的解决方案--sudo apt-get install sun-java6-jdk
- ubuntu 上apt-get 安装 php5.6过程和nginx php-fpm 502 问题
- ubuntu中使用apt-get install时如何指定安装版本