[root@zabbix-server ~]# yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel libffi-devel gcc make
[root@zabbix-server ~]# wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz
[root@zabbix-server ~]# mkdir -p /usr/local/python3
[root@zabbix-server ~]# tar xvf Python-3.7.4.tgz
[root@zabbix-server ~]# cd Python-3.7.4
[root@python Python-3.7.4]# ./configure --prefix=/usr/local/python3/
[root@python Python-3.7.4]# make && make install
[root@python Python-3.7.4]# ln -s /usr/local/python3/bin/python3.7 /usr/bin/python3
[root@python Python-3.7.4]# ln -s /usr/local/python3/bin/pip3.7 /usr/bin/pip3
[root@python Python-3.7.4]# python3 -V
[root@python Python-3.7.4]# pip3 -V
安装python-pip和requests库
[root@zabbix-server alertscripts]# yum -y install epel-release
[root@zabbix-server alertscripts]# yum -y install python-pip
[root@zabbix-server alertscripts]# pip3 install requests