zabbix
yum -y install curl curl-devel net-snmp net-snmp-devel perl-DBI
yum install php-gd gd-devel php-xml php-mbstring php-bcmath 需要安装的插件
useradd zabbix;usermod -s /sbin/nologin zabbix
进入数据库创建zabbix用户 并授权
create database zabbix;
grant all on zabbix.* to zabbix@'%' identified by '123456';
导入数据
tar zxvf zabbix-2.0.6.tar.gz
cd zabbix-2.0.6
mysql -uzabbix -p123456 zabbix <database/mysql/schema.sql
mysql -uzabbix -p123456 zabbix <database/mysql/images.sql
mysql -uzabbix -p123456 zabbix < database/mysql/data.sql
安装编译zabbix
./configure --prefix=/usr/local/zabbix/ --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl &&make&&make install --enable-server --enable-agent服务端客户端
ln -s /usr/local/zabbix/sbin/zabbix_* /usr/local/sbin/
cp /tmp/zabbix-2.0.6/misc/init.d/tru64/zabbix_server /etc/init.d/zabbix_server
chmod o+x /etc/init.d/zabbix_server
修改配置文件
/usr/local//zabbix/etc/zabbix_server.conf
LogFile=/usr/local/zabbix/zabbix_server.log
DBHost=192.168.10.128
DBName=zabbix
DBUser=zabbix
DBPassword=123456
同时拷贝zabbix_server脚本,启动zabbix_server, 默认端口为10051
cp /usr/local/zabbix/sbin/zabbix_server /etc/rc.d/init.d/zabbix 设置为服务
sed -i '/date.timezone/i date.timezone = PRC' /etc/php.ini
根据安装提示 安装yum install php-gd gd-devel php-xml php-mbstring php-bcmath 插件
cd /var/www/html/conf/
cp zabbix.conf.php.example zabbix.conf.php 修改配置文件
默认admin 密码zabbix
源码安装 php编译 需要源码安装 png jpeg freetype 可参考http://www.2cto.com/kf/201311/260291.html
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-config-file-path=/usr/local/php/etc --with-zlib --enable-bcmath --enable-mbstring --enable-sockets --with-gd --with-png-dir=目录 --with-jpeg-dir=目录 --with-freetype-dir=目录 --with-gettext