How to install the snmp extension in php: first enter the snmp folder under the ext folder; then set the configuration file; then compile through the "make && make install" command; finally add the module to the configuration file and restart Just serve.
Recommended: "PHP Video Tutorial"
Centos installation php snmp extension
1. Basic environment preparation
yum install net-snmp php-snmp net-snmp-devel
2. Enter the PHP source code package
3. Enter the snmp file in the ext folder Folder
4.Set the configuration file
phpize ./configure --with-php-config=/usr/local/php/bin/php-config --with-snmp
5.Compile
make && make install
6.Add the module to the configuration file
vi + /usr/local/php/etc/php.ini
Add
at the end of the fileextension = snmp.so
7. Restart the service
The above is the detailed content of How to install snmp extension in php. For more information, please follow other related articles on the PHP Chinese website!