1)./fullinstall会报各种包依赖错误。(其实是 ./1-prereqs 这一步)
需要先卸载原来的mysql、php,反正哪些包依赖错误就卸掉原来的。
2)Nagios默认的httpd是apache,所以默认安装各种出错。修改 ./xi-sys.cfg
把 httpd='httpd'改成 httpd='nginx'
3)./A-subcomponents
Nagios的subcomponents里面很多install / post-install脚本还是写死的
service httpd restart,要改成 service $httpd restart
(nagioscore、nrdp),nagiosmobile是php写的安装脚本,不改没关系(不影响结果,不过会执行不下去)
反正按subcomponents的install脚本照着来,如果每个都确认解压或者复制成功,不用重头执行A-subcomponents,
直接 touch installed.subcomponents 算了
4)./B-installxi
跟上面3)的问题一样,httpd 改成 $httpd
5)./E-importnagiosql
因为apache的conf和nginx完全不同(而前面步骤Nagios装的是apache的conf),这一步需要访问
http://localhost/nagiosql/index.php 肯定出错,导致这一步出问题。
在/etc/nginx/nginx.conf内新增一行:
include /etc/nginx/conf.d/nagiosxi.conf;
在/etc/nginx/conf.d/下新建nagiosxi.conf,参照/etc/httpd/conf.d/nagiosql.conf设置:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
server { listen 80; server_name localhost; location /nagiosql { root /var/www/html/nagiosql; } location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } |
(待续)