一、下載:php
git clone -b 2.0.0 https://github.com/phalcon/cphalcon.git
git clone https://github.com/phalcon/zephir.git
git clone https://github.com/json-c/json-c.git
二、安裝zephir: http://zephir-lang.com/install.htmlhtml
1)安裝re2cgit
wget http://downloads.sourceforge.net/project/re2c/re2c/0.13.7.5/re2c-0.13.7.5.tar.gz tar xzf re2c-0.13.7.5.tar.gz cd re2c-0.13.7.5 ./configure make && make install
2)安裝github
先肯定shell
ln -sv /usr/local/php5.5.14/bin/phpize /usr/local/bin/phpize ln -sv /usr/local/php5.5.14/bin/php /usr/local/bin/php ln -sv /usr/local/php5.5.14/bin/php-config /usr/local/bin/php-config
cd zephir ./install-json ./install -c
三、phalcon安裝json
cd cphalcon ../zephir/bin/zephir generate ../zephir/bin/zephir compile or zephir generate zephir compile
四、複製cphalcon/ext/modules下的擴展到php中便可。mvc
五、可能出現的報錯:.net
Warning: Class "APCIterator" does not exist at compile time in /root/solf/phalcon/cphalcon/phalcon/cache/backend/apc.zep on 224 [nonexistent-class] apc = new \APCIterator("user", prefixPattern); ------------------------------------------------^
緣由:https://github.com/phalcon/cphalcon/issues/2910#issuecomment-59255813code
Warning: Function "phalcon_orm_singlequotes" does not exist at compile time in /root/solf/phalcon/cphalcon/phalcon/mvc/model/query.zep on 513 [nonexistent-function] let escapedValue = phalcon_orm_singlequotes(value); ---------------------------------------------------------^
緣由:未知
orm