How to get snmpd listen on a port other than 161 on CentOS 6.x:
Install these snmp packages if not installed yet:
sudo yum install net-snmp net-snmp-utils
Choose a port number that is suitable for you and is not included in /etc/services
.
Say I chose 58001.
Add the following line in /etc/snmp/snmpd.conf
:
agentAddress udp:58001
Start the service:
service snmpd start
and/or enable automatic start of snmpd on system boot:
sudo chkconfig --add snmpd sudo chkconfig snmpd on