Ubuntu installs PHP5.6--PHP7 using Apt-get install

Source: Internet
Author: User
Tags curl mcrypt xsl

Add source using PPA:
$ sudo apt-get install python-software-properties$ sudo add-apt-repository ppa:ondrej/php$ sudo apt-get update$ sudo apt-g ET install-y php7.0 php7.0-mysql php7.0-curl Php7.0-json php7.0-cgi

You can then view the PHP version:
Php-v

About the php5.4--php5.6 version
$ sudo apt-get install python-software-properties$ sudo add-apt-repository ppa:ondrej/php$ sudo apt-get update$ sudo apt-g Et-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 ph P5.6-zip

See the PHP7 Extension


Or you can install the source code
1. Download the PHP7 source package
2.TAR-ZXVF Decompression

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. If you get an error, what dependencies are missing, just one installation

Ubuntu installs PHP5.6--PHP7 using Apt-get install

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.