Installation on Redhat

From Linux-VServer

Revision as of 20:12, 21 October 2011 by Glenn (Talk | contribs)

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

Isolated Network installation on RHEL5.3 with Network Hostname and IP.

My installation was on RHEL5.3 in an isolated server environment. I downloaded the VServer rpm's from a public repo to a local directory /var/www/html/VServer

  1. cd /etc/yum.repos.d/
  2. vi VServerlocal.repo

[VServer] name=VServer Mirror baseurl=http://10.x.x.x/VServer <- Change IP ADDRESS to local IP enabled=1 gpgcheck=0

Disabled any other *.repo files I had

  1. server httpd restart
  2. yum list

You should get a list of the new Repository created for VServer locally (I did this on my "host" root directory

  1. yum update yum
  2. yum install kernel
  3. vi /etc/sshd_config

Add the line “ListenAddress <host IP address>”

---REBOOT--

  1. chkconfig –level 345 httpd on
  2. server httpd restart
  3. yum install util-vserver{,-core,-lib,-sysv,-build}
  4. /etc/init.d/vprocunhide start
  5. chkconfig vservers-default on

Building Guest Systems

  1. cd /etc/sysconfig/network-scripts
  2. cp ifcfg-eth0 ifcfg-eth0:1
  1. vi ifcfg-eth0:1

Example eth0:1:

  1. Broadcom Corporation NetXtreme II BCM5708 Gigabit Ethernet

DEVICE=eth0:1 <- CHANGE to add :1

BOOTPROTO=none

HWADDR=00:00:00:00:AA:BB

IPADDR=10.x.x.x <- CHANGE IP ADDRESS

NETMASK=255.255.255.0

ONBOOT=yes

GATEWAY=10.192.168.1

TYPE=Ethernet

  1. service network restart

You should not get any errors on start up.

  1. cd /etc/vservers/.distributions/
  2. mkdir rhel5
  3. cd /usr/lib64/util-vserver/distributions/centos5/
  4. cp -r * /etc/vservers/.distributions/rhel5/
  5. cd /usr/lib64/util-vserver/distributions/
  6. cp -r redhat/ /etc/vservers/.distributions/
  7. cd /etc/vservers/.distributions/rhel5/yum.repos.d

Backup repo *.bak

  1. cp /etc/yum.repos.d/vserver.repo .

Create new vserver – EACH VSERVER REQUIRES A UNIQUE CONTEXT NUMBER --

  1. vserver newhostname1 build -m yum --context 42 --hostname=newhostname1 --interface eth0:10.x.x.20/24 -- -d rhel5

Change 10.x.x.20 to the new eth:0:1 IP address.

Post-build customization

  1. vserver newhostname1 start
  2. vyum hostname1 -- install filesystem.x86_64 0:2.4.0-2
  3. vyum hostname1 -- install yum
  4. vyum hostname1 -- install vim-minimal

Now you are ready to login to your new Vserver.

  1. vserver {hostname1} enter

If you set up a Local RHEL5.3 Repo you can add all RPMs

  1. cd /etc/yum.repo.d/
  2. vi vserver.repo

example [rh] name=RH Mirror baseurl=http://10.x.x.x/rh <- The IP Address of the Host server enabled=1 gpgcheck=0

  1. yum list

This should provide a large list of RPMs

  1. exit
Personal tools