今天安装cacti发现需要php sockets扩展,而现在的lnmp没有安装,于是想到了phpzie工具安装扩展,安装方法如下:
- cd php-5.3.8/ext/sockets/
- /usr/local/php/bin/phpize
- ./configure --enable-sockets --with-php-config=/usr/local/php/bin/php-config
- make
- make install
接着在/etc/php.ini添加加载扩展代码:
- extension=sockets.so
service php-fpm reload或service httpd reload
转载请标明文章来源:《https://www.centos.bz/2012/01/php-sockets-extension-install/