zabbix+grafana(邮件+微信报警) 监控 lnmp部署WordPress (一)

实验要求:

zabbix+grafana 并实现微信报警和邮件报警,使用lnmp+wordpress 完成web,并用zabbix监控,并实时告警

环境:

​ A:192.168.59.3

​ B:192.168.59.4

​ C: 192.168.59.5

实现 lnmp+wordpress

安装epel源

[root@192 ~]# yum -y install epel-release

安装lnmp相关组件 上传WordPress包

[root@192 ~]# yum -y install nginx mariadb mariadb-server php php-server php-mysql php-gd php-fpm php-devel
[root@192 ~]# ls
anaconda-ks.cfg  wordpress-4.9.4-zh_CN.zip

修改配置文件

[root@192 ~]# cd /etc/nginx/
[root@192 nginx]# mv nginx.conf.default nginx.conf
[root@192 nginx]# vim nginx.conf
location / {
            root   html;
            index  index.php index.html index.htm;
        }
location ~ \.php$ {
            root           html;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            include        fastcgi_params;
}
[root@192 nginx]# cd /usr/share/nginx/html/
[root@192 html]# vim index.php
[root@192 html]# cat index.php 
<?php
phpinfo();
?>
[root@192 html]# systemctl restart nginx mariadb php-fpm

在这里插入图片描述
在这里插入图片描述
部署wordpress

[root@192 ~]# mv wordpress-4.9.4-zh_CN.zip /usr/share/nginx/html/
[root@192 html]# cp -R wordpress/* /usr/share/nginx/html/
cp:是否覆盖"/usr/share/nginx/html/index.php"yes
[root@192 ~]# chmod -R 777 /usr/share/nginx/html/
[root@192 html]# mysql
MariaDB [(none)]> create database zhang character set utf8;
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> grant all on *.* to 'feng'@'localhost' by '123';
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.00 sec)
[root@192 html]# cp wp-config-sample.php wp-config.php
// ** MySQL 设置 - 具体信息来自您正在使用的主机 ** //
/** WordPress数据库的名称 */
define('DB_NAME', 'zhang');

/** MySQL数据库用户名 */
define('DB_USER', 'feng');

/** MySQL数据库密码 */
define('DB_PASSWORD', '123');

/** MySQL主机 */
define('DB_HOST', 'localhost');

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

峰宝宝守护。

乐已忘忧,心旷神愉

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值