• centos7部署zabbix


    安装httpd mariadb
    yum install -y httpd mariadb-server mariadb php php-mysql php-gd libjpeg* php-ldap php-odbc php-pear php-xml php-xmlrpc php-mhash
    rpm -qa httpd php mariadb
    systemctl status httpd
    systemctl start httpd
    systemctl enable httpd
    systemctl enable mariadb.service 
    systemctl start mariadb.service 
    设置mysql
    mysqladmin -uroot password 123456
    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;
    安装zabbix
    yum -y install zabbix-server-mysql zabbix-web-mysql
    导入mysql
    zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
    修改配置文件
    vim /etc/zabbix/zabbix_server.conf
    DBPassword=password
    vim /etc/httpd/conf.d/zabbix.conf
    php_value date.timezone Asia/Shanghai
    修改mysql存储路径
    show global variables like "%datadir%";
    systemctl stop mariadb.service
    vim /etc/my.cnf
    [mysqld]
    #datadir=/var/lib/mysql
    datadir=/data/mysqldata/mysql
    #socket=/var/lib/mysql/mysql.sock
    socket=/data/mysqldata/mysql/mysql.sock
    [mysqld_safe]
    log-error=/var/log/mariadb/mariadb.log
    pid-file=/var/run/mariadb/mariadb.pid
    socket=/data/mysqldata/mysql/mysql.sock
    [client]
    socket=/data/mysqldata/mysql/mysql.sock
    [mysqld_safe]
    socket=/data/mysqldata/mysql/mysql.sock
    创建链接
    ln -s /data/mysqldata/mysql/mysql.sock /var/lib/mysql/mysql.sock
    systemctl start mariadb.service 
    
    处理图形乱码
    /usr/share/fonts/dejavu/
    脚本路径
    /usr/lib/zabbix/alertscripts
    
    安装pip、requests
    yum -y install epel-release
    yum install python-pip
    pip install requests
    设置mysql允许远程登陆
    MySQL mysql -u root -p
    use mysql;
    update user set host = '%' where user = 'root';
    FLUSH PRIVILEGES;
    
  • 相关阅读:
    小程序05 深入小程序框架
    小程序04 小程序框架
    小程序03 第一个小程序
    小程序02 wxml和wxss
    POJ3278 Catch That Cow
    POJ2251 Dungeon Master
    POJ1321棋盘问题
    Java ClassLoad详解
    十大经典排序算法最强总结(含JAVA代码实现)
    Task底层实现原理探秘
  • 原文地址:https://www.cnblogs.com/kylingx/p/12198644.html
Copyright © 2020-2023  润新知