[root@localhost ~]# wget https://github.com/laruence/yaf/archive/refs/heads/master.zip
[root@localhost ~]# unzip master.zip
[root@localhost yaf-master]# cd yaf-master/
[root@localhost yaf-master]# /usr/local/php/bin/phpize
Configuring for:
PHP Api Version: 20170718
Zend Module Api No: 20170718
Zend Extension Api No: 320170718
[root@localhost yaf-master]#
[root@localhost yaf-master]# ./configure --with-php-config=/usr/local/php/bin/php-config
[root@localhost yaf-master]# make && make install
[root@localhost yaf-master]# vim /usr/local/php/etc/php.ini
添加 extension=yaf 后重启php-fpm
[root@localhost yaf-master]# cd tools/cg/
[root@localhost cg]# php yaf_cg -d Demo
[root@localhost cg]# ll
total 8
drwxr-xr-x. 4 root root 72 Nov 11 17:30 Demo
-rw-r--r--. 1 root root 239 Jul 7 11:06 README.md
drwxr-xr-x. 4 root root 101 Jul 7 11:06 templates
-rwxr-xr-x. 1 root root 3967 Jul 7 11:06 yaf_cg