In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to compile Ceph source code under CentOS6.5. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
Introduction
Compiling ceph source code is not an easy task, and there are a lot of errors reported in the process, such as dependence on Clear11, BOOST, and a large number of other libraries, all of which have to be resolved. In this paper, the compilation process is described in detail, and the problems encountered are recorded.
Concrete process
1. Source code download
Git clone https://github.com/ceph/ceph
two。 Compile
. / autogen.sh./configure
The following errors are reported during the environmental check
The system reported an error and lacks the support of Category 11. The GCC version needs to be upgraded to support Clippers 11. I have consulted the students who use the CentOS7 series, and their own GCC is a high version, which can support Clipper 11.
3. GCC caterpillar 11 support
Wget http://ftp.gnu.org/gnu/gcc/gcc-4.8.1/gcc-4.8.1.tar.gztar xzf gcc-4.8.1.tar.gz cd gcc-4.8.1. / contrib/download_prerequisites / / install dependent library cd.. Mkdir build_gcc4.8.1cd build_gcc4.8.1../configure-prefix=/usr-enable-checking=release-enable-languages=c,c++-disable-multilibmake-j8sudo make install
4. Compile the Ceph source code
There are also many problems in the process of compilation.
Configure: error: in `/ home/ceph/ceph-src/ceph':configure: error: libsnappy not foundSee `config.log' for more details.----configure: error : in `/ home/ceph/ceph-src/ceph':configure: error: libleveldb not foundSee `config.log' for more details.-checking blkid/blkid.h usability... Nochecking blkid/blkid.h presence... Nochecking for blkid/blkid.h... Noconfigure: error: blkid/blkid.h not found (libblkid-dev, libblkid-devel)-checking libudev.h usability... Nochecking libudev.h presence... Nochecking for libudev.h... Noconfigure: error: libudev.h not found (libudev-dev, libudev-devel)-checking for malloc in-ltcmalloc... Noconfigure: error: in `/ home/ceph/ceph-src/ceph':configure: error: no tcmalloc found (use-- without-tcmalloc to disable)-checking for FCGX_Init in-lfcgi... Nochecking for LIBFUSE... Yeschecking atomic_ops.h usability... Nochecking atomic_ops.h presence... Nochecking for atomic_ops.h... Noconfigure: error: in `/ home/ceph/ceph-src/ceph':configure: error: no libatomic-ops found (use-- without-libatomic-ops to disable) See `config.log' for more details. -checking xfs/xfs.h usability... Nochecking xfs/xfs.h presence... Nochecking for xfs/xfs.h... Noconfigure: error: xfs/xfs.h not found (--without-libxfs to disable)-Boost random library not found. ..
Mainly adopt the following methods to solve the problem
4.1 first install the dependency packages that can be installed
Sudo yum install make automake autoconf boost-devel fuse-devel gcc-c++ libtool libuuid-devel libblkid-devel keyutils-libs-devel cryptopp-devel fcgi-devel libcurl-devel expat-devel gperftools-devel libedit-devel libatomic_ops-devel snappy-devel leveldb-devel libaio-devel xfsprogs-devel git libudev-devel libcrypto++-dev libcrypto++-utils
4.2 yum not found, manual rpm installation
4.3part of the package is not needed, without directly
. / configure-without-tcmalloc-without-libatomic-ops
4.4 BOOST Library missing issu
The last problem is the boost random lib can not found problem.
Yum shows that both boost and boost dev are installed, so why do some of the boost libraries exist and some do not? Having no choice but to reinstall BOOST by compiling the boost source code
[root@gnop029-ct-zhejiang_wenzhou-16-12 home] # lsboost_1_59_0 boost_1_59_0.tar.gz c11 ceph ceph.log civetweb dlftp gcc4.7_build.tar.bz2 gcc-4.8.1 gcc-4.8.1.tar.bz2 usr wget-log. / bootstrap.sh. / bjam-sTOOLS=gcc install
5 finally, carry on the ceph source code
. / autogen.sh./configuremake
There are also a lot of problems here, and there are a large number of undefined reference boost libraries during compilation.
But I can find the header files and binary libraries of boost in / usr/local/.
Then trace the makefile file and find that the contents of the BOOST library involved are as follows:
BOOST_PROGRAM_OPTIONS_LIBS =-lboost_program_options-mt BOOST_RANDOM_LIBS =-lboost_random BOOST_REGEX_LIBS =-lboost_regex-mt BOOST_THREAD_LIBS =-lboost_thread-mt
So go to the relevant path to find the library, and find that there is no-mt suffix after the regex,thread library.
Search the Internet and find that with mt and without mt, respectively, it means support for multithreading. I can't help thinking that when developing under the WINDOWS platform and configuring the project under VS2010, it will also involve the configuration of the runtime library, there is also a mutlithread version. It should be a similar truth. So I recompiled boost.
. / bjam-- TOOLS=gcc-- build-type=complete-- layout=tagged install
When compiling with complete mode, you can find the corresponding binaries under the relevant path: you can find that after compiling with the new mode, many libraries' release version, debug version, and multithreaded support version have been compiled, which one you want to use.
Finally, repeat step 5 to compile ceph.
-
In later compilation, mon,osd,mds and so on were compiled successfully, but it was found that rgw did not compile. Through the increase of display
. / configure-- with-radosgw, knowing that the error is related to the lack of fcgi. However, fcgi is already installed in the system, so it is cleaned and reinstalled.
[root@gnop029-ct-zhejiang_wenzhou-16-12 yum.repos.d] # sudo yum install fcgi-devel58 packages excluded due to repository priority protectionsResolving Dependencies-- > Running transaction check--- > Package fcgi-devel.x86_64 0vir 2.4.0-12.el6 will be installed-- > Processing Dependency: fcgi = 2.4.0-12.el6 for package: fcgi-devel-2.4.0-12.el6.x86After 64 Processing Dependency-> Processing Dependency: libfcgi.so.0 () (64bit) For package: fcgi-devel-2.4.0-12.el6.x86mm 64mura-> Processing Dependency: libfcgi++.so.0 () (64bit) for package: fcgi-devel-2.4.0-12.el6.x86y64muri-> Running transaction check--- > Package fcgi.x86_64 0VV 2.4.0-10.el6 will be installed--- > Package fcgi-devel.x86_64 0Rule 2.4.0-12.el6 will be installed-- > Processing Dependency: fcgi = 2.4.0-12.el6 for package: fcgi-devel-2.4.0-12.el6.x8654-> Finished Dependency ResolutionError: Package: fcgi-devel-2.4.0-12.el6.x86_64 (epel) Requires: fcgi = 2.4.0-12.el6 Available: fcgi-2.4.0-10.el6.x86_64 (Ceph) fcgi = 2.4.0-10.el6Error: Package: fcgi-devel-2.4.0-12.el6.x86_64 (epel) Requires: fcgi = 2.4.0-12.el6 Installing: fcgi-2.4.0-10.el6.x86_64 (Ceph) fcgi = 2.4.0-10.el6 You could try using-- skip-broken to work around the problem
Delete all the repo files under the yum.repo.d folder, keep only the source of 163and update the fcgi. Later, it was prompted in the process of compilation.
Rgw/rgw_fcgi.cc:10:22: fatal error: fcgiapp.h: No such file or directory # include "fcgiapp.h" ^ compilation terminated.
So fcgi-devel was installed, and the header file was successfully found and compiled.
On "how to compile Ceph source code under CentOS6.5" this article is shared here, I hope the above content can be of some help to you, so that you can learn more knowledge, if you think the article is good, please share it out for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.