Difference between revisions of "util-vserver:Setup CentOS Guest"

From Linux-VServer

Jump to: navigation, search
(Create a CentOS Guest)
Line 3: Line 3:
 
* Create the guest
 
* Create the guest
 
  vserver myserver1 build -m yum --interface eth0:192.168.0.1/24 --hostname=myserver1 -- -d centos4
 
  vserver myserver1 build -m yum --interface eth0:192.168.0.1/24 --hostname=myserver1 -- -d centos4
 +
 +
Help! I get the following error running this command:<br>
 +
mount: mount point /etc/rpm does not exist<br>
 +
Please explain why, and how I can fix this.
  
 
* Start the guest
 
* Start the guest

Revision as of 15:25, 17 November 2007

Create a CentOS Guest

  • Create the guest
vserver myserver1 build -m yum --interface eth0:192.168.0.1/24 --hostname=myserver1 -- -d centos4

Help! I get the following error running this command:
mount: mount point /etc/rpm does not exist
Please explain why, and how I can fix this.

  • 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
passwd
  • Exit the guest
exit

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