CentOS 7中安装GCC 7
最新版本的ceph已经使用了c++14新特性,CentOS7中的gcc版本太低,所以需要手动安装新版本的gcc。
yum -y install gcc
yum -y install gcc-c++
wget http://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-7.3.0/gcc-7.3.0.tar.gz
tar zxf gcc-7.3.0.tar.gz
cd gcc-7.3.0
yum -y install bzip2 zlib-devel
./contrib/download_prerequisites
./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,go --enable-plugin --enable-initfini-array --disable-libgcj --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux --disable-multilib --with-default-libstdcxx-abi=gcc4-compatible --with-abi=m64 --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --with-target-system-zlib --enable-objc-gc=auto --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-nls --without-included-gettext
make -j8
make install