/usr/sbin
DAEMON=/usr/local/sbin/${NAME}
DESC="Zabbix 1.4"
PID=/var/run/$NAME.pid
修改 zabbix-agentd 头部变量定义:
NAME=zabbix_agentd
PATH=/bin:/usr/bin:/sbin:/usr/sbin
DAEMON=/usr/local/sbin/${NAME}
DESC="Zabbix 1.4"
PID=/var/run/$NAME.pid
* 添加到启动服务:
rc-update add zabbix-server default
rc-update add zabbix-agentd default
* 启动 Zabbix Server:
/etc/init.d/zabbix-server start
我启动时提示错误:
zabbix_server: error while loading shared libraries: libmysqlclient.so.16: cannot open shared object file: No such file or directory
我的 mysql client 库不在系统默认库中,做以下修改后重新启动就可以了:
echo /usr/local/mysql/lib/mysql/ >> /etc/ld.so.conf
ldconfig
* 启动 Zabbix Agentd
/etc/init.d/zabbix-agentd start
* 复制 Web Interface 到 web 目录:
cp -r frontends/php /work/www/zabbix
* 新建 nginx 配置:
server {
listen 80;
server_name zabbix.local zabbix.hily;
access_log /work/www/logs/zabbix.local.access.log main;
location / {
root /work/www/zabbix;
index index.html index.htm index.php;
}
location ~ \.php$ {
root /work/www/zabbix;
fastcgi_index index.php;
include fastcgi_params;
}
}
* 开始安装 Zabbix Web Interface
打开 http://zabbix.local/,看到提示:
Timezone for PHP is not set. Please set "date.timezone" option in php.ini.
按照提示,修改 php.ini 中时区设置:
date.timezone = Asia/Shanghai
重启 PHP-FPM:
/etc/init.d/php-fpm restart
再次修改 php.ini:
post_max_size = 16M
max_execution_time = 300
mbstring.func_overload = 2
解决后按提示继续安装即可.
* 结束:
安装完后直接访问:
http://zabbix.local/
默认用户名和密码是:
Admin/zabbix
到此安装完成! 本文出自 “王伟” 博客,请务必保留此出处http://wangwei007.blog.51cto.com/68019/741093
|