系统监控学习笔记(一)nagios---ubuntu下安装nagios
来源:互联网 发布:网站会员注册系统源码 编辑:程序博客网 时间:2024/06/05 16:34
参考nagios文档进行,
开始学习监控。
0.安装apache等必须的东东
开始学习监控。
0.安装apache等必须的东东
1.创建用户sudo apt-get install apache2
sudo apt-get install build-essential
sudo apt-get install libgd2-dev
libgd2-dev 在7.04中是 libgd2-noxpm-dev 2.0.34~rc1-2ubuntu1.1
执行后会被默认增加到nagios的group下sudo useradd nagios
sudo passwd nagios
不想多创建用户,也可以,config时增加一些参数就好了。
2.下载nagios和pluginwget http://osdn.dl.sourceforge.net/sourceforge/nagios/nagios-3.0b3.tar.gz
wget http://osdn.dl.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.9.tar.gz
3.编译安装
解压配置tar xzf nagios-3.0b3.tar.gz
cd nagios-3.0b3
./configure --with-command-group=nagios --prefix=/home/zhaofw/work/mon/nagios
或者在指定用户下安装
./configure --with-command-group=zhaofw --with-command-user=zhaofw --with-nagios-group=zhaofw
--with-nagios-user=zhaofw --prefix=/home/zhaofw/work/mon/nagios
将得到如下结果:*** Configuration summary for nagios 3.0b3 08-30-2007 ***:
General Options:
-------------------------
Nagios executable: nagios
Nagios user/group: zhaofw,zhaofw
Command user/group: zhaofw,zhaofw
Embedded Perl: no
Event Broker: yes
Install ${prefix}: /home/zhaofw/work/mon/nagios
Lock file: ${prefix}/var/nagios.lock
Check result directory: ${prefix}/var/spool/checkresults
Init directory: /etc/init.d
Apache conf.d directory: /etc/apache2/conf.d
Mail program: /bin/mail
Host OS: linux-gnu
Web Interface Options:
------------------------
HTML URL: http://localhost/nagios/
CGI URL: http://localhost/nagios/cgi-bin/
Traceroute (used by WAP):
Review the options above for accuracy. If they look okay,
type 'make all' to compile the main program and CGIs.
编译安装:make all
make install
sudo make install-init
make install-config
make install-commandmode
4. 修改一下报警的email地址,在安装目录下的 etc/objects/contacts.cfg文件中。define contact{
contact_name nagiosadmin ; Short name of user
use generic-contact ; Inherit default values from generic-contact template (defined above)
alias Nagios Admin ; Full name of user
email dd@dd.com ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
}
5.web interface配置sudo make install-webconf
创建一个用户,记住密码哦。htpasswd -c ../etc/htpasswd.users nagiosadmin
重启一下apachesudo /etc/init.d/apache2 reload
6.安装plugin./configure --with-nagios-user=nagios --with-nagios-group=nagios
或者,指定用户./configure --with-command-group=zhaofw --with-command-user=zhaofw --with-nagios-group=zhaofw
make
--with-nagios-user=zhaofw --prefix=/home/zhaofw/work/mon/nagios
make install
7.安装结束,可以启动了sudo /etc/init.d/nagios start
8.登录就能看到基本的东西了
http://localhost/nagios/
- 系统监控学习笔记(一)nagios---ubuntu下安装nagios
- 循环渐进Nagios---操作篇(一)安装Nagios监控系统
- nagios监控系统使用(一)
- 部署Nagios监控系统(一)
- 监控系统nagios的安装
- nagios安装学习一
- nagios 安装(一)
- nagios(一)安装
- Nagios监控部署(一)
- 构建Nagios监控(一)
- 基于nagios的监控环境(一):Nagios监控基本环境安装
- ubuntu下nagios监控环境搭建
- Nagios系统监控软件的安装设置
- nagios监控系统搭建
- nagios系统监控部署
- nagios+ganglia监控系统
- Nagios + cacti监控系统
- nagios 监控程序安装
- sql中的CASE;update
- WML语言的基本情况
- sdaf
- Nokia官方培训(Symbian 4300)笔记
- 以下以 IE 代替 Internet Explorer,以 MF 代替 Mozzila Firefox
- 系统监控学习笔记(一)nagios---ubuntu下安装nagios
- mbs exams Study Guide
- What is a pure virtual function?
- oracle 启动异常问题
- 程序员与妓女和民工的比较
- 《pro Spring》学习笔记之使用Spring+James邮件服务器发送普通HTML邮件
- C#排序算法
- apache 1.3的配置优化
- C#中类和结构的区别