util-vserver:Setup CentOS Guest

From Linux-VServer

Revision as of 16:31, 17 November 2007 by Powerfox (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Create a CentOS Guest

  • Create the guest
vserver myserver1 build -m yum --interface eth0: --hostname=myserver1 -- -d centos4
  • Start the guest
vserver myserver1 start
  • Copy the nameserver config from the host
cp /etc/resolv.conf /vservers/myserver1/etc/resolv.conf
  • Install elementary packages on the guest
vyum myserver1 -- install -y openssh openssh-server vim-minimal passwd mtr rsync screen
  • Login into the guest
vserver myserver1 enter
  • Edit ssh to allow login
vi /etc/ssh/sshd_config
  • Modify UsePAM yes to:
UsePAM no
  • Restart ssh
service sshd restart
  • Set passwd
  • Exit the guest

Internalize Package Management

  • Install yum and rpm
vyum myserver1 -- install -y yum 
  • Internalize package management
vserver myserver1 pkgmgmt internalize
  • create the correct system vars for yum
vserver myserver1 exec bash -c "rm -f /var/lib/rpm/__db*; rpm --rebuilddb"
Personal tools