AReallyMan 2019-07-13
在网上有很多介绍thrift安装的方法,但是大多都是基于机器联网的情况下使用yum或者apt-get进行安装。 在某些情况下,节点环境中不能连接外网。这个时候安装起来就比较麻烦了。
本文介绍在使用iso镜像的情况下,如何进行thrift安装(thrift-0.9.3)。
首先将系统对应iso文件映射到一个目录,比如映射到/mnt/isorom。
然后依次安装下列rpm包进行thrift安装之前的准备,脚本内容如下:
(在下列rpm包安装之前,gcc glibc等软件包的安装,这里不再重复,有需要的可以留言。)
#!/usr/bin/bash
echo "before install thrift, please installation following rpm packages firstly"
rpm -ivh libmpc-[1-9]*
rpm -ivh perl-Thread-Queue-*.noarch.rpm
rpm -ivh perl-Data-Dumper-*. x86_64.rpm
rpm -ivh perl-Test-Harness-*.noarch.rpm
rpm -ivh autoconf-[2-9]*.noarch.rpm
rpm -ivh automake-*.noarch.rpm
rpm -ivh libtool-[2-9]*_2.x86_64.rpm
rpm -ivh bison-*.rpm
rpm -ivh libicu-[5-9]*.x86_64.rpm
rpm -ivh boost-atomic-*.x86_64.rpm
rpm -ivh boost-chrono-*.x86_64.rpm
rpm -ivh boost-context-*.x86_64.rpm
rpm -ivh boost-date-time-*.x86_64.rpm
rpm -ivh boost-filesystem-*.x86_64.rpm
rpm -ivh boost-regex-*.x86_64.rpm
rpm -ivh boost-graph-*.x86_64.rpm
rpm -ivh boost-iostreams-*.x86_64.rpm
rpm -ivh boost-locale-*.x86_64.rpm
rpm -ivh boost-math-*.x86_64.rpm
rpm -ivh boost-program-options-*.x86_64.rpm
rpm -ivh boost-Python-*.x86_64.rpm
rpm -ivh boost-random-*.x86_64.rpm
rpm -ivh boost-serialization-*.x86_64.rpm
rpm -ivh boost-signals-*.x86_64.rpm
rpm -ivh boost-test-*.x86_64.rpm
rpm -ivh boost-timer-*.x86_64.rpm
rpm -ivh boost-wave-*.x86_64.rpm
rpm -ivh boost-[1-9]*.x86_64.rpm
rpm -ivh boost-devel-*.x86_64.rpm
rpm -ivh libevent-*.x86_64.rpm
rpm -ivh zlib-devel-*.x86_64.rpm
rpm -ivh krb5-libs-*.x86_64.rpm
rpm -ivh libcom_err-devel*.x86_64.rpm
rpm -ivh libkadm5-*.x86_64.rpm
rpm -ivh libsepol-devel-*.x86_64.rpm
rpm -ivh keyutils-libs-devel-*.x86_64.rpm
rpm -ivh pcre-devel-*.x86_64.rpm
rpm -ivh libselinux-devel-*.x86_64.rpm
rpm -ivh libverto-devel-*.x86_64.rpm
rpm -ivh krb5-devel-*.x86_64.rpm
rpm -ivh openssl-devel-*.x86_64.rpm
echo "install package finished."
其实最方便的方法,还是把iso镜像作为yum源,使用yum的方式 进行安装。
(yum install automake libtool flex bison pkgconfig gcc-c++ boost-devel libevent-devel zlib-devel python-devel ruby-devel openssl-devel)
环境准备完毕,然后就可以将thrift-0.9.3.tar.gz进行解压,然后执行./configure; make ;make install 命令进行安装了。