curl -O http://www.oberhumer.com/opensource/lzo/download/lzo-2.10.tar.gz
tar zxvf lzo-2.10.tar.gz
cd lzo-2.10/
export CFLAGS=-m64 ./configure -enable-shared make && sudo make install
/usr/local/lib
,所以需要先把该路径加到ldconfig的路径中,然后刷新动态链接库:
sudo touch /etc/ld.so.conf.d/lzo.conf sudo sh -c 'echo /usr/local/lib >/etc/ld.so.conf.d/lzo.conf' sudo /sbin/ldconfig -v # 查看一下 ldconfig -p | grep lzo
curl -O http://www.lzop.org/download/lzop-1.04.tar.gz
tar zxvf lzop-1.04.tar.gz
cd lzop-1.04/
./configure make && sudo make install # 验证一下 lzop -h
假设已经安装配置好了maven
git clone https://github.com/twitter/hadoop-lzo
cd hadoop-lzo/
export CFLAGS=-m64 export CXXFLAGS=-m64 export C_INCLUDE_PATH=/usr/local/include/lzo export LIBRARY_PATH=/usr/local/lib
mvn clean package -Dmaven.test.skip=true # 在target目录下,会看到hadoop-lzo-0.4.21-SNAPSHOT.jar包
cp ~/hadoop-lzo-0.4.21-SNAPSHOT.jar presto-server-0.184/plugin/hive-hadoop2/hadoop-lzo-0.4.21-SNAPSHOT.jar
-DHADOOP_USER_NAME=<hadoop用户名>