zoukankan      html  css  js  c++  java
  • Zabbix Server 3.2

    软件环境

    Centos7.3

    LAMP

    Zabbix 3.2

     1. Installing repository configuration package

    Install the repository configuration package. This package contains yum (software package manager) configuration files.

    # rpm -ivh http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm

    Now you are ready to install Zabbix server with MySQL or server with PostreSQL, agent and proxy.

    2. Installing apache and php

    [root@localhost ~]# yum -y install httpd php php-mysql php-mbstring php-gd php-bcmath php-ldap php-xml

     2.1 配置php时区参数

    (a) php.ini

    (b) /etc/httpd/conf.d/zabbix.conf

       php_value date.timezone Asia/Shanghai

    2.2 启动web服务

    [root@localhost ~]# systemctl start httpd.service

    # systemctl enable httpd.service  

    3. Installing mariadb  

    # yum -y install mariadb mariadb-server

    # systemctl start mariadb.service

    # systemctl enable mariadb.service 

    4. Installing Zabbix server and web packages

    # yum -y install zabbix-server-mysql zabbix-web-mysql  zabbix-agent

    4.1 Creating initial mariadb database 

    # mysql_secure_installation

    # mysql -u root -p <root_password>

    mysql> create database zabbix character set utf8 collate utf8_bin;

    mysql> create user 'zabbix'@'localhost' identified by 'zabbix_password';

    mysql> create user 'zabbix'@'192.168.1.%' identified by 'zabbix_password';

    mysql> grant all on zabbix.* to ‘zabbix’@‘localhost';

    mysql> grant all on zabbix.* to ’zabbix‘@‘192.168.1.%’;
    mysql> quit 

    4.2 Now import initial schema and data. Make sure to insert correct version for 3.2.*. You will be prompted to enter your newly created password.  

    In order to check the version you have in your package, use the following command:  

    # rpm -q zabbix-server-mysql  

    # zcat /usr/share/doc/zabbix-server-mysql-3.2.*/create.sql.gz | mysql -u zabbix -p -D zabbix  

    5. Database configuration for Zabbix server

    Edit server host name, user and password in zabbix_server.conf as follows, where DBPassword is the password you've set creating initial database:

    # vi /etc/zabbix/zabbix_server.conf
    DBHost=localhost ##database host name
    DBName=zabbix ##database name
    DBUser=zabbix   ##database user name
    DBPassword=<zabbix_password>   ##database user password

    5.1Starting Zabbix server 

    It's time to start Zabbix server process and make it start at system boot:

    # systemctl start zabbix-server
    # systemctl enable zabbix-server   

    5.2 PHP configuration for Zabbix web

    Apache configuration file for Zabbix frontend is located in /etc/httpd/conf.d/zabbix.conf. Some PHP settings are already configured.

    But it's necessary to uncomment the "date.timezone" setting and set the right timezone for you.

    php_value max_execution_time 300
    php_value memory_limit 128M
    php_value post_max_size 16M
    php_value upload_max_filesize 2M
    php_value max_input_time 300
    php_value always_populate_raw_post_data -1
    # php_value date.timezone Europe/Riga   

    5.3 SELinux configuration

    Having SELinux status enabled in enforcing mode, you need to execute the following command to enable successful connection of Zabbix frontend to the server:

    # setsebool -p httpd_can_network_connect on

    # setsebol -p http_can_connect_zabbix on

    # setsebool -p -p zabbix_can_network on

    5.4 Firwall configuration

    #f irewall-cmd --permanent --add-port=80/tcp

    # firewall-cmd --permanent --add-port=443/tcp

    # firewall-cmd --permanent --add-port=10050-10052/tcp

    # firewall-cmd  --reload 

    As frontend and SELinux configuration is done, you need to restart Apache web server:

    # systemctl restart httpd

    # systemctl restart zabbix-server

    # systemctl restart zabbix-agent 

    5.5 Installing and configuration Zabbix-web

    webUI site: http://IP/zabbix

    username:Admin

    password: zabbix

    Zabbix web configuration file

    # cat /etc/zabbix/web/zabbix.config.php    

  • 相关阅读:
    cmd命令之set详解
    微信公众号之推送消息
    总结js(1)
    本地文件夹变远程仓库并且提交Github
    npm之使用淘宝源
    页面倒计时返回
    在线sass编译器
    js条件语句之职责链数组
    【轉】靜
    css 實現微信聊天類似的氣泡
  • 原文地址:https://www.cnblogs.com/samits/p/7218639.html
Copyright © 2011-2022 走看看