Wiki链接:
https://code.google.com/p/cloudxy/wiki/INTEGRATE_HLFS_INTO_OPENSTACK?ts=1368453854&updated=INTEGRATE_HLFS_INTO_OPENSTACK
一键安装暂时行不通,继续手动安装。遇到一些问题如下:
【1】第四步
”---------------------------------
4, 安装Hadoop环境
wget
http://archive.cloudera.com/cdh4/one-click-install/precise/amd64/cdh4-repository_1.0_all.deb
sudo dpkg -i cdh4-repository_1.0_all.deb
“----------------------------------
cdh4的deb包,只支持Ubuntu 64位机。链接:
http://www.cloudera.com/content/cloudera-content/cloudera-docs/CDH4/latest/CDH4-Requirements-and-Supported-Versions/cdhrsv_topic_1.html
我的机器是32的,所以改为安装hadoop-1.0.4.
【2】第五步
“------------------------------------
5,编译安装HLFS
sudo apt-get install libhdfs0-dev
svn checkout
https://cloudxy.googlecode.com/svn/trunk/hlfs/ hlfs
(目前已经没有3part目录了,也不用再手动修改cmakelist.txt中路径了)
cd hlfs/build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/lib ../src
(在给定位置——我们给定到/usr/local/lib目录下,生成makefile文件)
sudo make install (头文件和lib,bin等都被安装到/usr/lib/hlfs目录下;如果编译出现
“usr/include/glib-2.0/glib/gtypes.h:34:24: fatal error: glibconfig.h:
No such file or directory” ,别慌,执行 sudo cp
/usr/lib/i386-linux-gnu/glib-2.0/include/glibconfig.h
/usr/include/glib-2.0/ 或者 执行sudo cp
/usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h
/usr/include/glib-2.0/ 即可.)
“------------------------------------
a. sudo apt-get install libhdfs0-dev不起作用之后,我改成将hadoop源码包中的libhdfs.so拷贝到"lib"库中。
a1.$sudo cp c++/Linux-i386-32/lib/libhdfs.so /usr/local/lib/
a2.$sudo cp c++/Linux-i386-32/lib/libhdfs.so /usr/lib/
a3.将 c++/Linux-i386-32/lib/加入/etc/ld.so.conf, 并 sudo ldconfig使其生效
b.cmake -DCMAKE_INSTALL_PREFIX=/usr/local/lib ../src
(在给定位置——我们给定到/usr/local/lib目录下,生成makefile文件)
括号中的话说措了?我检查发现/usr/local/lib目录下没有makefile, 而是在hlfs/build目录下。
我不确定,你再看下。
c.sudo make install
执行这个命令后,输出错误信息如下:
“---------------------------------------
Makefile:144: 警告:覆盖关于目标“all”的命令
Makefile:110: 警告:忽略关于目标“all”的旧命令
Scanning dependencies of target all
Built target all
Scanning dependencies of target hlfs
Building C object CMakeFiles/hlfs.dir/storage/hlfs_stat.c.o
Building C object CMakeFiles/hlfs.dir/storage/seg_clean_task.c.o
Building C object CMakeFiles/hlfs.dir/storage/deinit_hlfs.c.o
Building C object CMakeFiles/hlfs.dir/storage/init_hlfs.c.o
Building C object CMakeFiles/hlfs.dir/storage/hlfs_close.c.o
Building C object CMakeFiles/hlfs.dir/storage/hlfs_ctrl.c.o
Building C object CMakeFiles/hlfs.dir/storage/hlfs_write.c.o
Building C object CMakeFiles/hlfs.dir/storage/hlfs_open.c.o
Building C object CMakeFiles/hlfs.dir/storage/hlfs_read.c.o
Building C object CMakeFiles/hlfs.dir/logger/log_ops.c.o
Building C object CMakeFiles/hlfs.dir/logger/segfile_handler_optmize.c.o
Building C object CMakeFiles/hlfs.dir/logger/block_ops.c.o
Building C object CMakeFiles/hlfs.dir/backend/hdfs_storage.c.o
/home/zhen/trunk/hlfs/src/backend/hdfs_storage.c:16:18: 致命错误: hdfs.h:没有那个文件或目录
编译中断。
make[2]: *** [CMakeFiles/hlfs.dir/backend/hdfs_storage.c.o] 错误 1
make[1]: *** [CMakeFiles/hlfs.dir/all] 错误 2
make: *** [all] 错误 2
zhen@darwin-ThinkPad-Edge:~/trunk/hlfs/build$ sudo cp
c++/Linux-i386-32/lib/libhdfs.so /usr/local/lib/
cp: 无法获取"c++/Linux-i386-32/lib/libhdfs.so" 的文件状态(stat): 没有那个文件或目录
zhen@darwin-ThinkPad-Edge:~/trunk/hlfs/build$ sudo cp
../c++/Linux-i386-32/lib/libhdfs.so /usr/local/lib/
cp: 无法获取"../c++/Linux-i386-32/lib/libhdfs.so" 的文件状态(stat): 没有那个文件或目录
zhen@darwin-ThinkPad-Edge:~/trunk/hlfs/build$ sudo cp
~/hadoop-1.0.4/c++/Linux-i386-32/lib/libhdfs.so /usr/local/lib/
zhen@darwin-ThinkPad-Edge:~/trunk/hlfs/build$ sudo make install
Makefile:144: 警告:覆盖关于目标“all”的命令
Makefile:110: 警告:忽略关于目标“all”的旧命令
Built target all
“---------------------------------------
你遇到过吗?给点建议。
--
Sincerely,
Ren Zhen