Proxmox5.2集群安装Ceph
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Proxmox5.2集群安装Ceph相关的知识,希望对你有一定的参考价值。
本人低配五台机器,用来学习Proxmox,首先把这几台电脑集群起来,在每台机器上同步时间:
用这条命令:
#vi /etc/systemd/timesyncd.conf
打开timesyncd.conf文件,在文件里加入这条语句
[Time]
Servers=ntp1.aliyun.com ntp2.aliyun.com time.apple.com
![](http://i2.51cto.com/images/blog/201811/02/f07e290ae9957faa3f9fe549609809e2.jpg?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=)
![](http://i2.51cto.com/images/blog/201811/02/f39aeb0380511aa451e2977c2916c824.jpg?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=)
在每个主机都同步时间。
添加开源软件,先把原来的文件删掉:
rm -f /etc/apt/sources.list.d/pve-enterprise.list
![](http://i2.51cto.com/images/blog/201811/02/893b61a0af720b96f88b32d96bca3ea0.jpg?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=)
添加新的文件:
echo "deb http://download.proxmox.com/debian/pve stretch pve-no-subscription" >/etc/apt/sources.list.d/pve-install-repo.list
![](http://i2.51cto.com/images/blog/201811/02/d7f8fc1ea50ea3a7c2f87b8cb537ef17.jpg?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=)
下载密钥:
wget http://download.proxmox.com/debian/proxmox-ve-release-5.x.gpg -o /etc/apt/trusted.gpg.d/proxmox-ve-release-5.x.gpg
![](http://i2.51cto.com/images/blog/201811/02/f294af3cf832630b5bd34a291fe2d03c.jpg?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=)
下载更新:
apt update && apt dist-upgrade
![](http://i2.51cto.com/images/blog/201811/02/0218eef27ef06641faf68a90fa32421f.jpg?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=)
每个主机都要执行上面几条命令。
安装Ceph
pveceph install
![](http://i2.51cto.com/images/blog/201811/02/9e7e3aaaaf1a07840c02dc6884324e5a.jpg?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=)
每个主机都安装上面这条命令。
在其中一台主机运行这条命令
pveceph init --network 192.168.30.0/24
![](http://i2.51cto.com/images/blog/201811/02/9f035f04972d5a4edaf2e223c7efdf2f.jpg?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=)
在每个节点都运行下面的两条命令:
pveceph createmon
pveceph createmgr
剩下的都可以Web界面中完成了。
以上是关于Proxmox5.2集群安装Ceph的主要内容,如果未能解决你的问题,请参考以下文章