zabbix install
dohttp://blog.csdn.net/lx_9986/article/details/6763163
download
wget http://prdownloads.sourceforge.net/zabbix/zabbix-1.8.9.tar.gz?download
iptables -F
yum install httpd.x86_64 httpd-manual.x86_64
启动Apache:
apachectl start
启动会有一定情况提示
Could not reliably determine the server’s fully qualified domain name, using localhost.localdomain for ServerName
/etc/httpd/conf/httpd.conf 中設定 ServerName
将 Apache 设置为开机自动启动
chkconfig –add httpd
chkconfig –level 345 httpd on
nano /etc/httpd/conf/httpd.conf
yum install php.i686 php-bcmath.i686 php-gd.i686 php-mbstring php-xml
yum install mysql-server.i686 mysql.i686 php-mysql.i686
启动 MySQL
service mysqld start
设置 MySQL root 密码
mysqladmin -uroot -p password 123456
Enter password: 输入旧密码(如果是第一次设置,root 默认密码为空,直接回车)
设置MySQL开机自动启动
chkconfig –add mysqld
chkconfig –level 345 mysqld on
yum install mysql-devel.i686
yum install net-snmp.i686 net-snmp-devel.i686 net-snmp-utils.i686
yum install curl.i686 curl-devel
yum install gcc.i686 libgcc.i386 libgcc.i686
yum install make wget nano
下载安装
./configure –enable-server –enable-agent –with-mysql –with-net-snmp –with-libcurlll
./configure –enable-server –enable-agent –with-mysql –with-net-snmp –with-libcurl –prefix=/usr/local/zabbix
make install
useradd -d /home/zabbix -p zabbix zabbix
创建 zabbix 用户
进入 zabbix 解压缩后的目录,创建 zabbix 数据库
mysql -uroot -p123456
create database zabbix;
quit;
cat create/schema/mysql.sql | mysql -uroot -p123456 zabbix
cat create/data/data.sql | mysql -uroot -p123456 zabbix
cat create/data/images_mysql.sql | mysql -uroot -p123456 zabbix
修改 /etc/services,加入以下行
echo “zabbix-agent 10050/tcp Zabbix Agent” >>/etc/services
echo “zabbix-agent 10050/udp Zabbix Agent” >>/etc/services
echo “zabbix-trapper 10051/tcp Zabbix Trapper” >>/etc/services
echo “zabbix-trapper 10051/udp Zabbix Trapper ” >>/etc/services
修改 zabbix 的配置文件
创建配置文件目录,并将源代码中的配置文件模板拷贝到新创建的配置文件目录中。
mkdir /etc/zabbix
cp misc/conf/* /etc/zabbix
根据实际情况修改 zabbix_server.conf zabbix_agentd.conf zabbix_agent zabbix_trapper.conf 一般都取默认值,除了
改agentd的ip地址
mysql 的数据库用户名和密码,如:
DBUser=root
DBPassword=123456
拷贝zabbix服务器的frontend php 程序到 http server 的主目录下
cp -r frontends/php/* /var/www/html
修改php参数
/etc/php.ini
date.timezone =Asia/Chongqing
post_max_size = 32M
max_execution_time = 600
max_input_time = 600
/etc/httpd/conf/httpd.conf
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
chkconfig –level 35 iptables off
给权限
setenforce 0
service httpd restart
cp /root/zabbix-1.8.10/misc/init.d/redhat/8.0/zabb* /etc/init.d/
修改 zabbix agentd 和server
/usr/local/zabbix/bin/zabbix_agentd改为实际的,centos中为sbin
/usr/local/zabbix/sbin/zabbix_agentd
runlevel
/etc/rc3.d/xxx
可能apache 不解析php重启
——————————————————————————————————————————————————————
download
php
wget http://www.php.net/get/php-5.3.8.tar.gz
phpmyadmin
wget http://sourceforge.net/projects/phpmyadmin/files%2FphpMyAdmin%2F3.4.9%2FphpMyAdmin-3.4.9-all-languages.tar.gz
发表回复