2020-02-24 终于把zabbix安装上了

sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-agent

报错: libevent-dev : Depends: libevent-2.0-5 (>= 2.0.10-stable) but it is not installable

按照下面的步骤从源安装了:

1)http://libevent.org/

解压,这个不用我教了吧,进去以后

按照README中的描述进行编译生成库文件 

此版本没有configure.sh文件,需要先运行autogen.sh文件生成configure文件,但在执行“sudo ./autogen.sh”命令时报错 

“./autogen.sh: 11: ./autogen.sh: aclocal: not found”

需要安装:apt-get install autoconf automake libtool

后面执行 ./configure --prefix=/usr

                 make && make install

安装完成

2)如果是之前安装过的,需要先删掉原来的库,查看下之前库安装在/usr/lib里面

    rm -rf /usr/lib/libevent*

在执行上述安装步骤,安装好以后,还要告诉系统安装路径

vi /etc/ld.so.conf.d/libc.conf 

将安装好的库路径/usr/lib输入进去

ldconfig 生效一下,即可!


再次执行安装,依然报错!

有人说可能是安装源的问题,都改成hk也不行啊

https://repogen.simplylinux.ch/generate.php

实在是烦,先下载了deb的安装包:zabbix-server-mysql_3.0.12+dfsg-1_amd64.deb

http://archive.ubuntu.com/ubuntu/pool/universe/z/zabbix/zabbix-server-mysql_3.0.12+dfsg-1_amd64.deb

再将源改成阿里云的:

# Aliyun

deb-src http://archive.ubuntu.com/ubuntu bionic main restricted #Added by software-properties

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted

deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted multiverse universe #Added by software-properties

deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted

deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted multiverse universe #Added by software-properties

deb http://mirrors.aliyun.com/ubuntu/ bionic universe

deb http://mirrors.aliyun.com/ubuntu/ bionic-updates universe

deb http://mirrors.aliyun.com/ubuntu/ bionic multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-updates multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse #Added by software-properties

deb http://archive.canonical.com/ubuntu bionic partner

deb-src http://archive.canonical.com/ubuntu bionic partner

deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted

deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted multiverse universe #Added by software-properties

deb http://mirrors.aliyun.com/ubuntu/ bionic-security universe

deb http://mirrors.aliyun.com/ubuntu/ bionic-security multiverse


最后,直接安装:

sudo apt install ./zabbix-server-mysql_3.0.12+dfsg-1_amd64.deb

居然成功了!WTF!!

你可能感兴趣的:(2020-02-24 终于把zabbix安装上了)