搭建zabbix监控及邮件报警,未完

1. 搭建环境:

zabbix   192.168.152.130  centos7.6
linux    192.168.152.129  centos7.6
windows  192.168.152.12

2. zabbix的安装:

2.1. 先安装nginx:

systemctl stop firewalld.service       #关闭防火墙及核心安全机制
setenforce 0

yum install -y nginx

systemctl start nginx
systemctl enable nginx
netstat -natp | grep 80

2.2 安装mariadb:

yum -y install mariadb-server mariadb

systemctl start mariadb.service
systemctl enable mariadb.service
netstat -natp | grep 3306

mysql_secure_installation
Enter current password for root (enter for none):			#回车
Set root password? [Y/n]									#Y
New password:												#123456
Re-enter new password:										#123456
Remove anonymous users?										#n
Disallow root login remotely?								#n
Remove test database and access to it?						#n
Reload privilege tables now?								#Y


2.3 安装php:

yum -y install epel-release.noarch
yum install -y httpd mariadb-server mariadb php php-mysql php-gd libjpeg* php-ldap php-odbc php-pear php-xml php-xmlrpc php-mhash
php -v	

2.4 修改配置文件

[root@localhost ~]# vim /etc/httpd/conf/httpd.conf 
ServerName www.aa.com:80
<IfModule dir_module>
    DirectoryIndex index.html index.php
</IfModule>
[root@localhost ~]# vim /etc/php.ini
date.timezone = PRC

2.5 启动apache和mariadb

这里想了想 还是apache比较温柔,索性就用apache继续做

[root@server ~]# systemctl start httpd
[root@server ~]# netstat -antp | grep 80
tcp6       0      0 :::80                   :::*                    LISTEN      12903/httpd         
[root@server ~]# 

2.6 验证php网页是否可以打开

[root@localhost ~]# vi /var/www/html/index.php
<?php
phpinfo();
?>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值