summaryrefslogtreecommitdiff
path: root/ext/snmp
diff options
context:
space:
mode:
authorBoris Lytochkin <lytboris@php.net>2011-08-23 19:15:58 +0000
committerBoris Lytochkin <lytboris@php.net>2011-08-23 19:15:58 +0000
commit1cd8b8c80b2cea485886f653b1cf1fba93b4f716 (patch)
tree994130fa1cbd7a2f87032e9520b6cac0d1cefb3d /ext/snmp
parent687e310a462844a894c96f86dc844ac782025961 (diff)
downloadphp-git-1cd8b8c80b2cea485886f653b1cf1fba93b4f716.tar.gz
apply docs fixes suggested in BR #55474
Diffstat (limited to 'ext/snmp')
-rw-r--r--ext/snmp/tests/README41
-rw-r--r--ext/snmp/tests/snmpd.conf25
2 files changed, 32 insertions, 34 deletions
diff --git a/ext/snmp/tests/README b/ext/snmp/tests/README
index 74258ec27f..a2cb794913 100644
--- a/ext/snmp/tests/README
+++ b/ext/snmp/tests/README
@@ -21,44 +21,17 @@ SNMP_MIBDIR : Directory containing MIBS
On Linux/FreeBSD
--------
-- Install package net-snmpd (name may differ based on your distribution)
-- Edit config file (by default this is /etc/snmp/snmpd.conf on Linux and
- usr/local/etc/snmp/snmpd.conf on FreeBSD) and replace whole content
- with following lines:
+- Install package net-snmpd (name may differ based on your distribution).
+- Replace config file (by default this is /etc/snmp/snmpd.conf on Linux and
+ /usr/local/etc/snmp/snmpd.conf on FreeBSD) with snmpd.conf supplied.
-###### Config file #####
-rocommunity public 127.0.0.1
-rocommunity6 public ::1
-rwcommunity private 127.0.0.1
-
-Do not enable them - being set here they make appropriate OID switch into r/o
-#syslocation "Somewhere in the world"
-#syscontact "root"
-
-#SNMPv3 credentials
-rouser adminMD5
-rouser adminSHA
-rwuser adminMD5AES
-rouser adminMD5AES128
-rouser adminMD5DES
-createUser adminMD5 MD5 test1234
-createUser adminSHA SHA test1234
-createUser adminMD5AES MD5 test1234 AES test1234
-createUser adminMD5AES128 MD5 test1234 AES test1234
-createUser adminMD5DES MD5 test1234 DES test1234
-
-createUser noAuthUser
-authuser read noAuthUser noauth
-###### End #####
-
Before launching daemon make sure that there is no file /var/net-snmp/snmpd.conf
-Delete it if exists. Ingoring to to so will fail SNMPv3 tests
+Delete it if exists. Ingoring to to so will fail SNMPv3 tests.
-Make snmpd bind on localhost only. To do so, pass '127.0.0.1' into it's startup arguments
-(see /etc/init.d/snmpd on Linux and set snmpd_flags="127.0.0.1" in rc.conf in FreeBSD).
-Otherwise your SNMP daemon will answer SNMPv3 messages from remote clients.
+- Launch snmpd (service snmpd start or /etc/init.d/snmpd start).
+ Alternatively you can start snmpd daemon using following command line:
+ sudo snmpd -C -c ./snmpd.conf -f -Le
-- Launch snmpd (service snmpd start or /etc/init.d/snmpd start)
On Windows
----------
diff --git a/ext/snmp/tests/snmpd.conf b/ext/snmp/tests/snmpd.conf
new file mode 100644
index 0000000000..3e91372944
--- /dev/null
+++ b/ext/snmp/tests/snmpd.conf
@@ -0,0 +1,25 @@
+# Listen for connections from the local system only
+agentaddress udp:127.0.0.1:161,udp6:[::1]:161
+
+rocommunity public 127.0.0.1
+rocommunity6 public ::1
+rwcommunity private 127.0.0.1
+
+Do not enable them - being set here they make appropriate OID switch into r/o
+#syslocation "Somewhere in the world"
+#syscontact "root"
+
+#SNMPv3 credentials
+rouser adminMD5
+rouser adminSHA
+rwuser adminMD5AES
+rouser adminMD5AES128
+rouser adminMD5DES
+createUser adminMD5 MD5 test1234
+createUser adminSHA SHA test1234
+createUser adminMD5AES MD5 test1234 AES test1234
+createUser adminMD5AES128 MD5 test1234 AES test1234
+createUser adminMD5DES MD5 test1234 DES test1234
+
+createUser noAuthUser
+authuser read noAuthUser noauth