The Linux compiler installs the PHP libevent extension method, implements the high Performance Network service in the PHP programming, needs the support of the Libevent extension Library, this article installs the Libevent Extension Library by compiling the source code way. PHP writes high-performance network services that require the installation of libevent extensions. 1. Download libevent extension: http://pecl.php.net/package/libevent 2. After decompression, start compiling $ cd libevent-version$/usr/local/php/bin/phpize$./configure--with-php-config=/usr/local/php/bin/php-configError indicating that the RE2C version is too low. Re2c,php's lexical parser, official website: http://re2c.org/, download the latest version, compile and complete. Continue compiling the PHP extension just now, still error error:cannot find libevent headers Until here, must not find Libevent directory, local check whether the libevent installed, finally found in a directory libevent-2.0.12-stable directory. 3, if not installed, the first need to install libevent. wget Http://cloud.github.com/downloads/libevent/libevent/libevent-2.0.20-stable.tar.gztar ZXVF LIBEVENT-2.0.20-STABLE.TAR.GZCD libevent-2.0.20-stable/./configure--prefix=/usr/local/libevent-2.0.20-stable/ Makemake INSTALLCD. /4. Continue compiling extensions $ cd libevent-0.0.5$/usr/local/php/bin/phpize$./configure--with-php-config=/usr/local/php/bin/php-config-- with-libevent=/usr/local/libevent-2.0.20-stable$ make && make installThis compilation has passed. |