LNMP+Zabbix部署监控--可视化监控数据状态详解

本文详细介绍了如何在Linux环境下部署LNMP,并结合Zabbix进行服务器监控。从LNMP的安装配置,包括nginx、mysql和php的安装,到Zabbix Server的部署,包括yum源安装、权限配置、数据库连接和时区调整,再到Zabbix Agent的安装与网络配置,最后展示了如何通过Zabbix监控各项服务状态和数据,实现系统状态的可视化管理。
摘要由CSDN通过智能技术生成

Zabbix部署

一、LNMP安装环境

1、安装nginx1.14

wget http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm

#需要搭配本地源,千万不要移动到别的地方
vim /etc/yum.repos.d/nginx.repo
#手动创建nginx yum安装源

[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/7/$basearch/
gpgcheck=0
enabled=1

其中baseurl=http/nginx.org/packages/OS/OSRELEASE/$basearch/,把"” OS”替换成” rhel”或" centos”,把” OSRELEASE”替换成”6”或”7”
yum clean all
yum list

yum install nginx -y	#安装nginx,默认为nginx-1.12.2
systemctl start nginx
systemctl enable nginx

#检查防火墙是否关闭

试访问192.168.171.7

mark

2、安装mysql 5.7

yum install -y mariadb-server mariadb

systemctl enable mariadb.service
systemctl start mariadb.service

mysql_secure_installation  #会进入设置阶段

具体操作

Enter current password for root (enter for none):   #回车
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] y    #属入y
New password:    #设置密码
Re-enter new password:  	#再次密码
Password updated successfully!
Reloading privilege tables..
 ... Success!

Remove anonymous users? [Y/n] n   #n不删除匿名用户
 ... skipping.

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] n  #n允许远程登录
 ... skipping.

By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] n	#n不删除测试数
 ... skipping.


Reload privilege tables now? [Y/n] y    #y重新加载刷新
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

验证密码是否设置成功

mysql -uroot -p

mark

3、安装php 7.2

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
或
yum install epel-release -y  (没成功)

#yum仓库建立
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm 

#yum源等待时间取决于网络
yum install -y php72w php72w-devel php72w-fpm php72w-gd php72w-mbstring php72w-mysql

php -v 
#查看php版本

4、配置nginx支持php

vim /etc/php-fpm.d/ww
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值