How to install snmp extension in php

藏色散人
Release: 2023-03-05 20:28:01
Original
2681 people have browsed it

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
Copy after login

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
Copy after login

5.Compile

make && make install
Copy after login

6.Add the module to the configuration file

vi + /usr/local/php/etc/php.ini
Copy after login

Add

at the end of the file
extension = snmp.so
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!