先最小安装CentOS7
安装源:http://mirrors.163.com/centos/7/os/x86_64/
软件选择:最小安装基本功能
添加epel源
yum install epel-release
命令自动补全
yum install bash-completion
更新系统
yum update
安装数据库
yum install mariadb-server
启动数据库
systemctl start mariadb.service
配置数据库账号
mysql_secure_installation
安装web环境
yum install php php-mysql httpd
安装zabbix库及程序
# rpm -i http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
# yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent
创建初始数据库
# mysql -uroot -p
password
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'password';
mysql> quit;
# zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
修改zabbix server配置文件数据库连接密码
Edit file /etc/zabbix/zabbix_server.conf
DBPassword=password
修改前端PHP配置文件的时区
Edit file /etc/httpd/conf.d/zabbix.conf, uncomment and set the right timezone for you.
# php_value date.timezone Asia/Shanghai
启动服务程序
systemctl start mariadb.service
systemctl enable mariadb.service
systemctl start zabbix-server.service
systemctl enable zabbix-server.service
systemctl start zabbix-agent.service
systemctl enable zabbix-agent.service
systemctl start httpd.service
systemctl enable httpd.service
允许防火墙http访问
firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --reload
进行web控制台设置
填写数据库连接信息等完成设置
setsebool -P httpd_can_network_connect on selinux 允许它通过httpd服务