centos7 LAMP环境安装zabbix3.0
发表于:2024-10-27 作者:千家信息网编辑
千家信息网最后更新 2024年10月27日,zabbix3.0要求的PHP、数据库、Apache/Nginx的版本参考:zabbix3.0对PHP、数据库、nginx/apache版本要求参考:https://www.zabbix.com/do
千家信息网最后更新 2024年10月27日centos7 LAMP环境安装zabbix3.0
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 -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.
创建zabbix库,授权zabbix用户
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安装
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 = 300
启动php-fpm
apache为yum安装
vim /etc/httpd/conf/httpd.conf#把配置地址修改为将要安装的zabbix位置,DocumentRoot "/var/www/html/zabbix-3.0.9"ServerSignature On#增加对.php的默认DirectoryIndex index.html index.php#进行部分优化Options Includes ExecCGI FollowSymLinksOptions FollowSymLinksAllowOverride AllMaxKeepAliveRequests 500AddDefaultCharset GB2312max_execution_time = 300systemctl restart httpd.service
创建test.php验证php是否正常
echo "" > /var/www/html/zabbix/test.php
显示phpinfo界面为正常,然后删除test.php
安装zabbix
下载zabbix3.0 LTS,下载速度有点慢,建议用其他工具下载本地后,rz上传
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
创建zabbix用户
groupadd zabbixuseradd zabbix -s /sbin/nologin -M -g zabbix
导入3个sql文件到zabbix数据库
mysql -uroot -p zabbix < database/mysql/schema.sqlmysql -uroot -pzabbix < database/mysql/p_w_picpaths.sqlmysql -uroot -p zabbix < 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
访问网页进行安装,中间一个步骤需要下载文件并上传,上传后需修改所属。
版本
数据
数据库
文件
用户
参考
环境
位置
地址
工具
工具下载
建议
所属
步骤
界面
第一次
系统
网页
速度
部分
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
开源bi数据库架构
软件开发 猪八戒
网络安全法国家实行安全保护制度
广州在线医疗健康软件开发
plc服务器历史数据
暴雪服务器爆满邀请码
怎样使用人工智能服务器
数据库2005密钥
3000兆服务器网站
cdn和云服务器的关系
新吴区互联网智能科技机构整顿
网络安全现场检查记录表
服务器吏机
软件开发公司企划案
宠物小精灵服务器错误
网络安全知识点大全
联盟与服务器之间的通讯出现问题
服务器满了怎么解决
数据库中几种键联系和区别
高温疲劳寿命分析软件开发
光软件开发
上海长航网络技术
学网络技术需要什么基础
备份到 s3 服务器
交出数据库
辽宁卫视网络安全
u盘或者管理口连接 服务器
网络安全手抄报清晰 a4纸
匠魂11服务器在哪
与软件开发有关的数学