Question
How to install Phalcon framework for a PHP supplied by Plesk?
Answer
Note: Such kind of setup is not possible to set via Plesk Interface and this task should be performed by a system administrator via SSH.
Before performing the following actions make sure that required packages such a 'git' or 'build-essential' are installed and functioning properly.
Connect to the server via SSH.
Install the following packages and their dependencies.
For RHEL/CentOS/CloudLinux:
# yum install plesk-php*-devel pcre-devel gcc make
For Debian/Ubuntu:
# apt-get install plesk-php*-dev
Clone phalcon git repo
# git clone -b '3.4.x' git://github.com/phalcon/cphalcon.git
Go to cphalcon/build folder:
# cd cphalcon/build
Run 'install' binary with appropriate options:
# ./install --phpize /opt/plesk/php/7.0/bin/phpize --php-config /opt/plesk/php/7.0/bin/php-config
Note: Pay attention to paths to
phpize
andphp-config
specified in the command. If you install phalcon for some other PHP version, path should be set properly.Create
/opt/plesk/php/7.0/etc/php.d/phalcon.ini
configuration file with the following content:# echo 'extension=phalcon.so > /opt/plesk/php/7.0/etc/php.d/phalcon.ini
Make sure phalcon module is loaded fine.
# /opt/plesk/php/7.0/bin/php -m | grep phalcon
phalcon
For more details refer to official guide by Phalcon Framework: https://github.com/phalcon/cphalcon
Không có nhận xét nào:
Đăng nhận xét