Linux安装yaf-3.0.X

安装yaf

tips:如果想用yaf-3.0的版本,请先安装php7,php5.6的只能用yaf-2.3.5

1、下载

sudo wget https://github.com/laruence/yaf/archive/yaf-3.0.9.tar.gz

2、解压

sudo tar -zvxf yaf-3.0.9.tar.gz

3、进入

cd yaf-yaf-3.0.9/

4、phpize

sudo /usr/local/php7.2/bin/phpize

5、编译

sudo ./configure --with-php-config=/usr/local/php7.2/bin/php-config

6、安装

sudo make && sudo make install

让shell_exec,proc_get_status,proc_open

sudo vim /usr/local/php7.2/etc/php.ini

7、增加ini配置

extension = "yaf.so"

8、重启lnmp

# sudo lnmp restart
+-------------------------------------------+
|    Manager for LNMP, Written by Licess    |
+-------------------------------------------+
|              https://lnmp.org             |
+-------------------------------------------+
Stoping LNMP...
Stoping nginx...  done
[ ok ] Stopping mysql (via systemctl): mysql.service.
Gracefully shutting down php-fpm . done
Gracefully shutting down php-fpm . done
Starting LNMP...
Starting nginx...  done
[ ok ] Starting mysql (via systemctl): mysql.service.
Starting php-fpm  done
Starting php-fpm  done

9、查看模块

# /usr/local/php7.2/bin/php -m
[PHP Modules]
bcmath
Core
ctype
curl
date
dom
filter
ftp
gd
gettext
hash
iconv
intl
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
sqlite3
standard
sysvsem
tokenizer
xml
xmlreader
xmlrpc
xmlwriter
xsl
yaf
zlib

[Zend Modules]

我们发现里面已经有了yaf

上一篇:PHPstorm支持YAF框架代码自动提示


下一篇:初始化一个yaf项目