zabbix搭建


  1. 系統:CentOS Linux release 7.3.1611 (Core)

  2. 主機IP:192.168.204.130

  3. zabbix版本:zabbix-3.2.5.tar.gz


  4. 搭建:

  5. yum install httpd php php-devel php-mysql mariadb mariadb-server mariadb-devel php-gd gcc php-xml libcurl-devel curl-* net-snmp* libxml2* -y

  6. tar xf zabbix-3.2.5.tar.gz

  7. cd zabbix-3.2.5

  8. ./configure --prefix=/usr/local/zabbix --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2

  9. make && make install 

  10. mkdir /var/www/html/zabbix

  11. cp  zabbix-3.2.5/frontends/php/*  /var/www/html/zabbix/  -R

  12. chown apache:apache  /var/www/html/ -R

  13. useradd zabbix -s /sbin/nologin

  14. systemctl start mariadb

  15. mysql_secure_installation

  16. cd /etc/my.cnf.d

  17. vim server.cnf

  18. [mysqld]

  19. character-set-server=utf8

  20. vim client.cnf

  21. [client]

  22. default-character-set=utf8

  23. systemctl restart mariadb

  24. mysql -uroot -p

  25. status

  26. create database zabbix;

  27. grant all on zabbix.* to zabbix@localhost identified by 'zabbix';

  28. grant all on zabbix.* to zabbix@'192.168.204.130' identified by 'zabbix';

  29. flush privileges;

  30. mysql -uzabbix -pzabbix zabbix < /root/zabbix-3.2.5/database/mysql/schema.sql

  31. mysql -uzabbix -pzabbix zabbix < /root/zabbix-3.2.5/database/mysql/p_w_picpaths.sql

  32. mysql -uzabbix -pzabbix zabbix < /root/zabbix-3.2.5/database/mysql/data.sql

  33. ln -s /usr/local/zabbix/sbin/zabbix_* /usr/local/sbin/

  34. cp /root/zabbix-3.2.5/misc/init.d/tru64/zabbix_* /etc/init.d/

  35. chmod +x /etc/init.d/zabbix_*

  36. vim /usr/local/zabbix/etc/zabbix_server.conf

  37. LogFile=/tmp/zabbix_server.log

  38. DBName=zabbix

  39. DBUser=zabbix

  40. DBPassword=zabbix

  41. /etc/init.d/zabbix_server start

  42. /etc/init.d/zabbix_agentd start

  43. netstat -anptul (---查看是否有10050,10051)

  44. systemctl start httpd

  45. http://192.168.204.130/zabbix

  46. 安裝

  47. vim /etc/php.ini

  48. 修改

  49. 再安裝

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章