1. Install lzop:
Yum-y install lzop
Ii. Install lzo
1. wget http://www.oberhumer.com/opensource/lzo/download/lzo-2.06.tar.gz
2. tar-zxvf lzo-2.06.tar.gz
3. Music lzo-2.06 lzo & cd lzo
4. export CFLAGS =-m64
5../configure-enable-shared
6. make & make install [installed in/usr/local/lib by default: liblzo2.a liblzo2.la liblzo2.so liblzo2.so. 2 liblzo2.so. 2.0.0]
7. Create the lzo. conf file in the/etc/ld. so. conf. d/directory. The content is as follows:
/Usr/local/lib
8. Enable lzo. conf to take effect:/sbin/ldconfig-v
3. Install Hadoop-LZO
1, download source code: https://github.com/twitter/hadoop-lzo
2. Decompress hadoop-lzo-master to go to The hadoop-lzo-master Directory.
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 [A hadoop-lzo-master Directory may exist in the hadoop-lzo-master Directory, and a MissingProjectException exception will be thrown, and the source code cannot be found, you need to compile in the hadoop-lzo-master/hadoop-lzo-master Directory, or remove a hadoop-lzo-master Directory]
8. Generate a target under the current directory. There is a native/Linux-amd64-64/lib directory below, copy the files under the lib directory to the lib/native directory of hadoop: tar-cb-c target/native // Linux-amd64-64/lib. | tar-xBvf--C/usr/local/hadoop/lib/native
9. Copy the hadoop-lzo-xxx.jar under target to hadoop/lib
References:
Build a Hadoop environment on Ubuntu 13.04
Cluster configuration for Ubuntu 12.10 + Hadoop 1.2.1
Build a Hadoop environment on Ubuntu (standalone mode + pseudo Distribution Mode)
Configuration of Hadoop environment in Ubuntu
Detailed tutorial on creating a Hadoop environment for standalone Edition
Build a Hadoop environment (using virtual machines to build two Ubuntu systems in a Winodws environment)