This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
proxmox:1_2_3_fresh_3.4_proxmox [2015/12/21 16:06] moliver@uclv |
proxmox:1_2_3_fresh_3.4_proxmox [2016/01/14 21:12] moliver@uclv |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | Pasos para la instalacion de un proxmox 3.4 en la red uclv | + | Pasos para la instalacion de un proxmox 3.4 en la red UCLV |
- | Seleccionar el metodo de instalacion por red | + | Esto es un script rapido para configurar lo mas comun en un Proxmox recien instalado en el ambito de la red UCLV. Es muy seguro que será diferente para otros centros pero igual se peude copiar la idea. |
- | Recien instalado | + | Solo se debe copiar y pegar la siguiente linea, la cual descargará el script que se encuentra a continuación. |
- | cat > /etc/apt/sources.list | + | <code> |
+ | wget http://redtic.uclv.cu/dokuwiki/_export/code/proxmox:1_2_3_fresh_3.4_proxmox?codeblock=1 -O /tmp/run.sh | ||
+ | bash /tmp/run.sh | ||
+ | </code> | ||
+ | |||
+ | <file sh run.sh> | ||
+ | #Cambio del repo para usar los de la UCLV | ||
+ | cat << 'EoT' > /etc/apt/sources.list | ||
deb http://repos.uclv.edu.cu/debian wheezy main contrib | deb http://repos.uclv.edu.cu/debian wheezy main contrib | ||
Line 14: | Line 21: | ||
deb http://repos.uclv.edu.cu/proxmox wheezy pve-no-subscription | deb http://repos.uclv.edu.cu/proxmox wheezy pve-no-subscription | ||
+ | EoT | ||
- | eliminar el repo que necesita subscripcion | + | #Eliminar el repo que necesita subscripcion |
- | rm -f /etc/apt/sources.d/* | + | rm -f /etc/apt/sources.list.d/pve-enterprise.list |
+ | #Actualizar e instalar paquetes que pueden ser util luego: | ||
+ | |||
+ | apt-get update | ||
+ | apt-get -y dist-upgrade | ||
+ | apt-get -y install screen mc sudo rdate iptraf tcpdump atop iotop | ||
+ | |||
+ | #Creación de alias | ||
+ | |||
+ | cat << 'EoT' >> /etc/bash.bashrc | ||
- | creacion de alias necesarios | ||
- | <code> | ||
- | cat >> /etc/bash.bashrc | ||
alias ll='ls -al --color=yes' | alias ll='ls -al --color=yes' | ||
- | </code> | + | |
+ | EoT | ||
+ | |||
+ | #Adicion de los nodos al /etc/hosts para que el cluster funcione mucho mas estable | ||
+ | |||
+ | cat >> /etc/hosts <<'EoT' | ||
+ | |||
+ | 10.12.113.1 pm01 | ||
+ | 10.12.113.2 pm02 | ||
+ | 10.12.113.3 pm03 | ||
+ | 10.12.113.4 pm04 | ||
+ | 10.12.113.5 pm05 | ||
+ | 10.12.113.6 pm06 | ||
+ | 10.12.113.7 pm07 | ||
+ | 10.12.113.8 pm08 | ||
+ | 10.12.113.9 pm09 | ||
+ | 10.12.113.10 pm10 | ||
+ | |||
+ | EoT | ||
+ | |||
+ | #Sincronizacion rapida de la hora contra los controladores de dominio | ||
+ | rdate -n 10.12.1.50 | ||
+ | |||
+ | |||
+ | PMNUMBER=`hostname | cut -c4` | ||
+ | |||
+ | #Configuracion de las dos tarjetas de red. | ||
+ | #La eth0 para la red de gestion 10.12.113.x | ||
+ | #La segunda para la red de produccion 10.12.112.x | ||
+ | |||
+ | cat << 'EoT' > /tmp/interfaces | ||
+ | # network interface settings | ||
+ | auto lo | ||
+ | iface lo inet loopback | ||
+ | |||
+ | iface eth0 inet manual | ||
+ | |||
+ | iface eth1 inet manual | ||
+ | |||
+ | auto vmbr0 | ||
+ | iface vmbr0 inet static | ||
+ | address 10.12.113.PMNUMBER | ||
+ | netmask 255.255.255.0 | ||
+ | bridge_ports eth0 | ||
+ | bridge_stp off | ||
+ | bridge_fd 0 | ||
+ | |||
+ | auto vmbr1 | ||
+ | iface vmbr1 inet static | ||
+ | address 10.12.112.23PMNUMBER | ||
+ | netmask 255.255.255.0 | ||
+ | gateway 10.12.112.254 | ||
+ | bridge_ports eth1 | ||
+ | bridge_stp off | ||
+ | bridge_fd 0 | ||
+ | |||
+ | EoT | ||
+ | |||
+ | sed 's/PMNUMBER/'${PMNUMBER}'/' /tmp/interfaces > /etc/network/interfaces | ||
+ | |||
+ | #Adicion de ruta para 10.12.253.x por interface de gestion para conexion con la red de los VMWARE | ||
+ | |||
+ | cat > /tmp/rutas << 'EoT' | ||
+ | #!/bin/bash | ||
+ | |||
+ | /sbin/route add -net 10.12.253.0/24 gw 10.12.113.254 | ||
+ | |||
+ | EoT | ||
+ | |||
+ | |||
+ | cat /tmp/rutas /etc/rc.local > /tmp/rc.local | ||
+ | chmod +x /tmp/rc.local | ||
+ | mv -f /tmp/rc.local /etc/rc.local | ||
+ | |||
+ | |||
+ | # | ||
+ | </file> | ||
+ | coinfigurar la red de acuerdo a otros articulos en esta wiki | ||