Phalcon is a high performance Php framework with MVC support. Its is very useful framework for developing dynamic applications rapidly. This article will help you install and enable Phalcon php framework in CentOS, Redhat and Fedora Systems.
Install Required Packages
To start with Phalcon Project, we first need to setup a running LAMP server. If you have already running LAMP stack skip this step else use followings commands to setup lamp stack.
Install Apache
# yum --enablerepo=remi,epel install httpd
Install MySQL
# yum --enablerepo=remi,epel install mysql-server # service mysqld start # /usr/bin/mysql_secure_installation
Install PHP
# yum --enablerepo=remi,epel install php php-mysql gcc libtool # service httpd restart
Install Phalcon PHP Framework
Now download latest source code from Github and build it using following commands. You will required to have git installed on your system.
$ cd /opt/ $ git clone https://github.com/phalcon/cphalcon.git $ cd cphalcon/build $ sudo ./install
Enable Phalcon php extension in your system.
$ echo "extension=phalcon.so" > /etc/php.d/phalcon.ini $ service httpd reload
Verify Phalcon
Before proceeding for development, make sure phalcon php framework has been successfully installed with your php.
Create a info.php on your web document root with following content and access it in browser.
<?php phpinfo(); ?>
You will see output like below.
Create Project with Phalcon
As you have successfully installed phalcon php extension in your system. Lets visit below url to install Phalcon Developer Tools for creating project and add components in project.
https://tecadmin.net/creating-project-with-phalcon-developer-tools-in-linux/
3 Comments
Little tip, if you are using php70 and can’t install phalcon for missing php-config, install: php70-devel
Many, many years ago, package managers were invented!
However, many people, up to now, write howto for not package managment distributions.
This howto NOT FOR CENTOS. This for linux from scratch.
Cool, Phalcon some reason my Windows refused to install. Gave an error, look under the Linux