目录
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();
?>