标签:
安装环境需要LAMP或者LNMP先搭建好
在此我使用上一篇搭建好的LNMP环境来安装zabbix
1.下载zabbix
http://www.zabbix.com/download.php
2.安装及配置
1 ##先安装一下依赖 2 yum install net-snmp-devel libxml2-devel libcurl-devel 3 cd /usr/local/src 4 wget zabbix-2.4.8.tar.gz 5 tar zxvf zabbix-2.4.8.tar.gz 6 cd zabbix-2.4.8 7 ./configure --prefix=/usr/local/zabbix-2.4.8/ --enable-server --enable-agent --with-mysql --with-net-snmp --with-libcurl --with-libxml2 8 make 9 make install 10 11 ##创建用户 12 groupadd zabbix 13 useradd -g zabbix zabbix 14 15 ##zabbix server与proxy需要数据库,angent不需要。尤其要注意的是proxy只需要导入一个sql文件,而server一共要导入3个sql文件 16 cd database/mysql/ 17 mysql -uroot -p 18 create database zabbix default charset utf8; 19 quit 20 mysql -uroot -pace826 zabbix < schema.sql 21 mysql -uroot -pace826 zabbix < images.sql 22 mysql -uroot -pace826 zabbix < data.sql 23 24 25 ##配置zabbix相关文件 26 mkdir /etc/zabbix 27 cp conf/zabbix_server.conf /etc/zabbix/ 28 vim /etc/zabbix/zabbix_server.conf 29 DBName=zabbix 30 DBUser=root 31 DBPassword=xxxxx 32 DBPort=3306 33 34 ln -s /usr/local/src/mysql-5.6.31/libmysql/libmysqlclient.so.18 /usr/lib64 35 36 cd frontends/php/ 37 mkdir /usr/local/nginx/html/zabbix 38 cp -rp ./* /usr/local/nginx/html/zabbix/ 39 40 41 ##修改下php配置 42 vim /usr/local/php-5.6.25/lib/php.ini 43 max_execution_time = 300 44 memory_limit = 128M 45 post_max_size = 16M 46 upload_max_filesize = 2M 47 max_input_time = 300 48 date.timezone = “Asia/Shanghai” 49 always_populate_raw_post_data = -1 50 51 52 vim /usr/local/zabbix-2.4.8/etc/zabbix_server.conf 53 DBName=zabbix 54 DBUser=root 55 DBPassword=xxxxx 56 DBPort=3306 57 58 reboot 59 /usr/local/nginx/sbin/nginx 60 /usr/local/php-5.6.25/sbin/php-fpm 61 /usr/local/zabbix-2.4.8/sbin/zabbix_server
3.打开浏览器安装
标签:
原文地址:http://www.cnblogs.com/occl/p/5839815.html