hadoop-lzo-0.4.20安装

2022-06-30 19:47:09 浏览数 (1)

一、安装lzop: yum -y install lzop

二、安装lzo 1、wget http://www.oberhumer.com/opensource/lzo/download/lzo-2.06.tar.gz 2、tar -zxvf lzo-2.06.tar.gz 3、mv lzo-2.06 lzo && cd lzo 4、export CFLAGS=-m64 5、./configure -enable-shared 6、make && make install【默认安装在了/usr/local/lib下:liblzo2.a  liblzo2.la  liblzo2.so  liblzo2.so.2  liblzo2.so.2.0.0】 7、在/etc/ld.so.conf.d/目录下新建lzo.conf文件,内容: /usr/local/lib 8、让lzo.conf生效:/sbin/ldconfig -v

三、安装Hadoop-LZO 1、下载源码:https://github.com/twitter/hadoop-lzo 2、解压后是hadoop-lzo-master,进入hadoop-lzo-master目录 3、export CFLAGS=-m64 4、export CXXFLAGS=-m64 5、export C_INCLUDE_PATH=/usr/local/include/lzo 6、export LIBRARY_PATH=/usr/local/lib 7、mvn clean package -Dmaven.test.skip=true【可能在hadoop-lzo-master目录下还有一个hadoop-lzo-master目录,就会抛MissingProjectException异常,找不到源码,需要进入hadoop-lzo-master/hadoop-lzo-master目录下编译,或者去掉一层hadoop-lzo-master目录】 8、在当前目录下生成了target,下面有个native/Linux-amd64-64/lib目录,将lib目录下的文件拷贝到hadoop的lib/native目录下:tar -cBf - -C target/native//Linux-amd64-64/lib . | tar -xBvf - -C /usr/local/hadoop/lib/native

9、将target下的hadoop-lzo-xxx.jar拷贝到hadoop/lib下

参考资料: http://www.linuxidc.com/Linux/2014-03/98602.htm

0 人点赞