Centos5.6 Yum Install new php7.0

Source: Internet
Author: User
Tags bz2 fpm gettext gmp spl openssl zend install redis

These two days again installed the virtual machine, but also compile lnmp, and to get all kinds of expansion, very troublesome, can directly yum installation. The answer is yes. 1, the first to update Yum source, otherwise it must be the old version, generally under 5.6, but PHP7 have been out for a long time, more than 50% performance.

According to the system update Yum source, my is centos7, so I run the following code.

Centos/rhel 7.x:

RPM-UVH https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
RPM-UVH https:// mirror.webtatic.com/yum/el7/webtatic-release.rpm
If it is CENTOS6, then execute the following code:
Centos/rhel 6.x:
RPM-UVH https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
RPM-UVH https:// mirror.webtatic.com/yum/el6/latest.rpm
Then you can directly yum install php7.0, you can install the expansion as follows:

Yum install Php70w-common php70w-fpm php70w-opcache php70w-gd php70w-mysqlnd php70w-mbstring Php70w-pecl-redis Php70w-pecl-memcached Php70w-devel

With this command, you can install the following extensions.

Php-api, php-bz2, Php-calendar, Php-ctype, Php-curl, Php-date, Php-exif, Php-fileinfo, Php-filter, Php-ftp, Php-gettext, Php-gmp, Php-hash, Php-iconv, Php-json, Php-libxml, Php-openssl, Php-pcre, Php-pecl-fileinfo, Php-pecl-phar, Php-pecl-zip, Php-reflection, Php-session, Php-shmop, Php-simplexml, Php-sockets, PHP-SPL, Php-tokenizer, Php-zend-abi , Php-zip, Php-zlib

Let's get excited. Don't worry, there are more cows. Generally have to install memcached,gd,mysql, and so on is it.

Installation package offers extension php70w mod_php, php70w-zts php70w-bcmath php70w-cli php-cgi, Php-pcntl, Php-readli Ne php70w-common php-api, php-bz2, Php-calendar, Php-ctype, Php-curl, Php-date, Php-exif, Php-fileinfo, Php-filter, php- FTP, Php-gettext, Php-gmp, Php-hash, Php-iconv, Php-json, Php-libxml, Php-openssl, Php-pcre, Php-pecl-fileinfo, Php-pecl-phar, Php-pecl-zip, Php-reflection, Php-session, Php-shmop, Php-simplexml, Php-sockets, PHP-SPL, php-tokenize R, Php-zend-abi, Php-zip, php-zlib php70w-dba php70w-devel php70w-embedded php-embedded-devel Php70w-enc Hant php70w-fpm php70w-gd php70w-imap php70w-interbase php_database, Php-firebird php70w-in TL Php70w-ldap php70w-mbstring php70w-mcrypt php70w-mysql php-mysqli, Php_database Php70w-mys
Qlnd php-mysqli, Php_database php70w-odbc php-pdo_odbc, php_database php70w-opcache Php70w-pecl-zendopcache Php70w-pdo Php70w-pdo_sqlite,Php70w-sqlite3 php70w-pdo_dblib php70w-mssql php70w-pear PHP70W-PECL-APCU Php70w-pecl-imagick -memcached php70w-pecl-mongodb Php70w-pecl-redis php70w-pecl-xdebug php70w-pgsql php-pdo_pgsql, Php_databa Se php70w-phpdbg php70w-process php-posix, php-sysvmsg, Php-sysvsem, Php-sysvshm Php70w-pspell Ecode php70w-snmp php70w-soap php70w-tidy php70w-xml php-dom, Php-domxml, PHP-WDDX, PHP    70w-xmlrpc

For example, if you want to add XML, then you can directly, do not doubt it is so simple:
Yum Install Php70w-xml
2, test the results:

Check out the PHP version:

Php-v


Check out PHP Extensions:
Php-m

See it. It's basically going to go with the expansion. It's good to yum yourself. There is no need to dwell on the problems of dependency.

Use domestic yum Source: http://blog.csdn.net/zhezhebie/article/details/73484695
Install Redis and memcached, direct yum installation:

Yum install-y memcached Redis

Memcached Description: http://blog.csdn.net/zhezhebie/article/details/73471519
Redis Description: http://blog.csdn.net/zhezhebie/article/details/73470134

It's not over yet, you need to configure the PHP profile and the Nginx configuration file.
Reference Link: http://php.net/manual/en/install.unix.nginx.php

Webtatic Reference Link: https://webtatic.com/packages/php70/

Configure the PHP parsing. php File:
http://php.net/manual/en/install.unix.nginx.php

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.