Debian 8(jessie)和Debian 9 (stretch )下安装Proxmox VE过程记录及问题

最近手里刚好有几台独立服务器,就想测试下Proxmox实际开小鸡的效率。由于这几台独服后台没有管理,连重启、停机都不支持,也不支持reinstall 操作系统,默认只给安装了centos 或debian,更不要说支持proxmox后台安装了。

由于proxmox建立在debian基础上,就想着不用iso模式启动安装了,直接用系统apt-get方式来安装了!!

由于debian 8 、debian 9安装方式略有差别,所以每一步都分开记录。主要步骤如下:

1、利用网上一键更换Debian系统脚本安装基础debian系统:
(1)  wget –no-check-certificate -qO DebianNET.sh ‘https://moeclub.org/attachment/LinuxShell/DebianNET.sh’ && chmod a+x DebianNET.sh
(2)  debian 8 x64: bash DebianNET.sh -d jessie -v amd64

debian 9 x64:     bash DebianNET.sh -d stretch -v amd64

2、修改hostname,此步非常关键,这一步导致我安装总是出错,找了两天才找到问题所在:

首先修改/etc/hosts,再修改/etc/hostname文件,修改完成后,切记重新启动。

/etc/hosts 文件格式如下:

127.0.0.1 localhost.localdomain localhost
192.168.15.77 prox4m1.proxmox.com prox4m1 pvelocalhost

only need to touch the second line and replace the IP address, the FQDN and the hostname (leave the pvelocalhost like it is).

官方客服的回答,确实有效,否则会导致如下两个错误:

第一:

dpkg: error processing package pve-firewall (–configure):
dependency problems – leaving unconfigured
dpkg: dependency problems prevent configuration of pve-ha-manager:
pve-ha-manager depends on pve-cluster (>= 3.0-17); however:
Package pve-cluster is not configured yet.

第二:

Errors were encountered while processing:
pve-cluster
libpve-access-control
librados2-perl
pve-firewall
pve-ha-manager
qemu-server
pve-container
pve-manager
proxmox-ve
E: Sub-process /usr/bin/dpkg returned an error code (1)

3、配置安装源

debian 8 x64:

echo “deb http://download.proxmox.com/debian jessie pve-no-subscription” > /etc/apt/sources.list.d/pve-install-repo.list

debian 9 x64:

echo “deb http://download.proxmox.com/debian/pve stretch pve-no-subscription” > /etc/apt/sources.list.d/pve-install-repo.list

4、增加 repository key:

debian 8 x64:

wget -O- “http://download.proxmox.com/debian/key.asc” | apt-key add –

debian 9 x64:

wget http://download.proxmox.com/debian/proxmox-ve-release-5.x.gpg -O /etc/apt/trusted.gpg.d/proxmox-ve-release-5.x.gpg

5、升级系统组件:

debian 8 x64:

apt-get update && apt-get dist-upgrade

debian 9 x64:

apt update && apt dist-upgrade

6、安装Proxmox VE程序(postfix可以选择no config):

debian 8 x64:

apt-get install proxmox-ve ssh postfix ksm-control-daemon open-iscsi systemd-sysv

debian 9 x64:

apt install proxmox-ve postfix open-iscsi

7、reboot,切记要重启

8、最后一步,移除os-prober,否则对性能影响很大!

debian 8 x64:

apt-get remove os-prober

debian 9 x64:

apt remove os-prober

 

[乐于学习,勤于思考] - wrox.org & baidu.com.ru - 本站原创,转载请注明出处!

Add a Comment

Your email address will not be published. Required fields are marked *