亚洲成精品动漫久久精久,九九在线精品视频播放,黄色成人免费观看,三级成人影院,久碰久,四虎成人欧美精品在永久在线

掃一掃
關注微信公眾號

詳解-Linux配置ntop(網絡流量監控)
2010-03-02   網絡

Linux發展迅速,你了解Linux系統么?你是Linux系統的應用者么?今天有需求要配置ntop,本文為你詳細介紹Linux配置 ntop,為你在學習Linux配置ntop時起一定的作用。用來監控網絡情況。

裝rpmforge:
#wget ftp.freshrpms.net/pub/freshrpms/pub/dag/redhat/el5/en/i386/RPMS.dag/rrdtool-1.2.30-1.el5.rf.i386.rpm

源碼包折騰一上午也不行,rpmforge還是很有用的啊。

  1. 裝graphviz:  
  2. #yum install graphviz  
  3. 裝ntop:  
  4. #yum install ntop  
  5. 改ntop.conf:  
  6. --user ntop  
  7. --db-file-path /var/ntop  
  8. --use-syslog=local1    #讓ntop會記錄日志到local1。  
  9. 改/etc/syslog.conf:  
  10. local1.* /var/log/ntop.log    #和ntop.conf的里面對應,記得重啟syslog服務。  
  11. 改/etc/init.d/ntop:  
  12. #!/bin/bash  
  13. #  
  14. # Init file for the NTOP network monitor  
  15. #  
  16. # chkconfig: 35 93 83    #這里加上35原來是-,讓ntop在35級別自動啟動。記得用#chkconfig ntop on  
  17. #  
  18. # description: NTOP Network Monitor  
  19. #  
  20. # processname: ntop  
  21. # config: /etc/ntop.conf  
  22. # pidfile: /var/run/ntop  
  23. # Source function library.  
  24. . /etc/rc.d/init.d/functions  
  25. # Source networking configuration.  
  26. . /etc/sysconfig/network  
  27. # Check that networking is up.  
  28. [ "${NETWORKING}" == "no" ] && exit 0  
  29. [ -x "/usr/bin/ntop" ] || exit 1  
  30. [ -r "/etc/ntop.conf" ] || exit 1  
  31. #[ -r "/var/ntop/ntop_pw.db" ] || exit 1  
  32. RETVAL=0 
  33. prog="ntop" 
  34. start () {  
  35. echo -n $"Starting $prog: "  
  36. daemon $prog @/etc/ntop.conf -d -L    #這里原來是-d -L @.....但是會報錯,改成這樣就不回了。  
  37. RETVAL=$?  
  38. echo  
  39. [ $RETVAL -eq 0 ] && touch /var/lock/subsys/\$prog  
  40. return $RETVAL  
  41. }  
  42. stop () {  
  43. echo -n $"Stopping $prog: "  
  44. killproc $prog  
  45. RETVAL=$?  
  46. echo  
  47. [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog  
  48. return $RETVAL  
  49. }  
  50. restart () {  
  51. stop  
  52. start  
  53. }  
  54. case "$1" in  
  55. start)  
  56. start  
  57. ;;  
  58. stop)  
  59. stop  
  60. ;;  
  61. restart|reload)  
  62. restart  
  63. ;;  
  64. condrestart)  
  65. [ -e /var/lock/subsys/$prog ] && restart  
  66. RETVAL=$?  
  67. ;;  
  68. status)  
  69. status $prog  
  70. RETVAL=$?  
  71. ;;  
  72. *)  
  73. echo $"Usage: $0 {start|stop|restart|condrestart|status}"  
  74. RETVAL=1 
  75. esac  
  76. exit $RETVAL 

配置ntop:

在Admin-Preferences中添加dot.path /usr/bin/dot,實現繪圖功能。

其他注意事項:

第一次啟動前用下面的命令設置一個管理密碼,以后web頁面設置的時候用得到。用戶名默認admin,密碼就是下面的命令設置的。

#/usr/bin/ntop -P /var/ntop -u ntop -A

防火墻打開3000端口,或者配置文件修改成別的。這樣就成功完成了Linux配置ntop。

熱詞搜索:

上一篇:黑客介紹網絡入侵大型網站完整思路
下一篇:Windows 7系統開機啟動項目知多少?

分享到: 收藏