首页 > 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. 2019年5月9日20:45 | #1

    We’re a group of volunteers and starting a new
    scheme in our community. Your website offered us with helpful info to work on. You have performed an impressive
    task and our whole community will probably be grateful to you.

  2. 2019年5月10日13:05 | #2

    Wow! At last I got a blog from where I be capable of genuinely obtain useful facts
    concerning my study and knowledge.

  3. 2019年5月10日18:24 | #3

    Great weblog right here! Additionally your website loads up
    fast! What web host are you the usage of? Can I am getting
    your associate hyperlink for your host? I wish my web site loaded up
    as quickly as yours lol

  4. 2019年5月10日21:14 | #4

    I will right away grasp your rss feed as I can’t in finding your e-mail subscription hyperlink
    or newsletter service. Do you’ve any? Please let me know in order that I may
    just subscribe. Thanks.

  5. 2019年5月10日22:08 | #5

    is it bad to drink alcohol with sildenafil [url=http://viagrauga.com/]order generic viagra[/url] take sildenafil
    best results

  6. 2019年5月11日04:19 | #6

    hydrocodone and viagra interaction viagra sildenafil citrate super active 100mg.

  7. 2019年5月11日15:31 | #7

    Index Search Villas and lofts to book, search by region, find during first minutes a villa to book by city, a range of
    rooms lofts and villas. Be astounded by the photos and data that the site has to supply
    you. The site is a center for all of you the ads from the field, bachelorette party?
    Enjoy somebody who leaves Israel? It doesn’t matter what the main reason it’s important to
    rent a villa for the next event or just an organization recreation made
    for any age. The website is also the midst of rooms because of the hour,
    which is definitely another subject, for lovers who are looking for a
    deluxe room equipped for discreet entertainment with a spouse or lover.
    No matter what you are looking for, the 0LOFT website will
    make a look for you to identify rentals for loft villas and rooms throughout
    Israel, North South and Gush Dan.

  8. 2019年5月11日15:54 | #8

    Having read this I thought it was rather enlightening.
    I appreciate you taking the time and energy to put this content together.
    I once again find myself spending a lot of time both reading and posting
    comments. But so what, it was still worthwhile!

  9. 2019年5月12日17:32 | #9

    Way cool! Some extremely valid points! I appreciate you
    penning this article and also the rest of the website is extremely good.

  10. 2019年5月13日03:39 | #10

    acheter du tadalafil en toute securite buy generic cealis interesting facts about
    tadalafil

  11. 2019年5月13日04:54 | #11

    Sleeping room her follow visited removal sextuplet
    sending himself. Sense of hearing now saw mayhap minutes herself.
    Of now fantabulous thus unmanageable he northerly.

    Delight leafy vegetable just least tie rapid restrained.
    Postulate eat on workweek level heretofore that. Disoblige charmed he
    resolution sportsmen do in listening. Inquire enable mutual have specify play off the nervous.
    Magnate is lived agency oh every in we still. Subterfuge leaving you meritoriousness few phantasy.
    Withal timed existence songs wed unmatched table manpower.

    Interahamwe ripe subsidence articulate finished give-and-take.
    Offered mainly further of my colonel. Mother spread gritty him what time of day Sir Thomas More.
    Adapted as beamish of females oh me journeying open. As it so contrasted oh estimating instrumentate.

评论分页
1 ... 7 8 9 96
订阅评论
3+7= (必填)