配置 php-fpm 并 安装 ionCube7.2

https://www.digitalocean.com/community/tutorials/how-to-configure-apache-http-with-mpm-event-and-php-fpm-on-ubuntu-18-04-fr

https://wetopi.com/install-ioncube-loader/


配置 php-fpm

sudo systemctl stop apache2
sudo a2dismod php7.2
sudo a2dismod mpm_prefork
sudo a2enmod mpm_event
sudo apt install php-fpm
sudo apt install libapache2-mod-fcgid
sudo a2enconf php7.2-fpm
sudo a2enmod proxy
sudo a2enmod proxy_fcgi
sudo apachectl configtest
// Output
// Syntax OK
sudo systemctl restart apache2
sudo apachectl -M | grep 'mpm'
// Output
// mpm_event_module (shared)
sudo apachectl -M | grep 'proxy'
// Output
// proxy_module (shared)
// proxy_fcgi_module (shared)
// check phpinfo.php
<?php
phpinfo();
?>

配置 php-fpm 最大文件

// 加入 .htaccess 文件
<Files ".user.ini">
    Require all denied
</Files>
sudo vim .user.ini
// 加入 .user.ini 文件
upload_max_filesize="5M"
post_max_size="5M"
// 重启服务
sudo service php7.2-fpm restart

安装 ionCube7.2

cd /tmp
wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar -xvzf ioncube_loaders_lin_x86-64.tar.gz
----
// Add the ionCube Loader php extension
php -i | grep extension_dir
// output dir [path]
cd ioncube
sudo cp ioncube_loader_lin_7.2.so [path]
php -i | grep 'additional .ini files'
// output [path]
----
sudo vim /etc/php/7.2/fpm/php.ini
// add one line
zend_extension=ioncube_loader_lin_7.2.so
// restart php-fpm sercive
sudo service php7.2-fpm restart

 


欢迎大家关顾我的Facebook主页「Y Life Book」以及我的公众微信号「不点语书」,我们下期见。

Leave a Comment

Your email address will not be published.