欢迎来到天天文库
浏览记录
ID:43445797
大小:304.97 KB
页数:35页
时间:2019-10-02
《NagiosCacti基于LNMP(NginxMysqlPHP)搭建实验报告》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、Nagios+Cacti基于LNMP(Nginx+MysqI+PHP)搭建实验操作流程搭建环境CentOS6.2一、Nagios的搭建Nagios组件的运行依赖httpd^gcc和gd。检查nagios所依赖的rpm包是否已经安装:rpm-qhttpdgccglibcglibc-commongdgd-devel安装一下必要的插件组件foriin、rpm-qgdgd-develgccgcc・c++autoconflibjpeglibjpeg・devellibpnglibpng-develfreetypefreetype-devellibxml2
2、libxml2-develzlibzlib-develglibcglibc-develglib2glib2-develbzip2bzip2-develncursesncurses-develcurlcurl-devele2fsprogse2fsprogs-develkrb5-devellibidnlibidrndevelopensslopenssl-develbisonbison-develreadlinereadline-develIgrep!notinstalled1
3、awk1{print$2}'doyum-yinstall$i;done
4、[root@localhost~]#「pm-qhttpdgccglibcglibc-commongdgd-develhttpd-2.2・15・15・el6・centos.1686packagegccisnotinstalledglibc-2.12-1.47.e!6.i686glibc-common-2.12-1.47.el6.i686packagegdisnotinstalledpackagegd・develisnotinstalled[root@localhost~]#
5、缺少的rpm包,可以挂载光盘直接使用rpm命令进行安装。或通过yum结
6、合本地源来实现rpm包的管理。[root(aiocalhost~]#rpm・qhttpdgccglibcglibc-commongdgd・develhttpd-2.2.15-15.el6.centos.i686gcc-4.4.6-3.el6.i686gIibc-2.12-1.47.el6_2.12.1686glibc-common-2.12-1.47.el6_2.12.i686gd-2.0.35-10.e!6.1686-gd-devel-2.0.35-10.el6.i686[root(aiocalhost~]#
7、添加Nagios运行所需要的用
8、户和组groupaddnagcmduscracld-mnagiosusermod-a-Gnagcmdnagiosusermod-a-Gnagcmdapache#把apache加入到nagcmd组,便于在通过webInterface操作nagios时具有足够的权限编译安装Nagios,执行下列命令安装Nagiostarzxvfnagios-3.1.2tar.gz#解压cdnagions-3.1.2#进入解压后的冃录•/configure--with-command-group=nagcmd#编译makeall#执行安装makeinstallma
9、keinstal1-initmakeinstall-configmakeinstal1-commandmode为email指定您想用来接收nagios警告信息的邮件地址,默认是本机的nagios用户:vim/usr/local/nagios/etc/objects/contacts.cfgemailnagios@localhost#这个是默认设置makeinstall-webconf创建登录nagiosweb程序的用户,该帐号在以后通过web登录nagios认证时所用:htpasswd-c/usr/local/nagios/etc/htpas
10、swd.usersnagiosadmin重启httpd服务servicehttpdrestartchkconfighttpdon[root@localhostnagios]#servicehttpdrestart停止httpd:[失败]正在启动httpd:httpd:Couldnotreliablydeterminetheserver'sfullyqualifieddomainname,usinglocalhost.localdomainforServerName[确定][root@localhostnagios]#
11、编译、安装nagios-
12、plugins插件tarzxfnagios-plugins-1.4.13.tar.gzcdnagios-plugins-L13•/configure--with-n
此文档下载收益归作者所有