标签:zabbix
yum -y install libevent libevent-devel
yum install mysql-dev gcc net-snmp-devel curl-devel perl-DBI php-gd php-mysql php-bcmath php-mbstring php-xm
创建数据库zabbix用户
mysql> use mysql;
mysql>create database zabbix character set utf8;
mysql>grant all privileges on zabbix.* to zabbix@‘127.0.0.1‘ identified by ‘123456‘;
添加系统用户和组
groupadd zabbix
useradd -g zabbix -m zabbix
获取安装包
wget https://fossies.org/linux/misc/zabbix-3.4.1.tar.gz
导入数据库数据
cd zabbix-3.4.1/database/mysql
mysql -uroot -pmysql zabbix < schema.sql
mysql -uroot -pmysql zabbix < images.sql
mysql -uroot -pmysql zabbix < data.sql
编译安装
./configure --prefix=/usr/local/zabbix --with-mysql --with-net-snmp --with-libcurl --enable-server --enable-agent --enable-proxy
make
make install
cp -r zabbix-3.4.1/frontends/php/ /usr/local/apache/htdocs/zabbix
通过浏览器访问:
跟进安装提示一步步安装,如果出现没有模块加载成功则如下操作:比如mysqliso
cd /root/app/php-5.4.26/ext/mysqli
/usr/local/php/bin/phpize
./configure --prefix=/usr/local/mysqli \
--with-php-config=/usr/local/php/bin/php-config \
--with-mysqli=/usr/local/mysql/bin/mysql_config
make
make install
Installing shared extensions: /usr/local/php/lib/php/extensions/debug-non-zts-20060613/
然后在/usr/local/php/etc php.ini
extension=/usr/local/php/lib/php/extensions/debug-non-zts-20060613/mysqli.so
重新启动apache即可看到已经加载mysqli成功。
直接extension=mysqli.so也可以。
标签:zabbix
原文地址:http://perper.blog.51cto.com/6284626/1976198