安裝完P(guān)VE,使用前,還需要做些配置的修改才好用
1 設(shè)置vi編輯器
pve的vi編輯器默認(rèn)配置非常難用,方向鍵變字母馆衔,退格鍵不能用瘟判,很耽誤使用。需要做如下修改
vi /etc/vim/vimrc.tiny
set compatible更改為set nocompatible, 并新增set backspace=2角溃,如下
set nocompatible
set backspace=2
這樣設(shè)置完拷获,vi就好使了
2 修改網(wǎng)絡(luò)配置
如果安裝過程中沒有設(shè)置好IP地址和網(wǎng)關(guān),是無法遠(yuǎn)程訪問的减细,這個(gè)時(shí)候你需要手動(dòng)變更網(wǎng)絡(luò)設(shè)置匆瓜。
- 替換/etc/network/interfaces中的IP地址為你PVE連接的路由或交換機(jī)工作的相同網(wǎng)段的ip地址,如下
root@pve:~# sed -i 's/address.*$/address 192.168.1.13\/24/' /etc/network/interfaces
- 替換/etc/network/interfaces中的gateway地址為你PVE連接的路由或交換機(jī)工作的相同網(wǎng)段的網(wǎng)關(guān)地址未蝌,如下
root@pve:~# sed -i 's/gateway.*$/gateway 192.168.1.1/' /etc/network/interfaces
- 修改/etc/hosts的ip地址為以上ip 地址驮吱,如192.168.1.13
- 修改dns為公共的DNS, 如Google的8.8.8.8和8.8.4.4。 vi /etc/resolv.conf
search local.cn
nameserver 8.8.8.8
nameserver 8.8.4.4
- reboot 或者重啟網(wǎng)卡如下
systemctl restart networking
- 用另外一個(gè)電腦通過瀏覽器遠(yuǎn)程訪問pve, 地址: https://192.168.1.13:8006/
登錄pve
3 消除每次登錄的“No valid subscription” 彈窗
PVE是個(gè)很不錯(cuò)的開源虛擬化平臺(tái)萧吠,每個(gè)人都可以免費(fèi)地享用它左冬,然而沒有訂閱企業(yè)版每次登錄Web管理時(shí)都會(huì)出現(xiàn)一個(gè)“No Valid Subscription(無有效訂閱)”的提示:“You do not have a valid subscription for this server. Please visit www.proxmox.com to get a list of available options.”。要點(diǎn)“確定”或關(guān)閉它才能繼續(xù)訪問纸型。
要消除它也簡(jiǎn)單, 打開/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js拇砰,搜索“No valid subscription”,并修改它前面的if條件狰腌。如下
改成如下
修改完成后重啟網(wǎng)頁服務(wù)
systemctl restart pveproxy
若重新登錄還有提示除破,請(qǐng)刷新網(wǎng)頁再試試。
4 替換企業(yè)版軟件源
執(zhí)行更新軟件包時(shí)報(bào)錯(cuò)
我們默認(rèn)是用企業(yè)(商業(yè))軟件源琼腔,Proxmox VE 企業(yè)軟件源需要有效的訂閱才能訪問瑰枫。對(duì)于個(gè)人用戶,我們需要添加免費(fèi)軟件源丹莲。
vi /etc/apt/sources.list.d/pve-enterprise.list
注釋掉enterprise字樣的企業(yè)軟件源躁垛,添加免費(fèi)軟件源
#deb https://enterprise.proxmox.com/debian/pve bookworm pve-enterprise
deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription
vi /etc/apt/sources.list.d/ceph.list, 注釋掉里面的內(nèi)容
#deb https://enterprise.proxmox.com/debian/ceph-reef bookworm enterprise
更新完這兩個(gè)文件,重試更新軟件包就沒有問題了
root@pve:/etc/apt/sources.list.d# apt update
Hit:1 http://ftp.debian.org/debian bookworm InRelease
Get:2 http://security.debian.org bookworm-security InRelease [48.0 kB]
Get:3 http://ftp.debian.org/debian bookworm-updates InRelease [55.4 kB]
Get:4 http://download.proxmox.com/debian/pve bookworm InRelease [2,768 B]
Get:5 http://download.proxmox.com/debian/pve bookworm/pve-no-subscription amd64 Packages [336 kB]
Get:6 http://security.debian.org bookworm-security/main amd64 Packages [182 kB]
Get:7 http://security.debian.org bookworm-security/main Translation-en [110 kB]
Fetched 735 kB in 5s (163 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
93 packages can be upgraded. Run 'apt list --upgradable' to see them.