Difference between revisions of "util-vserver:Setup CentOS Guest"
From Linux-VServer
(→Create a CentOS Guest) |
m (Reverted edits by 82.69.161.137 (Talk); changed back to last version by 84.163.185.213) |
||
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 | ||
− | |||
− | |||
− | |||
− | |||
* Start the guest | * Start the guest |
Latest revision as of 15:31, 17 November 2007
[edit] Create a CentOS Guest
- Create the guest
vserver myserver1 build -m yum --interface eth0:192.168.0.1/24 --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
passwd
- Exit the guest
exit
[edit] 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"