centos (2)

Davide Airaghi

Slackware: CentOS linux container

If you need to create a CentOS based linux container on your Slackware here you can find how i've made it. Before you start
  • (re)compile your kernel including every config option needed to have lxc-checkconfig output "enable" in each line.
  • (re)compile your kernel to add support for "networking bridge"
  • update rpm package using the one found  here
  • install yum package, you can find it here
  • make sure to have  lxc package installed (it's in the main Slackware repository)
  • make sure tu have installed bridge-utils package (it's in the main Slackware repository)
  • make sure to have enough free disk space (my setup used at least 400MB)
  • add at the end of /etc/rc.d/rc.local the following lines /usr/sbin/brctl addbr br0 /usr/sbin/brctl br0 10.0.0.1/24 /usr/sbin/iptables -t nat -A POSTROUTING -s 10.0.0.100 -o eth0 -j MASQUERADE /sbin/sysctl net.ipv4.ip_forward=1
Continue reading...
Davide Airaghi

Slackware: Linux Container "CentOS"

Se avete bisgono, come il sottoscritto, di creare un ambiente CentOS all'interno della vostra Slackware e volete usare le funzionalità messe a dispozione dai "Linux Containers" ecco una possibile soluzione ai vostri problemi.

Preparazione

  • (ri)configurate il vostro kernel in modo che l'output di lxc-checkconfig dia "enabled" su tutte le voci e che sia abilitato il supporto di rete per i "bridge"
  • aggiornate il pacchetto rpm con quello presente qui
  • installate il pacchetto yum presente qui
  • assicuratevi di aver installato il pacchetto lxc presente nei repository slackware
  • assicuratevi di aver installato il pacchetto bridge-utils presente nei repository Slackware
  • assicuratevi di avere abbastanza spazio su disco (nel mio test ho avuto visogno di circa 400MB)
  • aggiungere al file /etc/rc.d/rc.local le seguenti linee /usr/sbin/brctl addbr br0 /usr/sbin/brctl br0 10.0.0.1/24 /usr/sbin/iptables -t nat -A POSTROUTING -s 10.0.0.100 -o eth0 -j MASQUERADE /sbin/sysctl net.ipv4.ip_forward=1
Continue reading...