1. 程式人生 > >Proxmox5.2叢集安裝Ceph

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介面中完成了。