hadoop-lzo的安装:
----------------------
1.本地库的安装
获取到安装包lzo-2.10.tar.gz 后
执行下列命令:
tar -zxvf lzo-2.06.tar.gz -C /opt/tool/
cd /opt/tool/lzo-2.06/
mkdir /usr/local/lzo
./configure --enable-shared --prefix /usr/local/lzo
make & sudo makeinstall
2.hadoop-lzo的jar包制作
解压下载过来的hadoop-lzo-master.zip: unzip hadoop-lzo-master.zip
在解压目录下执行下列命令:
export CFLAGS=-m64
export CXXFLAGS=-m64
export LIBRARY_PATH=/usr/local/lzo/lib
export C_INCLUDE_PATH=/usr/local/lzo/include
export LIBRARY_PATH=/usr/local/lzo/lib
mvn clean package -Dmaven.test.skip=true
cd target/native/Linux-amd64-64
tar -cBf - -C lib . | tar -xBvf - -C ~ <产生连接文件>
mv ~/libgplcompression* $HADOOP_HOME/lib/native/ <将连接文件拷贝到hadoop相应目录下>
3.将mvn打包的hadoop-lzo-0.4.20-SNAPSHOT.jar复制到hadoop的common目录下
然后就可以开始使用Lzo了
转载内容
转载于 https://www.cnblogs.com/xd502djj/p/4878335.html
|
--------------------
2、安装lzo 操作如下: wget http://www.oberhumer.com/opensource/lzo/download/lzo-2.06.tar.gz export CFLAGS=-m32 ./configure -enable-shared make && make install 完成之后,lib库文件被默认安装到了/usr/local/lib,我们需要进一步指定lzo库文件的路径,两个方法都可以: 1)拷贝/usr/local/lib目录下的lzo库文件到/usr/lib(32位平台),或/usr/lib64(64位平台) 2)在/etc/ld.so.conf.d/目录下新建lzo.conf文件,只需写入lzo库文件的路径(/usr/local/lib),然后运行以下命令使配置生效:
3 安装lzop LZOP是使用lzo库写的一个程序,通过shell命令直接可以压缩、解压缩文件。 #下载 Wget http://www.lzop.org/download/lzop-1.03.tar.gz #解压缩、进入项目目录(略过) ./configure make make install 用一下lzop的压缩解压功能,成功安装后可直接使用lzop命令对文件进行解压缩操作了。 # 压缩 lzop 20110915.log #生成lzop 20110915.log.lzo文件 # 解压,并输出文件内容 lzop -cdpv.txt.lzo |more