Difference between revisions of "Installation on Redhat"
From Linux-VServer
(Isolated Network installation on RHEL5.3 with Network Hostname and IP.) |
(+cat) |
||
Line 107: | Line 107: | ||
#exit | #exit | ||
+ | |||
+ | [[Category:Installation]] |
Latest revision as of 20:12, 21 October 2011
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
- cd /etc/yum.repos.d/
- 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
- server httpd restart
- yum list
You should get a list of the new Repository created for VServer locally (I did this on my "host" root directory
- yum update yum
- yum install kernel
- vi /etc/sshd_config
Add the line “ListenAddress <host IP address>”
---REBOOT--
- chkconfig –level 345 httpd on
- server httpd restart
- yum install util-vserver{,-core,-lib,-sysv,-build}
- /etc/init.d/vprocunhide start
- chkconfig vservers-default on
Building Guest Systems
- cd /etc/sysconfig/network-scripts
- cp ifcfg-eth0 ifcfg-eth0:1
- vi ifcfg-eth0:1
Example eth0: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
- service network restart
You should not get any errors on start up.
- cd /etc/vservers/.distributions/
- mkdir rhel5
- cd /usr/lib64/util-vserver/distributions/centos5/
- cp -r * /etc/vservers/.distributions/rhel5/
- cd /usr/lib64/util-vserver/distributions/
- cp -r redhat/ /etc/vservers/.distributions/
- cd /etc/vservers/.distributions/rhel5/yum.repos.d
Backup repo *.bak
- cp /etc/yum.repos.d/vserver.repo .
Create new vserver – EACH VSERVER REQUIRES A UNIQUE CONTEXT NUMBER --
- 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
- vserver newhostname1 start
- vyum hostname1 -- install filesystem.x86_64 0:2.4.0-2
- vyum hostname1 -- install yum
- vyum hostname1 -- install vim-minimal
Now you are ready to login to your new Vserver.
- vserver {hostname1} enter
If you set up a Local RHEL5.3 Repo you can add all RPMs
- cd /etc/yum.repo.d/
- 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
- yum list
This should provide a large list of RPMs
- exit