【原创】Centos7下zabbix环境配置

1、关闭firewall:
#停止firewall服务
systemctl stop firewalld.service
#禁止firewall开机启动
systemctl disable firewalld.service

2.关闭SELINUX
编辑 /etc/selinux/config 文件
将SELINUX=enforcing改为SELINUX=disabled:wq! #保存退出

reboot
重启生效
3. 安装apache
yum install httpd
systemctl enable httpd.service #设置apache开机启动

4.安装MariaDB
yum install mariadb mariadb-server #询问是否要安装,输入Y即可自动安装,直到安装完成
systemctl start mariadb.service #启动MariaDB
systemctl enable mariadb.service #设置开机启动

为root账户设置密码
mysql_secure_installation
回车,根据提示输入Y
输入2次密码,回车
根据提示一路输入Y

5. 安装php
yum install php
安装PHP组件,使PHP支持mysql
yum install php-mysql php-gd libjpeg* php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-bcmath php-mhash
重启对应服务
systemctl restart mariadb.service
systemctl restart httpd.service

编辑 /var/www/html/index.php
创建个phpinfo测试下
|
<?php phpinfo(); ?> |

结束
华盟君