install zabbix

#yum install maridb and php apache
yum install make httpd php mysql-devel gcc net-snmp-devel curl-devel perl-DBI php-fpm php-gd php-mysql php-bcmath php-mbstring php-xml unixODBC-devel OpenIPMI-devel libxml2-devel mariadb mariadb-server -y

#add new user zabbix
useradd zabbix -s /sbin/nologin

#start mariadb
systemctl start mariadb.service

#create new database
mysql -uroot -e "create database zabbix character set utf8 collate utf8_bin;"

#create new user
mysql -uroot -e "grant all on zabbix.* to [email protected] identified by ‘zabbix‘;"

#flush privileges
mysql -uroot -e "flush privileges;"

#download zabbix installation and install
cd /usr/local/src/
wget https://testom.obs.cn-east-2.myhuaweicloud.com/zabbix-3.2.7.tar.gz
tar -xf zabbix-3.2.7.tar.gz
cd zabbix-3.2.7

#excute sql script
cd database/mysql/
mysql -uzabbix -pzabbix zabbix < schema.sql
mysql -uzabbix -pzabbix zabbix < images.sql
mysql -uzabbix -pzabbix zabbix < data.sql

#start install zabbix
cd /usr/local/src/zabbix-3.2.7

./configure --enable-server --enable-agent --with-mysql=/usr/bin/mysql_config --with-net-snmp --with-libcurl --with-libxml2 --with-openipmi --with-unixodbc

make && make install

#modify zabbix db password
sed -i "s/# DBPassword=/DBPassword=zabbix/g" /usr/local/etc/zabbix_server.conf

#copy start file to init.d

cp /usr/local/src/zabbix-3.2.7/misc/init.d/fedora/core5/zabbix_server /etc/init.d/

chmod +x /etc/init.d/zabbix_server

#start zabbix
/etc/init.d/zabbix_server start

#modify php conf
sed -i "s#max_execution_time = 30#max_execution_time = 300#" /etc/php.ini

sed -i "s#max_input_time = 60#max_input_time = 300#" /etc/php.ini

sed -i "s#post_max_size = 8M#post_max_size = 32M#" /etc/php.ini

sed -i "s#;date.timezone =#date.timezone = Asia\/Shanghai#g" /etc/php.ini

#copy zabbix frontend to html
cd /usr/local/src/zabbix-3.2.7/frontends/
mkdir -p /var/www/html/zabbix
\cp -rf php/* /var/www/html/zabbix
chmod -R 777 /var/www/html/zabbix

原文地址:https://www.cnblogs.com/zmichael/p/12054325.html

时间: 2024-08-02 11:14:37

install zabbix的相关文章

yum install zabbix

环境: centos 6.5 下载并安装epel源 links  http://fedoraproject.org/wiki/EPEL rpm -ivh epel-* 2.安装amp环境 yum install httpd mysql mysql-server php php-mysql -y 3.安装zabbix yum install zabbix22.x86_64 zabbix22-agent.x86_64 zabbix22-server.noarch zabbix22-server-my

How to Install Zabbix Agent on Windows System

Zabbix Agent is installed on remote systems needs to monitor through Zabbix server. The Zabbix agent collects resource utilization and applications data on client system and provide such information to zabbix server on their requests. This article wi

Install Zabbix 3.4

Install Zabbix 3.4 which is an enterprise open source monitoring system. It's possible to monitor not only Linux but Windows, Solaris, IBM AIX and others. [1] On this example, It based on that SELinux is Permissive or Disabled. [2] Install Apache htt

How to install Zabbix on CENTOS 7

when you have installed zabbix , it is important of changing password. How to install Zabbix on CENTOS 7 Setup 1 INSTALL Create the repos of Zabbix rpm -ivh https://mirrors.aliyun.com/zabbix/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rp

CENTOS 6.8 INSTALL ZABBIX 3.2

查看自己得数据库版本yum list installed | grep mysql----------------------------------------Expected output:mysql-libs.x86_64    5.1.73-5.el6_6     @anaconda-CentOS-201508042137.x86_64/6.7---------------------------------------- 删除自己得老版本数据库yum remove mysql* 添加新

How to install zabbix 2.4.5 on OEL6u6 x86 64bit

1. 安装依赖包 2. 安装zabbix 3. 设置zabbix 1. 安装依赖包 # yum install OpenIPMI-devel Installed: OpenIPMI-devel.x86_64 0:2.0.16-14.el6 Dependency Installed: OpenIPMI.x86_64 0:2.0.16-14.el6 OpenIPMI-libs.x86_64 0:2.0.16-14.el6 lm_sensors-libs.x86_64 0:3.1.1-17.el6 n

Centos install zabbix

安装PHP.mysqlyum install php php-cli php-common php-devel php-pear php-gd php-mbstring php-mysql php-xml mysql-server 更改PHP设置:sed -i "s/;date.timezone =/date.timezone = Asia\/Shanghai/g" /etc/php.inised -i "s#max_execution_time = 30#max_execu

Pyhon install zabbix 4.0

1.安装 MySQLdb 模块;#!/bin/bash#this is rpm python Environment depends onfunction depends_rpm(){yum clean all yum -y install gcc* python-devel python-pip mariadb mariadb-devel mariadb-serverif [ $? -eq 0 ] thenpip install MySQL-python==1.2.5 elseecho "En

python install zabbix.4.0

1.安装 MySQLdb 模块; #!/bin/bash #this is rpm python Environment depends on function depends_rpm(){ yum clean all  yum -y install gcc* python-devel python-pip mariadb mariadb-devel mariadb-server if [ $? -eq 0 ]   then        pip install MySQL-python==1.