Installazione di Proxmox in Debian: Difference between revisions
| (11 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
= | =Installazione= | ||
==Proxmox 4.x== | |||
* Installare Debian Jessie amd64 | |||
* Verificare la corretta risoluzione dei nomi locali | |||
sudoedit /etc/hosts | |||
127.0.0.1 localhost.localdomain localhost | |||
192.168.1.100 proxmox01.example.priv proxmox01 pvelocalhost | |||
* Verificare la risoluzione diretta: | |||
getent hosts $(hostname) | |||
192.168.1.100 proxmox01.example.priv proxmox01 pvelocalhost | |||
* Verificare la risoluzione inversa: | |||
getent hosts 192.168.1.100 | |||
192.168.1.100 proxmox01.example.priv proxmox01 pvelocalhost | |||
* Aggiungere il repository Proxmox VE : | |||
echo "deb http://download.proxmox.com/debian jessie pve-no-subscription" | sudo tee /etc/apt/sources.list.d/pve-install-repo.list | |||
* Aggiungere la repository key: | |||
wget -O- "http://download.proxmox.com/debian/key.asc" | sudo apt-key add - | |||
* Aggiornare la cache apt ed i pacchetti | |||
sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get clean | |||
* Installare i pacchetti base: | |||
sudo apt-get install proxmox-ve ntp ssh postfix ksm-control-daemon open-iscsi systemd-sysv | |||
* Rimuovere i repository Enterprise: | |||
sudo rm /etc/apt/sources.list.d/pve-enterprise.list | |||
* Fare reboot, e controllare che sia attivo il kernel pve | |||
==Proxmox 3.x== | |||
In some case it makes sense to install Proxmox VE on top of a running Debian Wheezy 64-bit | In some case it makes sense to install Proxmox VE on top of a running Debian Wheezy 64-bit | ||
| Line 27: | Line 69: | ||
sudoedit /etc/hosts | sudoedit /etc/hosts | ||
127.0.0.1 localhost.localdomain localhost | 127.0.0.1 localhost.localdomain localhost | ||
192.168.6.177 proxmox-6-177.proxmox.com proxmox-6-177 pvelocalhost | 192.168.6.177 proxmox-6-177.proxmox.com proxmox-6-177 pvelocalhost | ||
# The following lines are desirable for IPv6 capable hosts | # The following lines are desirable for IPv6 capable hosts | ||
<pre> | |||
::1 ip6-localhost ip6-loopback | ::1 ip6-localhost ip6-loopback | ||
fe00::0 ip6-localnet | fe00::0 ip6-localnet | ||
| Line 39: | Line 81: | ||
ff02::3 ip6-allhosts | ff02::3 ip6-allhosts | ||
</pre> | </pre> | ||
Adapt your sources.list and add the Proxmox VE repository: | Adapt your sources.list and add the Proxmox VE repository: | ||
| Line 59: | Line 98: | ||
Add the Proxmox VE repository key: | Add the Proxmox VE repository key: | ||
<pre>wget -O- "http://download.proxmox.com/debian/key.asc" | apt-key add -</pre> | <pre>wget -O- "http://download.proxmox.com/debian/key.asc" | sudo apt-key add -</pre> | ||
Update your repository and system by running: | Update your repository and system by running: | ||
<pre>sudo apt-get update && sudo apt-get dist-upgrade</pre> | <pre>sudo apt-get update && sudo apt-get dist-upgrade</pre> | ||
* Install Proxmox VE Kernel | |||
<pre>apt-get install pve-firmware pve-kernel-2.6.32- | |||
<pre>sudo apt-get install pve-firmware pve-kernel-2.6.32-39-pve</pre> | |||
Optional - install Kernel headers: | Optional - install Kernel headers: | ||
<pre>apt-get install pve-headers-2.6.32- | <pre>sudo apt-get install pve-headers-2.6.32-39-pve</pre> | ||
*Make sure to select Proxmox VE Kernel on the boot loader (grub2) - Attention: Default is the 3.2 kernel. See [[Impostare un kernel specifico di avvio in Grub2]] | *Make sure to select Proxmox VE Kernel on the boot loader (grub2) - Attention: Default is the 3.2 kernel. See [[Impostare un kernel specifico di avvio in Grub2]] | ||
cat /boot/grub/grub.cfg | grep menuentry | cut -f 2 --delimiter="'" | |||
sudoedit /etc/default/grub | |||
GRUB_DEFAULT="Debian GNU/Linux, with Linux 2.6.32-39-pve" | |||
sudo update-grub | |||
*Reboot: Now restart the system using the Proxmox VE kernel. | *Reboot: Now restart the system using the Proxmox VE kernel. | ||
*Remove the Debian kernel: | *Remove the Debian kernel: | ||
apt-get remove linux-image-amd64 linux-image-3.2.0-4-amd64 linux-base | sudo apt-get remove --purge linux-image-amd64 linux-image-3.2.0-4-amd64 linux-base | ||
*Check grub2 config by running: | *Check grub2 config by running: | ||
update-grub | sudo update-grub | ||
* Install Proxmox VE packages: make sure you are running the Proxmox VE Kernel, otherwise the installation will fail. | |||
Check the currently active Kernel: | Check the currently active Kernel: | ||
| Line 88: | Line 137: | ||
Install the Proxmox VE packages: | Install the Proxmox VE packages: | ||
apt-get install proxmox-ve-2.6.32 ntp ssh lvm2 postfix ksm-control-daemon vzprocps open-iscsi bootlogd | sudo apt-get install proxmox-ve-2.6.32 ntp ssh lvm2 postfix ksm-control-daemon vzprocps open-iscsi bootlogd | ||
Accept the suggestion to remove Exim and configure postfix according to your network. | Accept the suggestion to remove Exim and configure postfix according to your network. | ||
| Line 94: | Line 143: | ||
'''Note''': Apache2 is not needed anymore as we use our own web server. | '''Note''': Apache2 is not needed anymore as we use our own web server. | ||
= | =Connessione all'iterfaccia web Proxmox VE web = | ||
Connect to the admin web interface (<nowiki>https://youripaddress:8006</nowiki>) and configure the vmbr0 and review all other settings | * Copiare ed installare gli eventuali certificati SSL | ||
* Connect to the admin web interface (<nowiki>https://youripaddress:8006</nowiki>) and configure the vmbr0 and review all other settings, or manually edit network config as follows: | |||
sudoedit /etc/network/interfaces | sudoedit /etc/network/interfaces | ||
| Line 107: | Line 158: | ||
address 192.168.0.100 | address 192.168.0.100 | ||
netmask 255.255.255.0 | netmask 255.255.255.0 | ||
gateway 192.168.0.254 | |||
bridge_ports eth0 | bridge_ports eth0 | ||
bridge_stp off | bridge_stp off | ||
bridge_fd 0 | bridge_fd 0 | ||
</pre> | </pre> | ||
=Pulizia pacchetti= | |||
* Disinstallare il kernel Debian | |||
sudo apt-get remove --purge linux-image-3.16.0-4-amd64 linux-image-amd64 --purge | |||
* Pulire i pacchetti: | |||
sudo apt-get autoremove --purge | |||
* Fare reboot | |||
=Riferimenti= | =Riferimenti= | ||
*[https://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_Jessie Install Proxmox VE on Debian Jessie - Proxmox VE] | |||
*[http://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_Wheezy Install Proxmox VE on Debian Wheezy - Proxmox VE] | *[http://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_Wheezy Install Proxmox VE on Debian Wheezy - Proxmox VE] | ||
*[http://pve.proxmox.com/wiki/Package_repositories Package repositories - Proxmox VE] | *[http://pve.proxmox.com/wiki/Package_repositories Package repositories - Proxmox VE] | ||
[[Category: HOWTO]][[Category: Installation]] | [[Category: HOWTO]][[Category: Installation]][[Category: Published]] | ||
Latest revision as of 16:21, 16 March 2016
Installazione
Proxmox 4.x
- Installare Debian Jessie amd64
- Verificare la corretta risoluzione dei nomi locali
sudoedit /etc/hosts
127.0.0.1 localhost.localdomain localhost 192.168.1.100 proxmox01.example.priv proxmox01 pvelocalhost
- Verificare la risoluzione diretta:
getent hosts $(hostname)
192.168.1.100 proxmox01.example.priv proxmox01 pvelocalhost
- Verificare la risoluzione inversa:
getent hosts 192.168.1.100
192.168.1.100 proxmox01.example.priv proxmox01 pvelocalhost
- Aggiungere il repository Proxmox VE :
echo "deb http://download.proxmox.com/debian jessie pve-no-subscription" | sudo tee /etc/apt/sources.list.d/pve-install-repo.list
- Aggiungere la repository key:
wget -O- "http://download.proxmox.com/debian/key.asc" | sudo apt-key add -
- Aggiornare la cache apt ed i pacchetti
sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get clean
- Installare i pacchetti base:
sudo apt-get install proxmox-ve ntp ssh postfix ksm-control-daemon open-iscsi systemd-sysv
- Rimuovere i repository Enterprise:
sudo rm /etc/apt/sources.list.d/pve-enterprise.list
- Fare reboot, e controllare che sia attivo il kernel pve
Proxmox 3.x
In some case it makes sense to install Proxmox VE on top of a running Debian Wheezy 64-bit
For this HowTO the following Debian Wheezy ISO was used: debian-7.4.0-amd64-netinst.iso.
Suggested partition layout with LVM:
Device Boot Start End Blocks Id System /dev/sda1 1 122 975872 83 Linux /dev/sda2 122 5222 40965120 8e Linux LVM
LVM:
LV VG Attr LSize Origin Snap% Move Log Copy% Convert data pve -wi-ao 30.69g root pve -wi-ao 3.72g swap pve -wi-ao 1.86g
We recommend to use ext3 filesystem for best OpenVZ performance and stability.
Install a standard Debian Wheezy (amd64)
- Check /etc/hosts
Note: Make sure that no IPv6 address for your hostname is specified in /etc/hosts
sudoedit /etc/hosts
127.0.0.1 localhost.localdomain localhost 192.168.6.177 proxmox-6-177.proxmox.com proxmox-6-177 pvelocalhost
- 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
Adapt your sources.list and add the Proxmox VE repository:
sudoedit /etc/apt/sources.list
# Standard wheezy repos deb http://ftp.it.debian.org/debian/ wheezy main contrib non-free deb http://ftp.it.debian.org/debian/ wheezy-updates main contrib non-free deb http://security.debian.org/ wheezy/updates main contrib non-free # PVE pve-no-subscription repository provided by proxmox.com, NOT recommended for production use deb http://download.proxmox.com/debian wheezy pve-no-subscription
Add the Proxmox VE repository key:
wget -O- "http://download.proxmox.com/debian/key.asc" | sudo apt-key add -
Update your repository and system by running:
sudo apt-get update && sudo apt-get dist-upgrade
- Install Proxmox VE Kernel
sudo apt-get install pve-firmware pve-kernel-2.6.32-39-pve
Optional - install Kernel headers:
sudo apt-get install pve-headers-2.6.32-39-pve
- Make sure to select Proxmox VE Kernel on the boot loader (grub2) - Attention: Default is the 3.2 kernel. See Impostare un kernel specifico di avvio in Grub2
cat /boot/grub/grub.cfg | grep menuentry | cut -f 2 --delimiter="'"
sudoedit /etc/default/grub
GRUB_DEFAULT="Debian GNU/Linux, with Linux 2.6.32-39-pve"
sudo update-grub
- Reboot: Now restart the system using the Proxmox VE kernel.
- Remove the Debian kernel:
sudo apt-get remove --purge linux-image-amd64 linux-image-3.2.0-4-amd64 linux-base
- Check grub2 config by running:
sudo update-grub
- Install Proxmox VE packages: make sure you are running the Proxmox VE Kernel, otherwise the installation will fail.
Check the currently active Kernel:
uname -a Linux 2.6.32-26-pve ...
Install the Proxmox VE packages:
sudo apt-get install proxmox-ve-2.6.32 ntp ssh lvm2 postfix ksm-control-daemon vzprocps open-iscsi bootlogd
Accept the suggestion to remove Exim and configure postfix according to your network.
Note: Apache2 is not needed anymore as we use our own web server.
Connessione all'iterfaccia web Proxmox VE web
- Copiare ed installare gli eventuali certificati SSL
- Connect to the admin web interface (https://youripaddress:8006) and configure the vmbr0 and review all other settings, or manually edit network config as follows:
sudoedit /etc/network/interfaces
auto eth0
iface eth0 inet manual
auto vmbr0
iface vmbr0 inet static
address 192.168.0.100
netmask 255.255.255.0
gateway 192.168.0.254
bridge_ports eth0
bridge_stp off
bridge_fd 0
Pulizia pacchetti
- Disinstallare il kernel Debian
sudo apt-get remove --purge linux-image-3.16.0-4-amd64 linux-image-amd64 --purge
- Pulire i pacchetti:
sudo apt-get autoremove --purge
- Fare reboot