
前期准备
配置 /etc/hosts 文件,将服务器 IP、对应的主机名添加进去。例如,固定 IP 地址:192.168.2.222,主机名:gowah,则需要在 /etc/hosts 文件中按照下面的格式进行添加:
127.0.0.1 localhost.localdomain localhost
192.168.2.222 gowah.proxmox.com gowah
# The following lines are desirable for IPv6 capable hosts:
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
添加完成后,运行命令:
hostname --ip-address
若只返回一个结果 192.168.2.222 则表示配置正确。
安装 Proxmox VE
1、添加 Proxmox VE 源
可以替换为中科大的源(Debian9 使用),执行 nano /etc/apt/sources.list 添加内容如下:
deb http://mirrors.ustc.edu.cn/debian/ stretch main contrib non-free
deb http://mirrors.ustc.edu.cn/debian/ stretch-backports main contrib non-free
deb http://mirrors.ustc.edu.cn/debian/ stretch-proposed-updates main contrib non-free
deb http://mirrors.ustc.edu.cn/debian/ stretch-updates main contrib non-free
deb http://mirrors.ustc.edu.cn/debian-security stretch/updates main contrib non-free
2、添加安全更新源
echo "deb http://download.proxmox.com/debian/pve stretch pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list
也可以替换其中的 pve-no-subscription 为其它源,请根据需求选择:
- pve:正式稳定版,但版本较老
- pve-no-subscription:比测试源稳定,比 pve 源相对较新
- pvetest:测试源,问题较多
官方不建议 pve-no-subscription 用于生产平台,但个人用感觉不错,这里我使用了 pve-no-subscription 源。
3、添加仓库密钥
wget http://download.proxmox.com/debian/proxmox-ve-release-5.x.gpg -O /etc/apt/trusted.gpg.d/proxmox-ve-release-5.x.gpg
4、更新源和系统
apt update && apt dist-upgrade
更新需要一点时间,更新完成后重启一下系统。
5、安装 Proxmox VE
apt install proxmox-ve postfix open-iscsi
推荐继续执行以下命令删除 os-prober 包。os-prober 软件包会扫描主机所有分区(包括客户端虚拟机)创建双引导 GRUB 条目。如果不是双启动,可以安全删除:
apt remove os-prober
安装完成,浏览器登录 WEB 管理页面:https://ip:8006(必须是 HTTPS)
创建 CT
在开设前,需要将系统模板放入指定目录。OpenVZ 系统模板可以到官网下载,以 tar.gz 后缀,放入 /var/lib/vz/template/cache 目录。
下载地址:https://download.openvz.org/template/precreated/
文章版权归作者所有,未经允许请勿转载。
THE END
喜欢就支持一下吧




暂无评论内容