yaf3.xx require more than php7 environment.
Step 1: Configure php7
Lnmp find the location of the installation package
Excuting an order
./install.sh mphp
There, we choose PHP7.2
At this point we see, it will be more of a php folder
# whereis php
php: /usr/bin/php /usr/local/php /usr/local/php7.2
A second step of yaf module configuration php7.2
Not before loading
# /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
zlib
[Zend Modules]
We can see that there is no yaf module, nor redis module.
Let's start the installation yaf module.
- Download yaf
sudo wget https://github.com/laruence/yaf/archive/yaf-3.0.9.tar.gz
- Decompression
sudo tar -zvxf yaf-3.0.9.tar.gz
- Entering and processing phpize
cd yaf-yaf-3.0.9 && /usr/local/php7.2/bin/phpize
- Compile
./configure --with-php-config=/usr/local/php7.2/bin/php-config
- installation
make && make install
- Test wave
make test
- Open some functions shell_exec, proc_get_status, proc_open
vim /usr/local/php7.2/etc/php.ini
- Increase ini configuration
extension = "yaf.so"
- Restart lnmp
# lnmp restart
+-------------------------------------------+
| Manager for LNMP, Written by Licess |
+-------------------------------------------+
| https://lnmp.org |
+-------------------------------------------+
Stoping LNMP...
Stoping nginx... done
Shutting down MySQL.. SUCCESS!
Gracefully shutting down php-fpm . done
Gracefully shutting down php-fpm . done
Starting LNMP...
Starting nginx... done
Starting MySQL. SUCCESS!
Starting php-fpm done
Starting php-fpm done
At this viewing module
#/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]
We found that more than a yaf
A third step of redis module configuration php7.2
redis is necessary, many projects need to use
./addons.sh install redis
It's that simple!
# /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
redis
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
sqlite3
standard
sysvsem
tokenizer
xml
xmlreader
xmlrpc
xmlwriter
xsl
yaf
zlib
[Zend Modules]
Try to run the project
Configuring nginx
server
{
listen 80;
#listen [::]:80;
server_name xxx.com;
index index.html index.htm index.php;
root /home/wwwroot/default/official/tiger/public;
#error_page 404 /404.html;
include enable-php7.2.conf;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
location ~ /.well-known {
allow all;
}
location ~ /\.
{
deny all;
}
location / {
if (!-e $request_filename) {
rewrite ^(.*)$ /admin.php?s=$1 last;
break;
}
}
access_log /home/wwwlogs/access.official.log;
}
Restart lnmp
Nothing wrong. Environment to build ok!