~# wget http://pecl.php.net/get/libevent-0.1.0.tgz --2015-05-2621:43:40-- http://pecl.php.net/get/libevent-0.1.0.tgz Resolving pecl.php.net... 104.236.228.160 Connecting to pecl.php.net|104.236.228.160|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 9806 (9.6K) [application/octet-stream] Saving to: “libevent-0.1.0.tgz”
100%[=======================================================>] 9,80641.4K/s in 0.2s
2、解压扩展文件压缩包
1 2 3 4 5 6
~# tar -zxvf libevent-0.1.0.tgz package.xml libevent-0.1.0/config.m4 libevent-0.1.0/CREDITS libevent-0.1.0/libevent.c ....
3、进入到源码目录
1
~# cd libevent-0.1.0/
4、运行phpize命令
1 2 3 4 5
~# phpize Configuring for: PHP Api Version: 20090626 Zend Module Api No: 20090626 Zend Extension Api No: 220090626
5、运行configure命令
1 2 3 4 5 6 7
~# ./configure checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for a sed that does not truncate output... /bin/sed checking for cc... cc checking whether the C compiler works... yes ...
6、运行make命令
1 2
~# /bin/bash /data/test/libevent-0.1.0/libtool --mode=compile cc -I. -I/data/test/libevent-0.1.0 -DPHP_ATOM_INC -I/data/test/libevent-0.1.0/include ...
7、运行make install命令
1 2
~# make install Installing shared extensions: /usr/lib/php5/20090626/