• How to Install Zabbix Server on Centos6.7


    Prerequisite Environment

     

    First you must use your Subscription Manager to enable SCL:

    [root@fileserver ~]# subscription-manager repos --enable rhel-server-rhscl-6-eus-rpms

    Repository 'rhel-server-rhscl-6-eus-rpms' is enabled for this system.

    Install Apache  

    [root@fileserver ~]# yes | yum install httpd

    Start Apache

    [root@fileserver ~]# /usr/sbin/apachectl start

    httpd: apr_sockaddr_info_get() failed for fileserver.qq.debao

    httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

    Accept port 80 for apache

    [root@fileserver ~]# iptables -I INPUT -p tcp --dport 80 -j ACCEPT

    [root@fileserver ~]# service iptables save

    Set Apache start on boot

    [root@fileserver ~]# chkconfig httpd on

    Install PHP5.4

    [root@fileserver ~]# yes | yum install php54 php54-php php54-php-gd php54-php-mbstring  php54-php-ldap php54-php-bcmath

    [root@fileserver ~]# yes | yum install php54-php-mysqlnd

    [root@fileserver ~]#export PATH=$PATH:/opt/rh/php54/root/usr/bin/

    [root@fileserver ~]# service httpd restart

    Install mysql

    [root@fileserver ~]# yum -y install mysql mysql-server

    Start mysql

    [root@fileserver ~]# service mysqld start

    Set the first password

    [root@fileserver ~]# /usr/bin/mysqladmin -u root password '123456'

    Set mysql start on boot

    [root@fileserver ~]# chkconfig mysqld on






    Install Zabbix


    a. Install Repository with MySQL database

    [root@fileserver ~]# rpm -i https://repo.zabbix.com/zabbix/3.4/rhel/6/x86_64/zabbix-release-3.4-1.el6.noarch.rpm


    b. Install Zabbix server, frontend, agent

    [root@fileserver ~]# yes | yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent  -y


    c. Create initial database

    # mysql -uroot -p

    password

    mysql> create database zabbix character set utf8 collate utf8_bin;

    mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'password';

    mysql> quit;

    Import initial schema and data. You will be prompted to enter your newly created password.

    [root@fileserver ~]# zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix


    d. Configure the database for Zabbix server

    Edit file /etc/zabbix/zabbix_server.conf

    DBPassword=password


    e. Configure PHP for Zabbix frontend

    [root@fileserver ~]# cp /usr/share/doc/zabbix-web-3.4.11/httpd22-example.conf /etc/httpd/conf.d/zabbix.conf

    Edit file /etc/httpd/conf.d/zabbix.conf, uncomment and set the right timezone for you.

    # php_value date.timezone Asia/Shanghai


    f. Start Zabbix server and agent processes

    Start Zabbix server and agent processes and make it start at system boot:

    [root@fileserver ~]# service zabbix-server start

    [root@fileserver ~]# service zabbix-agent start

    [root@fileserver ~]# service httpd restart

    [root@fileserver ~]# chkconfig zabbix-server on

    [root@fileserver ~]# chkconfig zabbix-agent on






  • 相关阅读:
    架设证书服务器 及 让IIS启用HTTPS服务
    实验二. 使用LoadRunner进行压力测试
    loadrunner简单使用——HTTP,WebService,Socket压力测试脚本编写
    康威定律,可以学习一下
    各国iPhone5系列最新裸机价格
    .yml是什么文件
    win32多线程程序设计笔记(第五章)
    kvm libvirt: hostdev passthrough support 解决加密狗冲突问题
    九度OnlineJudge之1023:EXCEL排序
    [置顶] Android开发之XML文件的解析
  • 原文地址:https://www.cnblogs.com/qifei-liu/p/9453734.html
Copyright © 2020-2023  润新知