Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Install zabbix3.0 in centos7 LAMP environment

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Version references for PHP, database, and Apache/Nginx required by zabbix3.0:

For more information on zabbix3.0 's requirements for PHP, database and nginx/apache versions, please see:

Https://www.zabbix.com/documentation/3.0/manual/installation/requirements

The system environment for this installation is centos7.2,lamp. The version used for the first installation is centos6.6,lnmp. It can be used normally after installation.

Mysql version

[root@aliyun-s2] # mysql-vWelcome to the MariaDB monitor. Commands end with; or\ g.Your MariaDB connection id is 4572Server version: 5.5.52-MariaDB MariaDB ServerCopyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.Reading history-file / root/.mysql_historyType 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.

Create a zabbix library to authorize zabbix users

Create database zabbix default charset utf8;grant all privileges on zabbix.* to zabbix@'localhost' identified by 'zabbix';flush privileges;MariaDB [(none)] > show databases;+-+ | Database | +-+ | information_schema | | mysql | | performance_schema | | zabbix | +-+ 4 rows in set (0.03 sec)

Php installation

Yum install php php-fpm php-mysql php-gd libjpeg* php-ldap php-odbc php-pear php-xmlrpc php-mbstring php-bcmath-y [root@djlink-aliyun-s2 ~] # php- vPHP 5.4.16 (cli) (built: Nov 6 2016 00:29:02) Copyright (c) 1997-2013 The PHP GroupZend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologiesvim / etc/php.inidate.timezone = Asia/Shanghaipost_max_size = 16Mmax_execution_time = 300max_input_time =

Start php-fpm

Apache is installed for yum

Vim / etc/httpd/conf/httpd.conf# modifies the configuration address to the location of the zabbix to be installed, and the DocumentRoot "/ var/www/html/zabbix-3.0.9" ServerSignature On# adds partial optimizations to the default DirectoryIndex index.html index.php# of .php Options Includes ExecCGI FollowSymLinksOptions FollowSymLinksAllowOverride AllMaxKeepAliveRequests 500AddDefaultCharset GB2312max_execution_time = 300systemctl restart httpd.service

Create a test.php to verify that the php is working

Echo "" > / var/www/html/zabbix/test.php

Display the phpinfo interface as normal, and then delete test.php

Install zabbix

Download zabbix3.0 LTS, the download speed is a little slow, it is recommended to use other tools to download the local, rz upload

Wget https://sourceforge.net/projects/zabbix/files/ZABBIX%20Latest%20Stable/3.0.9/zabbix-3.0.9.tar.gztar zxf zabbix-3.0.9.tar.gz & & cd zabbix-3.0.9./configure-- prefix=/usr/local/zabbix-3.0.9/-- enable-server-- enable-agent-- with-mysql-- with-net-snmp-- with-libcurl-- with-libxml2make & & make install

Create a zabbix user

Groupadd zabbixuseradd zabbix-s / sbin/nologin-M-g zabbix

Import 3 sql files into the zabbix database

Mysql-uroot-pzabbix < database/mysql/schema.sqlmysql-uroot-pzabbix < database/mysql/p_w_picpaths.sqlmysql-uroot-pzabbix < database/mysql/data.sql

Edit zabbix_server.conf

Vim / usr/local/zabbix-3.0.9/etc/zabbix_server.confLogFile=/tmp/zabbix_server.logPidFile=/tmp/zabbix_server.pidDBHost=localhostDBName=zabbixDBUser=zabbixDBPassword=zabbix

Start zabbix_server

/ usr/local/zabbix-3.0.9/sbin/zabbix_server

Visit the web page to install. In the middle step, you need to download the file and upload it. After uploading, you need to modify the owner.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report