![](https://img.laitimes.com/img/__Qf2AjLwojIjJCLyojI0JCLiAzNfRHLGZkRGZkRfJ3bs92YsYTMfVmepNHL9UEVNRTR61keNRVT3V1MMBjVtJWd0ckW65UbM5WOHJWa5kHT20ESjBjUIF2X0hXZ0xCMx81dvRWYoNHLrdEZwZ1Rh5WNXp1bwNjW1ZUba9VZwlHdssmch1mclRXY39CXldWYtlWPzNXZj9mcw1ycz9WL49zZuBnL3QzNxQTN0kDM0EzNwAjMwIzLc52YucWbp5GZzNmLn9Gbi1yZtl2Lc9CX6MHc0RHaiojIsJye.png)
在VMWARE中建立虛拟機
預設,下一步
選擇作業系統安裝鏡像
選擇Linux-Debian8.X
為虛拟機指定記憶體
為模拟線上環境,此處選擇“橋接網絡”
建立虛拟磁盤(scsi20G)并指定儲存位置
自定義硬體
啟用CPU的虛拟化選項
移除非必要裝置
虛拟機建立完成
啟動虛拟機,從CD光牒鏡像引導,出現Proxmox安裝界面
回車選擇“Install Proxmox VE”
點選“I agree”同意
選擇将PVE安裝到/dev/sda,點選“Next”
在Contry後面的文本框裡輸入China,下方TimeZone會自動選擇Asia/ShangHai,點選“Next”
輸入主控端的root密碼和管理者Email位址,點選“Next”
配置HostName和IP位址,其中HostName必須使用name.host.xx的FQDN格式,隻輸入pve101會報錯,點選Next
出現 Summary 供确認,确認無誤後點選“Install”
約5分鐘左右(視機器性能決定),出現安裝成功的提示,點選“Reboot”按鈕。
重新開機後,出現PVE的指令行“控制台”,提示使用https://10.60.0.101:8006進行web管理。
系統安裝完成後,進行有關配置
#在每個節點上都編輯host檔案
nano /etc/hosts
如下:
#----------------------------------------------------------------------------
127.0.0.1 localhost.localdomain localhost
10.60.0.101 pve101 pve101.xxx.yyy.cn
10.60.0.102 pve102 pve102.xxx.yyy.cn
10.60.0.103 pve103 pve103.xxx.yyy.cn
# add by [email protected]
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
#----------------------------------------------------------------------------
在pve101節點上ping其他兩個節點進行驗證:
[email protected]:~# ping pve102
PING pve102 (10.60.0.102) 56(84) bytes of data.
64 bytes from pve102 (10.60.0.102): icmp_seq=1 ttl=64 time=0.335 ms
64 bytes from pve102 (10.60.0.102): icmp_seq=2 ttl=64 time=0.394 ms
64 bytes from pve102 (10.60.0.102): icmp_seq=3 ttl=64 time=0.306 ms
64 bytes from pve102 (10.60.0.102): icmp_seq=4 ttl=64 time=0.516 ms
^C
--- pve102 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 70ms
rtt min/avg/max/mdev = 0.306/0.387/0.516/0.084 ms
[email protected]:~# ping pve103
PING pve103 (10.60.0.103) 56(84) bytes of data.
64 bytes from pve103 (10.60.0.103): icmp_seq=1 ttl=64 time=0.426 ms
64 bytes from pve103 (10.60.0.103): icmp_seq=2 ttl=64 time=0.374 ms
64 bytes from pve103 (10.60.0.103): icmp_seq=3 ttl=64 time=0.336 ms
64 bytes from pve103 (10.60.0.103): icmp_seq=4 ttl=64 time=1.15 ms
^C
--- pve103 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 75ms
rtt min/avg/max/mdev = 0.336/0.571/1.151/0.337 ms
[email protected]:~#
更換源,此處先将/etc/apt/sources.list.d/pve-enterprise.list中唯一的一行注釋掉,或者直接mv此檔案
#注釋掉
#deb https://enterprise.proxmox.com/debian/pve buster pve-enterprise
#mv改名
mv /etc/apt/sources.list.d/pve-enterprise.list /etc/apt/sources.list.d/pve-enterprise.list.bak
更換國内源:
nano /etc/apt/sources.list
如下:
#----------------------------------------------------------------------------
#deb http://ftp.debian.org/debian buster main contrib #comment by [email protected]
#deb http://ftp.debian.org/debian buster-updates main contrib #comment by [email protected]
# security updates
#deb http://security.debian.org buster/updates main contrib #comment by [email protected]
deb http://mirrors.aliyun.com/debian/ buster main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ buster main non-free contrib
deb http://mirrors.aliyun.com/debian-security buster/updates main
deb-src http://mirrors.aliyun.com/debian-security buster/updates main
deb http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
deb http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
deb https://mirrors.ustc.edu.cn/proxmox/debian/pve buster pve-no-subscription #中科大pve源
deb http://mirrors.ustc.edu.cn/proxmox/debian/ceph-nautilus buster main #中科大ceph源
#add by [email protected]
#----------------------------------------------------------------------------
更新系統和軟體包
apt update && apt upgrade -y && apt dist-upgrade
更新完軟體包之後,建議使用vmware做個快照
本項目使用ceph存儲,故在源中增加了中科大的pve和ceph源
pveceph install