mobarrio

Install Zabbix 4 + PostgreSQL on CentOS 7

Oct 20th, 2018
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.70 KB | None | 0 0
  1. # rpm -ivh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm
  2. # yum-config-manager --enable rhel-7-server-optional-rpms
  3. # yum install zabbix-server-pgsql zabbix-web-pgsql zabbix-agent -y
  4. # yum install https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm
  5. # yum install postgresql10 -y
  6. # yum install postgresql10-server -y
  7. # /usr/pgsql-10/bin/postgresql-10-setup initdb
  8.  
  9. # systemctl enable postgresql-10
  10. # systemctl start postgresql-10
  11. # systemctl enable zabbix-server
  12. # systemctl enable zabbix-agent
  13.  
  14. # su - postgres
  15. # psql -c "alter user postgres with password 'Z4bbix'"
  16. # createuser --pwprompt zabbix
  17. Enter password for new role: Z4bbix
  18. Enter it again: Z4bbix
  19.  
  20. # createdb -O zabbix -E Unicode -T template0 zabbix
  21.  
  22. # zcat /usr/share/doc/zabbix-server-pgsql*/create.sql.gz | /usr/pgsql-10/bin/psql -U zabbix zabbix -W
  23. Enter password for user zabbix: Z4bbix
  24.  
  25. # vi /etc/zabbix/zabbix_server.conf
  26. DBHost=localhost
  27. DBName=zabbix
  28. DBUser=zabbix
  29. DBPassword=Z4bbix
  30.  
  31. # cat /etc/zabbix/zabbix_agentd.conf
  32. PidFile=/var/run/zabbix/zabbix_agentd.pid
  33. LogFile=/var/log/zabbix/zabbix_agentd.log
  34. LogFileSize=3
  35. DebugLevel=0
  36. Server=127.0.0.1
  37. ListenPort=10050
  38. StartAgents=5
  39. RefreshActiveChecks=60
  40. Timeout=30
  41. Include=/etc/zabbix/zabbix_agentd.d/*.conf
  42.  
  43. # vi /etc/php.ini
  44. date.timezone = "Europe/Madrid"
  45.  
  46. # cat /var/www/html/index.html
  47. <html>
  48. <head>
  49. <title>Zabbix Server</title>
  50. <meta http-equiv="refresh" content="0; URL=http://host.domain.com/zabbix">
  51. <meta name="keywords" content="automatic redirection">
  52. </head>
  53. <body>
  54. </body>
  55. </html>
  56.  
  57. # systemctl restart httpd
  58. # systemctl restart zabbix-server
Advertisement
Add Comment
Please, Sign In to add comment