Php7 How to install Yar extensions

Source: Internet
Author: User
This article mainly introduces the PHP7 installation Yar extension method, combined with the case form more detailed analysis of the PHP7 installation yar extension of the specific steps, related commands and considerations, the need for friends can refer to the next

Specific as follows:

Experience the RPC Framework Yar requires:

1. Install binary Package Protocol Msgpack

2. Installation Yar expansion and dependence

I. Installing the binary Packaging protocol Msgpack

1. There are many ways to install PHP extension packages, of course, nothing is more violent than pecl, before using this to confirm the existence of phpize

Find/-name Phpize

2. If Phpize does not exist

Yum Install Php-devel

3. Ok, first install Msgpack

PECL Install Msgpack

Installation skipped a whole bunch of compilation process, omitting ing only cares after a few lines

Build process completed successfullyinstalling '/usr/include/php/ext/msgpack/php_msgpack.h ' installing '/usr/lib64/ Php/modules/msgpack.so ' Install ok:channel://pecl.php.net/msgpack-0.5.6configuration option ' Php_ini ' isn't set to PHP.ini locationyou should add "extension=msgpack.so" to PHP.ini

The msgpack.so is automatically copied to the PHP extension library and the configuration is well written.

Two. Installing Yar

1. Download Yar

wget http://pecl.php.net/get/yar-2.0.0.tgz

2. Unzip the compilation

TAR-ZXVF YAR-2.0.0.TGZCD CD yar-2.0.0/usr/bin/phpize./configure--with-php-config=/usr/bin/php-config7.0*

Problems encountered:

Checking for CURL in default path ... not found
Configure:error:Please Reinstall the Libcurl distribution-easy.h should be in <curl-dir>/include/curl/

3. Installing Curl-devel

Yum-y Install Curl-develsudo apt-get Install Libcurl4-gnutls-dev

Ps:curl vs Curl-deval

Reference: http://stackoverflow.com/questions/4976971/compiling-php-with-curl-where-is-curl-installed

4. Installing Yar

Make && make install

5. Copy the yar.so to the PHP extension library

sudo cp yar.so/usr/lib/php/20151012/yar.so

6. Extending the Write configuration file

echo "extension=yar.so" >/etc/php/7.0/mods-available/yar.iniln-sf/etc/php/7.0/mods-available/yar.ini/etc/php/ 7.0/fpm/conf.d/20-yar.iniln-sf/etc/php/7.0/mods-available/yar.ini/etc/php/7.0/cli/conf.d/20-yar.ini

7. Restart PHP-FPM Nginx

Service PHP7.0-FPM Restartservice nginx restart

Ps:php-ir Query Phpinfo

Related recommendations:

Comprehensive analysis of PHP7 installation yar extension methods

What is yarn? How does yarn Replace the NPM management front-end project module dependencies?

Share a tutorial on installing swoole and Yar,yaf in PHP 7

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.