安装 ============ PHP extensions require a slightly different installation method to a traditional php-based library or framework. You can either download a binary package for the system of your choice or build it from the sources. During the last few months, we have extensively researched PHP's behavior, investigating areas for significant optimizations (big or small). Through understanding of the Zend Engine, we managed to remove unecessary validations, compacted code, performed optimizations and generated low-level solutions so as to achieve maximum performance from Phalcon. .. highlights:: Phalcon compiles from PHP 5.3.1, but due to old PHP bugs causing memory leaks, we highly recommend you to use at least PHP 5.3.11 or greater. Windows ------- 在windows上安装任何扩展都是很简å•的,安装phalconä¹Ÿæ˜¯ä¸€æ ·ï¼Œä¸‹è½½.dll文件,放到extension目录,然åŽä¿®æ”¹php.iniæ–‡ä»¶ï¼ŒåŠ å…¥ä»¥ä¸‹è¡Œï¼š extension=php_phalcon.dll é‡å¯web server. ä»¥ä¸‹è§†é¢‘æ˜¯æ•™ä½ å¦‚ä½•ä¸€æ¥ä¸€æ¥åœ¨windows上安装phalcon .. raw:: html <div align="center"><iframe src="http://player.vimeo.com/video/40265988" width="500" height="266" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></div> Related Guides ^^^^^^^^^^^^^^ .. toctree:: :maxdepth: 1 xampp wamp Unix/Linux ---------- 在Unix/Linuxæ“ä½œç³»ç»Ÿä¸Šï¼Œä½ å¯ä»¥å¾ˆå®¹æ˜“的从æºä»£å‹ç¼–译和安装扩展 Requirements ^^^^^^^^^^^^ Prerequisite packages are: * PHP 5.x development resources * GCC compiler (Linux) or Xcode (Mac) * Git (if not already installed in your system - unless you download the package from GitHub and upload it on your server via FTP/SFTP) .. code-block:: bash #Ubuntu sudo apt-get install php5-dev php5-mysql gcc sudo apt-get install git-core #Suse yast2 -i php5-pear php5-dev php5-mysql gcc yast2 -i git-core Compilation ^^^^^^^^^^^ Creating the extension: .. code-block:: bash git clone git://github.com/phalcon/cphalcon.git cd cphalcon/build ./install (译者备注)./install其实是默认包å«äº†phpize,configure,make,make install命令。如果您的机器ä¸phpize,php-configä¸åœ¨çŽ¯å¢ƒå‘½ä»¤ä¸ï¼Œè¯·æ‰§è¡Œä»¥ä¸‹æ“作åŽå†æ‰§è¡Œ./install .. code-block:: bash ln -s phpdir/bin/phpize /usr/bin ln -s phpdir/bin/php-cofnig /usr/bin phpdiræ˜¯ä½ çš„php安装路径。 编辑php.iniæ–‡ä»¶ï¼ŒåŠ å…¥æ‰©å±• .. code-block:: bash extension=phalcon.so é‡å¯web server,如果是php-fpm,é‡å¯php-fpmå³å¯ FreeBSD ^^^^^^^ A port is available for FreeBSD. Just only need these simple line commands to install it: .. code-block:: bash pkg_add -r phalcon or .. code-block:: bash export CFLAGS="-O2 -fno-delete-null-pointer-checks" cd /usr/ports/www/phalcon && make install clean Installation Notes ^^^^^^^^^^^^^^^^^^ Installation notes for Web Servers: .. toctree:: :maxdepth: 1 apache nginx