首页 > nagios > ubuntu linux 编译安装nagios-3.2.1

ubuntu linux 编译安装nagios-3.2.1

2010年3月29日 eric 发表评论 阅读评论

安装linux 安装nagios 首先呢贴出参考文章:

http://nagios-cn.sourceforge.net/nagios-cn/

帮助我们大家学习认识了 nagios

引用:

Nagios是一款非常优秀的网络主机管理软件,它在开源社区的影响力是非同寻常的。但很可惜的是,它的界面及操作使用过程中采用了英语的语言提示与源程序紧密结合使得这款软件的汉化界面迟迟不能推出,影响了它在中文区的使用。为推进Nagios的使用,笔者建立了nagios-cn工程,该工程的主要目标是翻译源程序中运行提示、界面生成和文档说明,通过一些努力,nagios-cn终于可以正常运转了,本书编写的主要目的是为在中文使用区域推广和使用Nagios软件,让这款优秀的软件为国人服务。

 1.我系统是ubuntu所以用懒人模式安装开发库,apache 、GCC、gd卡发库和php

apt-get install build-essential libgd2-dev apache2 php5 php5-gd libmysqlclient15-dev

2.下载所需要软件

mkdir nagios_src

cd nagios_src

所需要软件:

wget 'http://downloads.sourceforge.net/project/nagios/nagios-3.x/nagios-3.2.1/nagios-3.2.1.tar.gz?use_mirror=cdnetworks-kr-2'

wget 'http://downloads.sourceforge.net/project/nagiosplug/nagiosplug/1.4.14/nagios-plugins-1.4.14.tar.gz?use_mirror=cdnetworks-kr-2'

wget 'http://downloads.sourceforge.net/project/nagios/nrpe-2.x/nrpe-2.12/nrpe-2.12.tar.gz?use_mirror=cdnetworks-kr-1'

3.建立nagios 和 apache 用户

sudo -s

groupadd  www

useradd -g www www

4.安装 snmp 和 snmp perl 模块

apt-get install snmp snmpd

perl -MCPAN -e shell

Install Net::Snmp

 PS:这里说一个我遇到的问题,我在安装模块的时候,初始配置我配制的台湾源FTP源不知道为什么原因很慢,后来重新配置,我一位删掉.cpan 目录就可以了,没想到不是,查看了一下文档,知道如果想重新配置 cpan的话 执行命令

CPAN>o conf init

  

就可以了。

5.编译安装 nagios

cd nagios_src

tar zxvf nagios-3.2.1.tar.gz

cd nagios-3.2.1

./configure --prefix=/usr/local/nagios --with-nagios-user=www --with-nagios-group=www --with-command-user=www --with-command-group=www

make all

make install-init

make install-config

make install-commandmode

安装Nagios的WEB配置文件到Apache的conf.d目录下

cp sample-config/httpd.conf /etc/apache2/conf.d/nagios.conf

创建一个eric的用户用于Nagios的WEB接口登录。记下你所设置的登录口令,一会儿你会用到它

htpasswd -c /usr/local/nagios/etc/htpasswd.users eric

cd /usr/local/nagios/etc

修改 cgi 执行用户,默认是 nagiosadmin 修改成刚刚我们创建的eric用户

sed -i 's/nagiosadmin/eric/g' cgi.cfg

重启apache服务以使设置生效

/etc/init.d/apache2 reload

6.变异安装nagios-plugins 插件

cd nagios_src

tar zxvf nagios-plugins-1.4.14.tar.gz

cd nagios-plugins-1.4.14

./configure --with-nagios-user=www --with-nagios-group=www

make 

make install

/etc/init.d/nagios restart

7,设置 nagios 开启自动启动

update-rc.d nagios defaults

验证Nagios的样例配置文件

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

如果没有报错,就可以启动nagios 服务

/etc/init.d/nagios start

8,因为ubuntu默认没有安装 mailx  sendmail 

apt-get install mailx sendmail

 

9.登录web 界面

http://ip/nagios

nagios

转载请注明:文章转载自:Eric's linux and nginx! (http://www.nginxs.com)
本文地址:http://www.nginxs.com/linux/96.html

分类: nagios 标签: , ,
  1. 2017年11月1日10:19 | #1

    I visited several web sites however the audio feature for audio songs existing at this web page is truly superb.

  2. 2017年11月1日23:30 | #2

    Hello, i feel that i noticed you visited my weblog so
    i got here to return the favor?.I am attempting to to find things to enhance my web site!I suppose its adequate to make use of a few of your ideas!!

  3. 2017年11月3日02:34 | #3

    Cialis Farmacia Precio Levitra Test Meinungen viagra Viagra Vendita Libera Dutasteride By Money Order Tadalis Sx Soft Viagra Cheap

  4. 2017年11月8日11:08 | #4

    Buy Generic Valtrex Canada Buy Amoxicillin Otc Australia Levitra En Francais viagra online Cialis Sans Ordonnance Danger Buy Misoprostol Online Amoxicillin Dosage Upper Respiratory

  5. 2017年11月10日01:02 | #5

    Hi my family member! I wish to say that this post is awesome, nice written and include approximately all important infos.
    I would like to look extra posts like this .

  6. 2017年11月10日07:39 | #6

    Asking questions are genuinely nice thing
    if you are not understanding something completely, however this post provides good understanding yet.

  7. 2017年11月11日06:17 | #7

    My family every time say that I am wasting my
    time here at web, but I know I am getting familiarity
    every day by reading thes pleasant posts.

  8. 2017年11月11日18:22 | #8

    I know this web site provides quality dependent articles and additional stuff, is
    there any other web page which offers such information in quality?

  9. 2017年11月12日21:45 | #9

    Pretty nice post. I just stumbled upon your blog and wished to say that I’ve really enjoyed browsing your blog posts.
    In any case I’ll be subscribing to your feed and I hope you write again soon!

  10. 2017年11月13日05:18 | #10

    Spot on with this write-up, I really believe this amazing site needs a lot more attention. I’ll probably be returning to read through
    more, thanks for the advice!

  11. 2017年11月13日16:22 | #11

    Stomoach Upset With Amoxicillin viagra Cephalexin Staph Strattera Online Cialis 100 Mg Online No Prescription

  12. 2017年11月14日07:50 | #12

    As the admin of this site is working, no doubt very soon it will
    be famous, due to its feature contents.

  13. 2017年11月14日17:26 | #13

    Thinking about concerned with you and your family?

  14. 2017年11月15日10:30 | #14

    To preserve your family members from deterioration?

  15. 2017年11月16日02:07 | #15

    Have falling patio and garden entry in your home?

  16. 2017年11月16日17:50 | #16

    What a information of un-ambiguity and preserveness of valuable know-how concerning unpredicted feelings.

  17. 2017年11月16日19:02 | #17

    Simply want to say your article is as surprising. The clearness on your put
    up is just excellent and that i could suppose
    you are an expert on this subject. Fine along with
    your permission allow me to grasp your RSS
    feed to stay updated with drawing close post. Thank you one
    million and please carry on the enjoyable work.

  18. 2017年11月18日19:27 | #18

    Hi, i think that i saw you visited my web site so i came to “return the favor”.I am trying to
    find things to improve my website!I suppose its ok to use a few of your ideas!!

  19. 2017年11月24日01:11 | #19

    slots casino
    new casino
    slots casino
    best online casino
    canada casino

  20. 2017年11月24日05:31 | #20

    small loans with bad credit
    bad credit unsecured loans
    what is a personal loan
    quik cash
    need cash fast

  21. 2017年11月25日06:59 | #21

    I’m gone to convey my little brother, that he should also visit this
    web site on regular basis to get updated from latest gossip.

  22. 2017年11月25日12:44 | #22

    Hi, I log on to your new stuff on a regular basis. Your humoristic style
    is witty, keep up the good work!

  23. 2017年11月25日13:19 | #23

    Levitra Dove Agisce Is Keflex In Cetazolin Family Australia Pharmacy Domperidone generic cialis Buy Viagra Pfizer Levitra Filmtabletten Schmelztabletten

  24. 2017年11月25日13:37 | #24

    That is a good tip particularly to those new to the blogosphere.
    Brief but very accurate information… Thanks for sharing this one.
    A must read article!

  25. 2017年11月27日02:27 | #25

    Hello just wanted to give you a quick heads up and let you know a few of the pictures aren’t loading correctly.
    I’m not sure why but I think its a linking issue.

    I’ve tried it in two different web browsers and both show the same results.

  26. 2017年11月29日17:00 | #26

    My brother suggested I might like this website. He used to
    be entirely right. This post actually made my day.
    You can not consider just how so much time I
    had spent for this info! Thank you!

  27. 2017年11月29日19:51 | #27

    Comprare Cialis In Egitto The Effects Of 500mg Amoxicillin Vendita Cialis In Farmacia viagra cialis Componentes De La Viagra Discount Order Direct Provera No Rx

  28. 2017年12月1日11:48 | #28

    payday loans no credit check
    payday loans
    payday loans online
    payday loans
    cash advance

  29. 2017年12月1日20:33 | #29

    I’m not sure why but this blog is loading extremely slow for
    me. Is anyone else having this issue or is it a problem
    on my end? I’ll check back later and see if the problem still exists.

  30. 2017年12月3日12:15 | #30

    Hey just wanted to give you a quick heads up and let you know a few of the images
    aren’t loading correctly. I’m not sure why but I think its a linking issue.

    I’ve tried it in two different internet browsers and both
    show the same outcome.

  31. 2017年12月5日22:54 | #31

    payday loans online
    online loans
    online payday loans
    cash advance
    pay day loans

评论分页
1 2 3 4 96
订阅评论
0+3= (必填)