Attention! Nagios 出错问题 Because of the Environment settings.

We have all LAMP APPs migrated to EC2 instance successfully. APPs work fine. but I was always getting Warning messages from Nagios, saying: PHPlive supporter Offline.

In fact, we had already have accessed to the phplive support. so strange…I was wondering.
I tried check_phplive on localhost server. It gave me the correct response: OK- ….online

but at my end (my monitoring server) I was always getting the warning:
Warning- Supporter Offline.

I checked everything I could do, finally I found that a simple mistake in my checking-code that missing Environment Variable settings of Mysql.

so just added this MYSQL=location/bin/mysql and using variable ‘MYSQL’ instead the ‘mysql’

It is now working fine!cool.

Apache Umask 问题。

1 是FTP可以管理所有的文件
2 是Joomla程序本身可以管理所有的文件

所以Apache 、ftp用户需要同时对文件进行增删改。 用户权限需为umask 002
即目录:为775,普通文件为 664

在网上查Apache Umask方法,只需要运行 echo “umask 002” >> /etc/sysconfig/httpd
或是 echo “umask 002” >>/usr/local/apache2/bin/apachectl 里面去就可以解决,屡次失败。


To set the Umask of files created by apache, either run `umask` in all your startup scripts,install mod_umask