內容目录上一个主题下一个主题XAMPP 下的安装(Installation on XAMPP) > 本页 |
安装(Installation)¶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.
Windows¶To use phalcon on Windows you can download a DLL library. Edit your php.ini file and then append at the end:
Restart your webserver. The following screencast is a step-by-step guide to install Phalcon on Windows: Linux/Solaris/Mac¶On a Linux/Solaris/Mac system you can easily compile and install the extension from the source code: 基本要求(Requirements)¶Prerequisite packages are:
Specific packages for common platforms: #Ubuntu
sudo apt-get install gcc make git-core libpcre3-dev php5-dev
#Suse
sudo yast -i gcc make php5-devel
#or
sudo zypper install gcc make php5-devel
#CentOS/Fedora/RHEL
sudo yum install git gcc make pcre-devel php-devel
#Solaris
pkg install gcc-45 php-53 apache-php53
编译(Compilation)¶Creating the extension: git clone git://github.com/phalcon/cphalcon.git
cd cphalcon/build
sudo ./install
Add extension to your php configuration: #Ubuntu: Add this line in your php.ini
extension=phalcon.so
#Centos/RedHat: Add a file called phalcon.ini in /etc/php.d/ with this content:
extension=phalcon.so
Restart the webserver. Phalcon automatically detects your architecture, however, you can force the compilation for a specific architecture: sudo ./install 32bits
sudo ./install 64bits
sudo ./install safe
FreeBSD¶A port is available for FreeBSD. Just only need these simple line commands to install it: pkg_add -r phalcon
or export CFLAGS="-O2 -fno-delete-null-pointer-checks"
cd /usr/ports/www/phalcon && make install clean
安装说明(Installation Notes)¶Installation notes for Web Servers: |