Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Install yaf Framework in CENTOS php 7.0 + nginx Environment

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

# php-vPHP 7.0.19 (cli) (built: May 12 2017 21:01:27) (NTS) Copyright (c) 1997-2017 The PHP GroupZend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies#nginx-vnginx version: nginx/1.12.0CentOS Linux release 7.2.1511 (Core)

The premise of this paper is that the php7.0+nginx environment has been set up.

1. First download the yaf source package, go to http://pecl.php.net/package/yaf, and download it. More than 3.0.2 requires php7.0 or above.

Let's download the source package of 3.0.4 stable version with the command.

Wgte http://pecl.php.net/get/yaf-3.0.4.tgz

2. Decompress

Tar-xvf yaf-3.0.4.tgz

3. Install the php-devel expansion package. Install php-devel required for 7. 0. The php version corresponding to the default yum install php-devel is 5. 3. 0. This is also a difference in 7.0.

Yum install php70w-devel

4. Enter the yaf installation directory

Phpize./coufiguremakemake install

There will be some problems, such as the lack of a C compiler, which can be searched and solved by yourself.

5. Configure php.ini. Add the following sentence to php.ini

Extension=yaf.so

6. Php-m to see if there is a yaf framework.

7. Restart php-fpm

Service php-fpm restart .

At this point, the yaf framework is installed.

Then we can use the code generation tool to generate a yaf demo.

Come to https://github.com/laruence/yaf to download the zip package and upload it to our server.

2. Enter the yaf directory tools/cg

3. Then / usr/local/php/bin/php yaf_cg sample. Sample is the name of the application we generated.

4. Put the sample folder in the root directory of the nginx website

/ data/www/sample

5. Visit locahost/sample

Appear

Hello World! I am Stranger

Success!

Referenc

Https://stackoverflow.com/questions/12325109/cant-install-php-devel-on-centos

Http://www.th7.cn/Program/php/201507/507424.shtml

Http://www.cnblogs.com/tomkissing/p/6250530.html

Http://www.cnblogs.com/findgor/p/4086502.html

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report