snmpd服务无法更改默认端口
問題描述:
修改/etc/rc.d/init.d/snmpd的啟動腳本
修改行:
OPTIONS="-Lsd -Lf /dev/null -p /var/run/snmpd.pid -a"
修改為
OPTIONS="udp:9999 -Lsd -Lf /dev/null -p /var/run/snmpd.pid -a"
service snmpd start 時無法啟動該服務(wù),終端沒有報錯提示
問題解決:
tail -10 /var/log/messages
Aug 24 09:36:24 localhost snmpd[12063]: Error opening specified endpoint "udp:9999"
Aug 24 09:36:24 localhost snmpd[12063]: Server Exiting with code 1
Aug 24 09:36:24 localhost setroubleshoot: SELinux is preventing the snmpd (snmpd_t) from binding to port 9999. For complete SELinux messages. run sealert -l ec7e5602-a40f-4831-97d0-ca9e84618549
?
so,暫且不考慮selinux,命令關(guān)掉selinux
setenforce 0
sestatus
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: permissive
Mode from config file: disabled
Policy version: 21
Policy from config file: targeted
?
稍后會繼續(xù)詳細(xì)介紹selinux,安全卻很少人探索的東東!
轉(zhuǎn)載于:https://blog.51cto.com/linuxgeek/995245
總結(jié)
以上是生活随笔為你收集整理的snmpd服务无法更改默认端口的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【100题】第五十三题 字符串的全排列
- 下一篇: svn服务端及客户端搭建和使用(三)