• ADADADADAD

    centos7 LAMP环境安装zabbix3.0[ mysql数据库 ]

    mysql数据库 时间:2024-12-25 09:58:11

    作者:文/会员上传

    简介:

    zabbix3.0要求的PHP、数据库、Apache/Nginx的版本参考:zabbix3.0对PHP、数据库、nginx/apache版本要求参考:https://www.zabbix.com/documentation/3.0/manual/installation/r

    以下为本文的正文内容,内容仅供参考!本站为公益性网站,复制本文以及下载DOC文档全部免费。

    zabbix3.0要求的PHP、数据库、Apache/Nginx的版本参考:

    zabbix3.0对PHP、数据库、nginx/apache版本要求参考:

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


    本次安装的系统环境为centos7.2,lamp。第一次安装使用的版本是centos6.6,lnmp。安装后均可正常使用。

    mysql版本

    [root@aliyun-s2~]#mysql-vWelcometotheMariaDBmonitor.Commandsendwith;or\g.YourMariaDBconnectionidis4572Serverversion:5.5.52-MariaDBMariaDBServerCopyright(c)2000,2016,Oracle,MariaDBCorporationAbandothers.Readinghistory-file/root/.mysql_historyType'help;'or'\h'forhelp.Type'\c'toclearthecurrentinputstatement.

    创建zabbix库,授权zabbix用户

    createdatabasezabbixdefaultcharsetutf8;grantallprivilegesonzabbix.*tozabbix@'localhost'identifiedby'zabbix';flushprivileges;MariaDB[(none)]>showdatabases;+--------------------+|Database|+--------------------+|information_schema||mysql||performance_schema||zabbix|+--------------------+4rowsinset(0.03sec)

    php安装

    yuminstallphpphp-fpmphp-mysqlphp-gdlibjpeg*php-ldapphp-odbcphp-pearphp-xmlrpcphp-mbstringphp-bcmath-y
    [root@djlink-aliyun-s2~]#php-vPHP5.4.16(cli)(built:Nov6201600:29:02)Copyright(c)1997-2013ThePHPGroupZendEnginev2.4.0,Copyright(c)1998-2013ZendTechnologiesvim/etc/php.inidate.timezone=Asia/Shanghaipost_max_size=16Mmax_execution_time=300max_input_time=300

    启动php-fpm

    apache为yum安装

    vim/etc/httpd/conf/httpd.conf#把配置地址修改为将要安装的zabbix位置,DocumentRoot"/var/www/html/zabbix-3.0.9"ServerSignatureOn#增加对.php的默认DirectoryIndexindex.htmlindex.php#进行部分优化OptionsIncludesExecCGIFollowSymLinksOptionsFollowSymLinksAllowOverrideAllMaxKeepAliveRequests500AddDefaultCharsetGB2312max_execution_time=300systemctlrestarthttpd.service

    创建test.php验证php是否正常

    echo"<?phpphpinfo();?>">/var/www/html/zabbix/test.php

    显示phpinfo界面为正常,然后删除test.php

    安装zabbix

    下载zabbix3.0 LTS,下载速度有点慢,建议用其他工具下载本地后,rz上传

    wgethttps://sourceforge.net/projects/zabbix/files/ZABBIX%20Latest%20Stable/3.0.9/zabbix-3.0.9.tar.gztarzxfzabbix-3.0.9.tar.gz&&cdzabbix-3.0.9./configure--prefix=/usr/local/zabbix-3.0.9/--enable-server--enable-agent--with-mysql--with-net-snmp--with-libcurl--with-libxml2make&&makeinstall

    创建zabbix用户

    groupaddzabbixuseraddzabbix-s/sbin/nologin-M-gzabbix

    导入3个sql文件到zabbix数据库

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

    编辑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

    启动zabbix_server

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

    访问网页进行安装,中间一个步骤需要下载文件并上传,上传后需修改所属。

    centos7 LAMP环境安装zabbix3.0.docx

    将本文的Word文档下载到电脑

    推荐度:

    下载
    热门标签: centoslampzabbix