Phalcon是一個用C實現的擴展,因此您能夠下載適合您機器的二進制格式文件或者使用源代碼進行編譯。php
若是要再Unbuntu上安裝Phalcon,請按照如下步驟操做:python
sudo apt-add-repository ppa:phalcon/stable sudo apt-get update sudo apt-get install php5-phalcon
If you wish to install the legacy version of Phalcon (1.x) use the following PPA:mysql
sudo apt-add-repository ppa:phalcon/legacy
若是你沒有apt-add-repository請執行如下command:git
# Ubuntu 14.04+ sudo apt-get install software-properties-common # Ubuntu 12.04 sudo apt-get install python-software-properties
Linux下,使用源代碼編譯安裝是很方便的。github
咱們須要提早安裝一些庫:web
PHP 5.x 開發工具包sql
GCC 編譯器服務器
#Ubuntu sudo apt-get install php5-dev php5-mysql gcc libpcre3-dev #Fedora sudo yum install php-devel php-mysqlnd gcc libtool #RHEL sudo yum install php-devel php-mysql gcc libtool #Suse yast2 -i php5-pear php5-devel php5-mysql gcc #OS X (Using Homebrew) brew tap homebrew/dupes brew tap homebrew/versions brew tap homebrew/php brew install php5x php5x-phalcon # Where "x" - minor number of PHP
1. 從C源代碼建立擴展請按照下面的步驟:工具
git clone --depth=1 git://github.com/phalcon/cphalcon.git cd cphalcon/build sudo ./install
2. 添加擴展到php.ini文件:開發工具
extension=phalcon.so
3. 最後,重啓web服務器