服务器部署zabbix
时间: 2023-11-25 11:04:48 浏览: 94
以下是服务器部署zabbix的步骤:
1.安装zabbix-server和zabbix-agent
```shell
yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent -y
```
2.创建zabbix数据库
```shell
mysql -uroot -p
create database zabbix character set utf8 collate utf8_bin;
grant all privileges on zabbix.* to zabbix@localhost identified by 'password';
flush privileges;
quit;
```
3.导入zabbix初始数据库
```shell
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
```
4.修改zabbix-server配置文件
```shell
vim /etc/zabbix/zabbix_server.conf
```
修改以下参数:
```conf
DBName=zabbix
DBUser=zabbix
DBPassword=password
```
5.启动zabbix-server和zabbix-agent
```shell
systemctl start zabbix-server
systemctl start zabbix-agent
```
6.配置zabbix-web
```shell
vim /etc/httpd/conf.d/zabbix.conf
```
修改以下参数:
```conf
php_value date.timezone Asia/Shanghai
```
7.重启httpd服务
```shell
systemctl restart httpd
```
8.访问zabbix-web
在浏览器中输入`http://your_ip_address/zabbix`,按照提示进行安装。
阅读全文