QQWry 是一个php扩展,这个扩展的作用,就是根据ip来获取纯真数据库(QQWry.Dat)的地址信息。我们通常使用pecl来安装qqwry,我们安装pecl需要安装pear。pear是PHP扩展与应用库,它是一个PHP扩展与应用的一个仓库。
我们先来安装pear:
1.http://pear.php.net/go-pear.phar下载最新的go-pear。
#php go-pear.phar
PHP Warning: Module ‘apc‘ already loaded in Unknown on line 0
Below is a suggested file layout for your new PEAR installation. To
change individual locations, type the number in front of the
directory. Type ‘all‘ to change all of them or simply press Enter to
accept these locations.
1. Installation base ($prefix) : /usr
2. Temporary directory for processing : /tmp/pear/install
3. Temporary directory for downloads : /tmp/pear/install
4. Binaries directory : /usr/bin
5. PHP code directory ($php_dir) : /usr/share/pear
6. Documentation directory : /usr/docs
7. Data directory : /usr/data
8. User-modifiable configuration files directory : /usr/cfg
9. Public Web Files directory : /usr/www
10. Tests directory : /usr/tests
11. Name of configuration file : /etc/pear.conf
1-11, ‘all‘ or Enter to continue: all
Installation base ($prefix) [/usr] :
Temporary directory for processing [/tmp/pear/install] :
Temporary directory for downloads [/tmp/pear/install] :
Binaries directory [$prefix/bin] :
PHP code directory ($php_dir) [$prefix/share/pear] :
Documentation directory [$prefix/docs] :
Data directory [$prefix/data] :
User-modifiable configuration files directory [$prefix/cfg] :
Public Web Files directory [$prefix/www] :
Tests directory [$prefix/tests] :
Name of configuration file [/etc/pear.conf] :
Below is a suggested file layout for your new PEAR installation. To
change individual locations, type the number in front of the
directory. Type ‘all‘ to change all of them or simply press Enter to
accept these locations.
1. Installation base ($prefix) : /usr
2. Temporary directory for processing : /tmp/pear/install
3. Temporary directory for downloads : /tmp/pear/install
4. Binaries directory : /usr/bin
5. PHP code directory ($php_dir) : /usr/share/pear
6. Documentation directory : /usr/docs
7. Data directory : /usr/data
8. User-modifiable configuration files directory : /usr/cfg
9. Public Web Files directory : /usr/www
10. Tests directory : /usr/tests
11. Name of configuration file : /etc/pear.conf
1-11, ‘all‘ or Enter to continue: all
Installation base ($prefix) [/usr] :
Temporary directory for processing [/tmp/pear/install] :
Temporary directory for downloads [/tmp/pear/install] :
Binaries directory [$prefix/bin] :
PHP code directory ($php_dir) [$prefix/share/pear] :
Documentation directory [$prefix/docs] :
Data directory [$prefix/data] :
User-modifiable configuration files directory [$prefix/cfg] :
Public Web Files directory [$prefix/www] :
Tests directory [$prefix/tests] :
Name of configuration file [/etc/pear.conf] :
Below is a suggested file layout for your new PEAR installation. To
change individual locations, type the number in front of the
directory. Type ‘all‘ to change all of them or simply press Enter to
accept these locations.
1. Installation base ($prefix) : /usr
2. Temporary directory for processing : /tmp/pear/install
3. Temporary directory for downloads : /tmp/pear/install
4. Binaries directory : /usr/bin
5. PHP code directory ($php_dir) : /usr/share/pear
6. Documentation directory : /usr/docs
7. Data directory : /usr/data
8. User-modifiable configuration files directory : /usr/cfg
9. Public Web Files directory : /usr/www
10. Tests directory : /usr/tests
11. Name of configuration file : /etc/pear.conf
1-11, ‘all‘ or Enter to continue:
Beginning install...
2.至此,pear安装完毕,我们就可以安装qqwry了。
#pecl install qqwry-beta
修改php配置文件,将该模块写入。
#vim /etc/php.ini
extension=qqwry.so
3.qqwry就安装好了,这时需要重启httpd服务。
#service httpd restart
使用pecl安装qqwry