LANM 基础组件
yum install gcc gcc-c++ autoconf automake make –y
装php apache 数据库用mariadb
yum install php php-gd php-mysql php-bcmath php-mbstring php-xml curl curl-devel net-snmp net-snmp-devel perl-DBI –y
yum install httpd –y
yum install mariadb* -y
修改httpd.conf
ServerName 为本机ip:80
DirectoryIndex,新增index.php
设置开机启动
systemctl enable httpd
systemctl enable mariadb
修改PHP相关参数:
max_execution_time = 300
max_input_time = 300
memory_limit = 128M
upload_max_filesize = 2M
date.timezone = Asia/Shanghai
post_max_size = 28M
always_populate_raw_post_data -1
创建zabbix数据库
mysql –uroot -p
create database zabbix character set utf8; (创建数据库和类型)
insert into mysql.user(Host,User,Password)values(‘localhost‘,‘zabbix‘,password(‘zabbix‘)); (创建数据库用户密码)
grant 权限1,权限2,…权限n on 数据库名称.表名称 to 用户名@用户地址 identified by ‘连接口令’;
grant all on zabbix.* to ‘zabbix‘@‘127.0.0.1‘ identified by ‘zabbix‘ with grant option; (授权所有表)
grant all on zabbix.* to ‘zabbix‘@‘localhost‘ identified by ‘zabbix‘ with grant option; (授权所有表)
flush privileges; (更新数据)
安装zabbix Server 3.0.1
rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm (装入repo)
yum install zabbix-server-mysql zabbix-web-mysql
yum install zabbix-agent
导入数据库
# cd /usr/share/doc/zabbix-server-mysql-3.0.1
# zcat create.sql.gz | mysql -uroot zabbix
编辑zabbix server文档
# vi /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
systemctl start zabbix-agent
web修改可以支持中文
修改你的 locales.inc.php 原本是false 改成true
‘zh_CN‘ => [‘name‘ => _(‘Chinese (zh_CN)‘), ‘display‘ => true],
修改字体
修改你的defines.inc.php
邮件报警
安装mailx
配置Zabbix服务端外部邮箱
vi /etc/mail.rc #编辑,添加以下信息
set from=xxx@163.com smtp=smtp.163.com
set smtp-auth-user= xxx@163.com smtp-auth-password=密码
set smtp-auth=login
感谢各大版主提供资料参考
原文:http://increase.blog.51cto.com/1552377/1765910