Home  >  Article  >  Backend Development  >  How to install snmp extension in php

How to install snmp extension in php

藏色散人
藏色散人Original
2020-09-11 10:34:442789browse

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.

How to install snmp extension in php

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 file
extension = 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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn