虚拟机前置通用步骤:配置静态ip、更换yum源、安装git。
机器配置建议:内存8G以上,硬盘容量40G以上。
系统:Centos 7
配置代理使用 export 命令,每次重启电脑都需要重新开启代理,可以通过向 /etc/profile.d/proxy.sh 写入环境变量来持久化 ip 代理。
#ip代理 export http_proxy=http://192.168.30.216:7890 export https_proxy=https://192.168.30.216:7890 #关闭ip代理 unset http_proxy unset https_proxy #git代理 git config --global http.proxy http://192.168.30.216:7890 git config --global https.proxy https://192.168.30.216:7890 #关闭git代理 git config --global --unset http.proxy git config --global --unset https.proxy #如果是虚拟机走主机代理,请打开主机代理软件的 Allow LAN(允许局域网内机器通过代理)源码下载
git clone https://github.com/ceph/ceph.git cd ceph git tag git checkout v14.2.7 git checkout -b v14.2.7编译 安装 gcc 7
安装scl软件集。
yum -y install centos-release-scl
修改scl repo源。
vi /etc/yum.repos.d/CentOS-SCLo-scl.repo
添加以下字段:
baseurl=http://mirror.centos.org/altarch/7/sclo/$basearch/rh/
模拟gcc7编译环境
yum -y install devtoolset-7 scl enable devtoolset-7 bash #每次重启需要重新输入,启用gcc7 gcc --version编译 ceph
git submodule update --init --recursive ./install-deps.sh # 可以在编译是,通过ARGS参数为cmake附加参数。如下命令作用开启cephfs-shell # ARGS="-DWITH_PYTHON3=3 -DWITH_CEPHFS_SHELL=ON" ./do_cmake.sh ./do_cmake.sh cd build/ #关闭代理,否则可能报错 unset http_proxy unset https_proxy make -j 4参考链接
https://support.huaweicloud.com/prtg-kunpengsdss/kunpengceph_02_0003.html
问题-
问题描述: Error: No Package found for python-scipy
解决方法:I was able to fix this dependency problem by deleting the 'BuildRequires: python%{python_buildid}-scipy’ line from the ceph.spec.in file:
sed -i -e '/BuildRequires: python%{_python_buildid}-scipy/d' ceph.spec.in参考连接:https://www.spinics.net/lists/ceph-users/msg63428.html
-
问题描述:Could not fetch URL https://pypi.org/simple/wheel/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host=‘pypi.org’, port=443): Max retries exceeded with url: /simple/wheel/ (Caused by SSLError(SSLEOFError(8, u’EOF occurred in violation of protocol (_ssl.c:618)’),)) - skipping
ERROR: Could not find a version that satisfies the requirement wheel>=0.24 (from versions: none)
ERROR: No matching distribution found for wheel>=0.24
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host=‘pypi.org’, port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLEOFError(8, u’EOF occurred in violation of protocol (_ssl.c:618)’),)) - skipping解决方法:换国内 pip 源
pip install xlrd -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
-
问题描述:-- Could NOT find RDKafka: Found unsuitable version “0.11.5”, but required is at least “1.9.2” (found /usr/include)
解决方法:安装新版本 librdkafka
1,Git clone git clone https://github.com/edenhill/librdkafka.git 2,cd librdkafka/ 3,./configure 4,make 5,sudo make install
修改 ceph/.gitmoudles 文件中url路径
使用国内镜像,目前已知Github国内镜像网站有github.com.cnpmjs.org和git.sdut.me/。速度根据各地情况而定,在clone某个项目的时候将github.com替换为github.com.cnpmjs.org即可。
wq@ubuntu:~/ceph$ vi ./.gitmodules
ubmodule "src/c-ares"]
path = src/c-ares
url = https://github.com.cnpmjs.org/ceph/c-ares.git
...
更新 git config
sudo git submodule sync



