CentOS 8.0.1905中安装ZABBIX4.4版本的方法

2023-04-19 07:23:00 版本 方法 安装

CentOS 8.0.1905安装ZABBIX4.4版本的方法如下:

1、首先,需要更新CentOS 8.0.1905的软件包,这样可以确保安装的软件是最新的:

sudo yum update

2、安装必要的软件包:

sudo yum install -y gcc make wget net-snmp-devel libxml2-devel libcurl-devel libevent-devel openssl-devel

3、下载ZABBIX 4.4源码:

wget https://nchc.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/4.4.0/zabbix-4.4.0.tar.gz

4、解压源码:

tar -zxvf zabbix-4.4.0.tar.gz

5、进入解压后的源码目录:

cd zabbix-4.4.0

6、编译安装ZABBIX:

./configure --enable-server --enable-agent --with-mysql --with-net-snmp --with-libcurl --with-libxml2 --with-openssl
make install

7、创建ZABBIX数据库:

mysql -u root -p
CREATE DATABASE zabbix DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
GRANT ALL PRIVILEGES ON zabbix.* TO zabbix@localhost IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
quit;

8、导入数据库:

zcat /usr/local/share/doc/zabbix-server-mysql-4.4.0/create.sql.gz | mysql -uzabbix -p zabbix

9、编辑ZABBIX配置文件:

vi /usr/local/etc/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=password

10、启动ZABBIX服务:

systemctl start zabbix_server
systemctl start zabbix_agentd

11、设置ZABBIX服务开机自启:

systemctl enable zabbix_server
systemctl enable zabbix_agentd

12、使用浏览器访问ZABBIX:

http://IP_Address/zabbix

相关文章