http://www.linux-vserver.org/api.php?action=feedcontributions&user=83.67.115.198&feedformat=atomLinux-VServer - User contributions [en]2024-03-29T02:18:47ZUser contributionsMediaWiki 1.20.2http://www.linux-vserver.org/Installation_on_CentOSInstallation on CentOS2008-05-16T15:17:30Z<p>83.67.115.198: Added back CentOS specific tweaks</p>
<hr />
<div>== Install CentOS 5 ==<br />
<br />
My CentOS 5 installation is a DVD install with only the "Desktop - GNOME" group selected.<br />
<br />
On restart, a number of questions (timezone/security level/etc) are asked. At this stage set the "SELinux" option to disabled. If you skip this step, then simply modify the /etc/sysconfig/selinux file and disable selinux from there. You will need to reboot before this takes effect, but it's okay to wait until you have installed the kernel before doing this (just to save some time :)).<br />
<br />
== Add the repository ==<br />
<br />
In order to install the necessary packages, you will have to add the repository containing them to your yum configuration. Paste the following in /etc/yum.repos.d/dhozac-vserver.repo<br />
[dhozac-vserver]<br />
name=Linux-VServer related packages for CentOS $releasever - $basearch<br />
baseurl=http://rpm.hozac.com/dhozac/centos/$releasever/vserver/$basearch<br />
gpgkey=http://rpm.hozac.com/conf/keys/RPM-DHOZAC-GPG-KEY<br />
<br />
== Update yum ==<br />
<br />
Before you do anything else, update yum. If you don't, you'll have to sit through lots of "you're using a knackered version of yum. Wait 5 seconds" messages.<br />
yum update yum<br />
Which should pick the version from the dhozac repository.<br />
<br />
== Install the kernel ==<br />
<br />
To install the kernel, run<br />
yum install kernel<br />
<br />
Double check the grub file to make sure it is the bootable kernel (/boot/grub/grub.conf). If all is okay we are ready to restart the server.<br />
<br />
At this stage (before the reboot) I also modify the host's sshd_config file, so it doesn't listen to every interface on the server, which would block any guest's attempt to run sshd.<br />
<br />
vi /etc/ssh/sshd_config<br />
<br />
and add the line "ListenAddress <host IP address>".<br />
<br />
== Install util-vserver ==<br />
<br />
To install util-vserver, run<br />
yum install util-vserver{,-core,-lib,-sysv,-build}<br />
<br />
== Post installation steps ==<br />
<br />
Make certain /proc entries visible<br />
<br />
/etc/init.d/vprocunhide start<br />
<br />
== All done! ==<br />
Once your host is setup, you can start [[Building Guest Systems|building guest systems]].<br />
<br />
== CentOS specific tweaks ==<br />
<br />
Optionally, the following may be run to increase the functionality of the guest once you've built it:<br />
<br />
yum -y install yum vim-common vim-minimal vim-enhanced openssh-server openssh \<br />
gcc gcc-c++ kernel-devel bison openssl-devel libtermcap-devel ncurses-devel \<br />
lynx tar wget nmap bzip2 mysql mysql-devel passwd zip gzip less make<br />
<br />
Split /etc/passwd into /etc/passwd and /etc/shadow:<br />
pwconv<br />
<br />
Then remove any lines which contain 'pam_loginuid.so' from /etc/pam.d/sshd, /etc/pam.d/login and /etc/pam.d/remote.<br />
<br />
Edit /etc/ssh/sshd_config and change the line '#ListenAddress 0.0.0.0' to 'ListenAddress w.x.y.z' (where w.x.y.z is the IP allocated to the guest)<br />
<br />
Create /etc/resolv.conf with the appropriate details.</div>83.67.115.198http://www.linux-vserver.org/Installation_on_CentOSInstallation on CentOS2008-04-25T16:37:39Z<p>83.67.115.198: /* Install a guest */</p>
<hr />
<div>== Install CentOS 5 ==<br />
<br />
My CentOS 5 installation is a DVD install with only the "Desktop - GNOME" group selected.<br />
<br />
On restart, a number of questions (timezone/security level/etc) are asked. At this stage set the "SELinux" option to disabled. If you skip this step, then simply modify the /etc/sysconfig/selinux file and disable selinux from there. You will need to reboot before this takes effect, but its okay to wait until you have installed the kernel before doing this (just to save some time :)<br />
<br />
== Add the repository ==<br />
<br />
In order to install the necessary packages, you will have to add the repository containing them to your yum configuration. Paste the following in /etc/yum.repos.d/dhozac-vserver.repo<br />
[dhozac-vserver]<br />
name=Linux-VServer related packages for CentOS $releasever - $basearch<br />
baseurl=http://rpm.hozac.com/dhozac/centos/$releasever/vserver/$basearch<br />
gpgkey=http://rpm.hozac.com/conf/keys/RPM-DHOZAC-GPG-KEY<br />
<br />
== Update yum ==<br />
<br />
Before you do anything else, update yum. If you don't, you'll have to sit through lots of "you're using a knackered version of yum. Wait 5 seconds" messages.<br />
yum update yum<br />
Which should pick the version from the dhozac repository.<br />
<br />
== Install the kernel ==<br />
<br />
To install the kernel, run<br />
yum install kernel<br />
<br />
Double check the grub file to make sure it is the bootable kernel (/boot/grub/grub.conf). If all is okay we are ready to restart the server.<br />
<br />
At this stage (before the reboot) I also modify the hosts sshd config file, so it doesn't listen to every interface on the server, which would block any guest's attempt to run sshd.<br />
<br />
vi /etc/ssh/sshd_config<br />
<br />
and add the line "ListenAddress 192.168.0.1"<br />
<br />
== Install util-vserver ==<br />
<br />
To install util-vserver, run<br />
yum install util-vserver{,-core,-lib,-sysv,-build}<br />
<br />
== Post installation steps ==<br />
<br />
Make certain /proc entries visible<br />
<br />
/etc/init.d/vprocunhide start<br />
<br />
== Install a guest ==<br />
<br />
As root, try the following to test your installation (this example installs a CentOS 5 guest)<br />
<br />
vserver testing01 build -m yum --context 4040 --hostname=test01.test.loc \<br />
--interface eth0:192.168.101.101/255.255.0.0 -- -d centos5<br />
<br />
yum will install the minimal packages now. If you see something like<br />
<br />
/usr/lib/util-vserver/distributions/centos5/initpost: line 105: 3587 Killed<br />
$_VSERVER "$vserver" exec bash -c ': >/tmp/startwait' >&/dev/null<br />
<br />
Don't worry, it's okay.<br />
<br />
At this point you should be able to start and enter your vserver install. To start the guest do,<br />
<br />
vserver testing01 start<br />
<br />
And to enter the guest, do <br />
<br />
vserver testing01 enter<br />
<br />
To get back to the host, just exit the shell.<br />
<br />
If you want to manage the packages inside the guest, you will have to install some package management programs as well as internalize the RPM database. This can be achieved by<br />
vyum testing01 -- install yum<br />
vserver testing01 pkgmgmt internalize<br />
<br />
Depending on your host distribution, you may also need to do<br />
vserver testing01 exec bash -c "rm -f /var/lib/rpm/__db*; rpm --rebuilddb"<br />
You'll know it's required if a simple ''rpm -qa'' inside the guest complains about a database version mismatch.<br />
<br />
Optionally, the following may be run to increase the functionality of the guest:<br />
vyum testing01 -- install yum vim-common vim-minimal vim-enhanced openssh-server openssh \<br />
gcc gcc-c++ kernel-devel bison openssl-devel libtermcap-devel ncurses-devel doxygen \<br />
curl-devel newt-devel mlocate lynx tar wget nmap bzip2 speex speex-devel unixODBC \<br />
unixODBC-devel libtool-ltdl libtool-ltdl-devel mysql-connector-odbc mysql mysql-devel \<br />
passwd zip gzip less make<br />
mkdir /etc/vservers/testing01/apps/vunify<br />
vserver testing01 hashify<br />
<br />
Enter the guest and run:<br />
pwconv<br />
which splits /etc/passwd into /etc/passwd and /etc/shadow.<br />
<br />
Then remove any lines which contain 'pam_loginuid.so' from /etc/pam.d/sshd, /etc/pam.d/login and /etc/pam.d/remote.<br />
<br />
Edit /etc/ssh/sshd_config and change the line '#ListenAddress 0.0.0.0' to 'ListenAddress w.x.y.z' (where w.x.y.z is the IP allocated to the guest)<br />
<br />
Create /etc/resolv.conf with the appropriate details.<br />
<br />
If all goes well you now have a working setup :)</div>83.67.115.198http://www.linux-vserver.org/Installation_on_CentOSInstallation on CentOS2008-04-25T16:35:55Z<p>83.67.115.198: /* Install a guest */</p>
<hr />
<div>== Install CentOS 5 ==<br />
<br />
My CentOS 5 installation is a DVD install with only the "Desktop - GNOME" group selected.<br />
<br />
On restart, a number of questions (timezone/security level/etc) are asked. At this stage set the "SELinux" option to disabled. If you skip this step, then simply modify the /etc/sysconfig/selinux file and disable selinux from there. You will need to reboot before this takes effect, but its okay to wait until you have installed the kernel before doing this (just to save some time :)<br />
<br />
== Add the repository ==<br />
<br />
In order to install the necessary packages, you will have to add the repository containing them to your yum configuration. Paste the following in /etc/yum.repos.d/dhozac-vserver.repo<br />
[dhozac-vserver]<br />
name=Linux-VServer related packages for CentOS $releasever - $basearch<br />
baseurl=http://rpm.hozac.com/dhozac/centos/$releasever/vserver/$basearch<br />
gpgkey=http://rpm.hozac.com/conf/keys/RPM-DHOZAC-GPG-KEY<br />
<br />
== Update yum ==<br />
<br />
Before you do anything else, update yum. If you don't, you'll have to sit through lots of "you're using a knackered version of yum. Wait 5 seconds" messages.<br />
yum update yum<br />
Which should pick the version from the dhozac repository.<br />
<br />
== Install the kernel ==<br />
<br />
To install the kernel, run<br />
yum install kernel<br />
<br />
Double check the grub file to make sure it is the bootable kernel (/boot/grub/grub.conf). If all is okay we are ready to restart the server.<br />
<br />
At this stage (before the reboot) I also modify the hosts sshd config file, so it doesn't listen to every interface on the server, which would block any guest's attempt to run sshd.<br />
<br />
vi /etc/ssh/sshd_config<br />
<br />
and add the line "ListenAddress 192.168.0.1"<br />
<br />
== Install util-vserver ==<br />
<br />
To install util-vserver, run<br />
yum install util-vserver{,-core,-lib,-sysv,-build}<br />
<br />
== Post installation steps ==<br />
<br />
Make certain /proc entries visible<br />
<br />
/etc/init.d/vprocunhide start<br />
<br />
== Install a guest ==<br />
<br />
As root, try the following to test your installation (this example installs a CentOS 5 guest)<br />
<br />
vserver testing01 build -m yum --context 4040 --hostname=test01.test.loc \<br />
--interface eth0:192.168.101.101/255.255.0.0 -- -d centos5<br />
<br />
yum will install the minimal packages now. If you see something like<br />
<br />
/usr/lib/util-vserver/distributions/centos5/initpost: line 105: 3587 Killed<br />
$_VSERVER "$vserver" exec bash -c ': >/tmp/startwait' >&/dev/null<br />
<br />
Don't worry, it's okay.<br />
<br />
At this point you should be able to start and enter your vserver install. To start the guest do,<br />
<br />
vserver testing01 start<br />
<br />
And to enter the guest, do <br />
<br />
vserver testing01 enter<br />
<br />
To get back to the host, just exit the shell.<br />
<br />
If you want to manage the packages inside the guest, you will have to install some package management programs as well as internalize the RPM database. This can be achieved by<br />
vyum testing01 -- install yum<br />
vserver testing01 pkgmgmt internalize<br />
<br />
Depending on your host distribution, you may also need to do<br />
vserver testing01 exec bash -c "rm -f /var/lib/rpm/__db*; rpm --rebuilddb"<br />
You'll know it's required if a simple ''rpm -qa'' inside the guest complains about a database version mismatch.<br />
<br />
Optionally, the following may be run to increase the functionality of the guest:<br />
vyum testing01 -- install yum vim-common vim-minimal vim-enhanced openssh-server openssh \<br />
gcc gcc-c++ kernel-devel bison openssl-devel libtermcap-devel ncurses-devel doxygen \<br />
curl-devel newt-devel mlocate lynx tar wget nmap bzip2 speex speex-devel unixODBC \<br />
unixODBC-devel libtool-ltdl libtool-ltdl-devel mysql-connector-odbc mysql mysql-devel \<br />
passwd zip gzip less<br />
mkdir /etc/vservers/testing01/apps/vunify<br />
vserver testing01 hashify<br />
<br />
Enter the guest and run:<br />
pwconv<br />
which splits /etc/passwd into /etc/passwd and /etc/shadow.<br />
<br />
Then remove any lines which contain 'pam_loginuid.so' from /etc/pam.d/sshd, /etc/pam.d/login and /etc/pam.d/remote.<br />
<br />
Edit /etc/ssh/sshd_config and change the line '#ListenAddress 0.0.0.0' to 'ListenAddress w.x.y.z' (where w.x.y.z is the IP allocated to the guest)<br />
<br />
Create /etc/resolv.conf with the appropriate details.<br />
<br />
If all goes well you now have a working setup :)</div>83.67.115.198http://www.linux-vserver.org/Installation_on_CentOSInstallation on CentOS2008-04-25T08:41:45Z<p>83.67.115.198: /* Install a guest */</p>
<hr />
<div>== Install CentOS 5 ==<br />
<br />
My CentOS 5 installation is a DVD install with only the "Desktop - GNOME" group selected.<br />
<br />
On restart, a number of questions (timezone/security level/etc) are asked. At this stage set the "SELinux" option to disabled. If you skip this step, then simply modify the /etc/sysconfig/selinux file and disable selinux from there. You will need to reboot before this takes effect, but its okay to wait until you have installed the kernel before doing this (just to save some time :)<br />
<br />
== Add the repository ==<br />
<br />
In order to install the necessary packages, you will have to add the repository containing them to your yum configuration. Paste the following in /etc/yum.repos.d/dhozac-vserver.repo<br />
[dhozac-vserver]<br />
name=Linux-VServer related packages for CentOS $releasever - $basearch<br />
baseurl=http://rpm.hozac.com/dhozac/centos/$releasever/vserver/$basearch<br />
gpgkey=http://rpm.hozac.com/conf/keys/RPM-DHOZAC-GPG-KEY<br />
<br />
== Update yum ==<br />
<br />
Before you do anything else, update yum. If you don't, you'll have to sit through lots of "you're using a knackered version of yum. Wait 5 seconds" messages.<br />
yum update yum<br />
Which should pick the version from the dhozac repository.<br />
<br />
== Install the kernel ==<br />
<br />
To install the kernel, run<br />
yum install kernel<br />
<br />
Double check the grub file to make sure it is the bootable kernel (/boot/grub/grub.conf). If all is okay we are ready to restart the server.<br />
<br />
At this stage (before the reboot) I also modify the hosts sshd config file, so it doesn't listen to every interface on the server, which would block any guest's attempt to run sshd.<br />
<br />
vi /etc/ssh/sshd_config<br />
<br />
and add the line "ListenAddress 192.168.0.1"<br />
<br />
== Install util-vserver ==<br />
<br />
To install util-vserver, run<br />
yum install util-vserver{,-core,-lib,-sysv,-build}<br />
<br />
== Post installation steps ==<br />
<br />
Make certain /proc entries visible<br />
<br />
/etc/init.d/vprocunhide start<br />
<br />
== Install a guest ==<br />
<br />
As root, try the following to test your installation (this example installs a CentOS 5 guest)<br />
<br />
vserver testing01 build -m yum --context 4040 --hostname=test01.test.loc \<br />
--interface eth0:192.168.101.101/255.255.0.0 -- -d centos5<br />
<br />
yum will install the minimal packages now. If you see something like<br />
<br />
/usr/lib/util-vserver/distributions/centos5/initpost: line 105: 3587 Killed<br />
$_VSERVER "$vserver" exec bash -c ': >/tmp/startwait' >&/dev/null<br />
<br />
Don't worry, it's okay.<br />
<br />
At this point you should be able to start and enter your vserver install. To start the guest do,<br />
<br />
vserver testing01 start<br />
<br />
And to enter the guest, do <br />
<br />
vserver testing01 enter<br />
<br />
To get back to the host, just exit the shell.<br />
<br />
If you want to manage the packages inside the guest, you will have to install some package management programs as well as internalize the RPM database. This can be achieved by<br />
vyum testing01 -- install yum<br />
vserver testing01 pkgmgmt internalize<br />
<br />
Depending on your host distribution, you may also need to do<br />
vserver testing01 exec bash -c "rm -f /var/lib/rpm/__db*; rpm --rebuilddb"<br />
You'll know it's required if a simple ''rpm -qa'' inside the guest complains about a database version mismatch.<br />
<br />
Optionally, the following may be run to increase the functionality of the guest:<br />
vyum testing01 -- install yum vim-common vim-minimal vim-enhanced openssh-server openssh \<br />
gcc gcc-c++ kernel-devel bison openssl-devel libtermcap-devel ncurses-devel doxygen \<br />
curl-devel newt-devel mlocate lynx tar wget nmap bzip2 speex speex-devel unixODBC \<br />
unixODBC-devel libtool-ltdl libtool-ltdl-devel mysql-connector-odbc mysql mysql-devel \<br />
passwd<br />
mkdir /etc/vservers/testing01/apps/vunify<br />
vserver testing01 hashify<br />
<br />
Enter the guest and run:<br />
pwconv<br />
which splits /etc/passwd into /etc/passwd and /etc/shadow.<br />
<br />
Then remove any lines which contain 'pam_loginuid.so' from /etc/pam.d/sshd, /etc/pam.d/login and /etc/pam.d/remote.<br />
<br />
Edit /etc/ssh/sshd_config and change the line '#ListenAddress 0.0.0.0' to 'ListenAddress w.x.y.z' (where w.x.y.z is the IP allocated to the guest)<br />
<br />
Create /etc/resolv.conf with the appropriate details.<br />
<br />
If all goes well you now have a working setup :)</div>83.67.115.198http://www.linux-vserver.org/Installation_on_CentOSInstallation on CentOS2008-04-25T08:37:02Z<p>83.67.115.198: /* Install a guest */</p>
<hr />
<div>== Install CentOS 5 ==<br />
<br />
My CentOS 5 installation is a DVD install with only the "Desktop - GNOME" group selected.<br />
<br />
On restart, a number of questions (timezone/security level/etc) are asked. At this stage set the "SELinux" option to disabled. If you skip this step, then simply modify the /etc/sysconfig/selinux file and disable selinux from there. You will need to reboot before this takes effect, but its okay to wait until you have installed the kernel before doing this (just to save some time :)<br />
<br />
== Add the repository ==<br />
<br />
In order to install the necessary packages, you will have to add the repository containing them to your yum configuration. Paste the following in /etc/yum.repos.d/dhozac-vserver.repo<br />
[dhozac-vserver]<br />
name=Linux-VServer related packages for CentOS $releasever - $basearch<br />
baseurl=http://rpm.hozac.com/dhozac/centos/$releasever/vserver/$basearch<br />
gpgkey=http://rpm.hozac.com/conf/keys/RPM-DHOZAC-GPG-KEY<br />
<br />
== Update yum ==<br />
<br />
Before you do anything else, update yum. If you don't, you'll have to sit through lots of "you're using a knackered version of yum. Wait 5 seconds" messages.<br />
yum update yum<br />
Which should pick the version from the dhozac repository.<br />
<br />
== Install the kernel ==<br />
<br />
To install the kernel, run<br />
yum install kernel<br />
<br />
Double check the grub file to make sure it is the bootable kernel (/boot/grub/grub.conf). If all is okay we are ready to restart the server.<br />
<br />
At this stage (before the reboot) I also modify the hosts sshd config file, so it doesn't listen to every interface on the server, which would block any guest's attempt to run sshd.<br />
<br />
vi /etc/ssh/sshd_config<br />
<br />
and add the line "ListenAddress 192.168.0.1"<br />
<br />
== Install util-vserver ==<br />
<br />
To install util-vserver, run<br />
yum install util-vserver{,-core,-lib,-sysv,-build}<br />
<br />
== Post installation steps ==<br />
<br />
Make certain /proc entries visible<br />
<br />
/etc/init.d/vprocunhide start<br />
<br />
== Install a guest ==<br />
<br />
As root, try the following to test your installation (this example installs a CentOS 5 guest)<br />
<br />
vserver testing01 build -m yum --context 4040 --hostname=test01.test.loc \<br />
--interface eth0:192.168.101.101/255.255.0.0 -- -d centos5<br />
<br />
yum will install the minimal packages now. If you see something like<br />
<br />
/usr/lib/util-vserver/distributions/centos5/initpost: line 105: 3587 Killed<br />
$_VSERVER "$vserver" exec bash -c ': >/tmp/startwait' >&/dev/null<br />
<br />
Don't worry, it's okay.<br />
<br />
At this point you should be able to start and enter your vserver install. To start the guest do,<br />
<br />
vserver testing01 start<br />
<br />
And to enter the guest, do <br />
<br />
vserver testing01 enter<br />
<br />
To get back to the host, just exit the shell.<br />
<br />
If you want to manage the packages inside the guest, you will have to install some package management programs as well as internalize the RPM database. This can be achieved by<br />
vyum testing01 -- install yum<br />
vserver testing01 pkgmgmt internalize<br />
<br />
Depending on your host distribution, you may also need to do<br />
vserver testing01 exec bash -c "rm -f /var/lib/rpm/__db*; rpm --rebuilddb"<br />
You'll know it's required if a simple ''rpm -qa'' inside the guest complains about a database version mismatch.<br />
<br />
Optionally, the following may be run to increase the functionality of the guest:<br />
vyum testing01 -- install yum vim-common vim-minimal vim-enhanced openssh-server openssh \<br />
gcc gcc-c++ kernel-devel bison openssl-devel libtermcap-devel ncurses-devel doxygen \<br />
curl-devel newt-devel mlocate lynx tar wget nmap bzip2 speex speex-devel unixODBC \<br />
unixODBC-devel libtool-ltdl libtool-ltdl-devel mysql-connector-odbc mysql mysql-devel<br />
mkdir /etc/vservers/testing01/apps/vunify<br />
vserver testing01 hashify<br />
<br />
Enter the guest and run:<br />
pwconv<br />
which splits /etc/passwd into /etc/passwd and /etc/shadow.<br />
<br />
Then remove any lines which contain 'pam_loginuid.so' from /etc/pam.d/sshd, /etc/pam.d/login and /etc/pam.d/remote.<br />
<br />
Edit /etc/ssh/sshd_config and change the line '#ListenAddress 0.0.0.0' to 'ListenAddress w.x.y.z' (where w.x.y.z is the IP allocated to the guest)<br />
<br />
Create /etc/resolv.conf with the appropriate details.<br />
<br />
If all goes well you now have a working setup :)</div>83.67.115.198http://www.linux-vserver.org/Installation_on_CentOSInstallation on CentOS2008-04-25T08:35:15Z<p>83.67.115.198: \* Update yum *\</p>
<hr />
<div>== Install CentOS 5 ==<br />
<br />
My CentOS 5 installation is a DVD install with only the "Desktop - GNOME" group selected.<br />
<br />
On restart, a number of questions (timezone/security level/etc) are asked. At this stage set the "SELinux" option to disabled. If you skip this step, then simply modify the /etc/sysconfig/selinux file and disable selinux from there. You will need to reboot before this takes effect, but its okay to wait until you have installed the kernel before doing this (just to save some time :)<br />
<br />
== Add the repository ==<br />
<br />
In order to install the necessary packages, you will have to add the repository containing them to your yum configuration. Paste the following in /etc/yum.repos.d/dhozac-vserver.repo<br />
[dhozac-vserver]<br />
name=Linux-VServer related packages for CentOS $releasever - $basearch<br />
baseurl=http://rpm.hozac.com/dhozac/centos/$releasever/vserver/$basearch<br />
gpgkey=http://rpm.hozac.com/conf/keys/RPM-DHOZAC-GPG-KEY<br />
<br />
== Update yum ==<br />
<br />
Before you do anything else, update yum. If you don't, you'll have to sit through lots of "you're using a knackered version of yum. Wait 5 seconds" messages.<br />
yum update yum<br />
Which should pick the version from the dhozac repository.<br />
<br />
== Install the kernel ==<br />
<br />
To install the kernel, run<br />
yum install kernel<br />
<br />
Double check the grub file to make sure it is the bootable kernel (/boot/grub/grub.conf). If all is okay we are ready to restart the server.<br />
<br />
At this stage (before the reboot) I also modify the hosts sshd config file, so it doesn't listen to every interface on the server, which would block any guest's attempt to run sshd.<br />
<br />
vi /etc/ssh/sshd_config<br />
<br />
and add the line "ListenAddress 192.168.0.1"<br />
<br />
== Install util-vserver ==<br />
<br />
To install util-vserver, run<br />
yum install util-vserver{,-core,-lib,-sysv,-build}<br />
<br />
== Post installation steps ==<br />
<br />
Make certain /proc entries visible<br />
<br />
/etc/init.d/vprocunhide start<br />
<br />
== Install a guest ==<br />
<br />
As root, try the following to test your installation (this example installs a CentOS 5 guest)<br />
<br />
vserver testing01 build -m yum --context 4040 --hostname=test01.test.loc \<br />
--interface eth0:192.168.101.101/255.255.0.0 -- -d centos5<br />
<br />
yum will install the minimal packages now. If you see something like<br />
<br />
/usr/lib/util-vserver/distributions/centos5/initpost: line 105: 3587 Killed<br />
$_VSERVER "$vserver" exec bash -c ': >/tmp/startwait' >&/dev/null<br />
<br />
Don't worry, it's okay.<br />
<br />
At this point you should be able to start and enter your vserver install. To start the guest do,<br />
<br />
vserver testing01 start<br />
<br />
And to enter the guest, do <br />
<br />
vserver testing01 enter<br />
<br />
To get back to the host, just exit the shell.<br />
<br />
If you want to manage the packages inside the guest, you will have to install some package management programs as well as internalize the RPM database. This can be achieved by<br />
vyum testing01 -- install yum<br />
vserver testing01 pkgmgmt internalize<br />
<br />
Depending on your host distribution, you may also need to do<br />
vserver testing01 exec bash -c "rm -f /var/lib/rpm/__db*; rpm --rebuilddb"<br />
You'll know it's required if a simple ''rpm -qa'' inside the guest complains about a database version mismatch.<br />
<br />
Optionally, the following may be run to increase the functionality of the guest:<br />
vyum testing01 -- install yum vim-common vim-minimal vim-enhanced openssh-server openssh \<br />
gcc gcc-c++ kernel-devel bison openssl-devel libtermcap-devel ncurses-devel doxygen \<br />
curl-devel newt-devel mlocate lynx tar wget nmap bzip2 speex speex-devel unixODBC \<br />
unixODBC-devel libtool-ltdl libtool-ltdl-devel mysql-connector-odbc mysql mysql-devel<br />
mkdir /etc/vservers/testing01/apps/vunify<br />
vserver testing01 hashify<br />
<br />
Enter the guest and run:<br />
pwconv<br />
which splits /etc/passwd into /etc/passwd and /etc/shadow.<br />
<br />
Then remove any lines which contain 'pam_loginuid.so' from /etc/pam.d/sshd, /etc/pam.d/login and /etc/pam.d/remote.<br />
<br />
Edit /etc/ssh/sshd_config and change the line '#ListenAddress 0.0.0.0' to 'ListenAddress w.x.y.z' (where w.x.y.z is the IP allocated to the guest)<br />
<br />
If all goes well you now have a working setup :)</div>83.67.115.198http://www.linux-vserver.org/Installation_on_CentOSInstallation on CentOS2008-04-25T08:32:56Z<p>83.67.115.198: /* Install a guest */</p>
<hr />
<div>== Install CentOS 5 ==<br />
<br />
My CentOS 5 installation is a DVD install with only the "Desktop - GNOME" group selected.<br />
<br />
On restart, a number of questions (timezone/security level/etc) are asked. At this stage set the "SELinux" option to disabled. If you skip this step, then simply modify the /etc/sysconfig/selinux file and disable selinux from there. You will need to reboot before this takes effect, but its okay to wait until you have installed the kernel before doing this (just to save some time :)<br />
<br />
== Add the repository ==<br />
<br />
In order to install the necessary packages, you will have to add the repository containing them to your yum configuration. Paste the following in /etc/yum.repos.d/dhozac-vserver.repo<br />
[dhozac-vserver]<br />
name=Linux-VServer related packages for CentOS $releasever - $basearch<br />
baseurl=http://rpm.hozac.com/dhozac/centos/$releasever/vserver/$basearch<br />
gpgkey=http://rpm.hozac.com/conf/keys/RPM-DHOZAC-GPG-KEY<br />
<br />
== Install the kernel ==<br />
<br />
To install the kernel, run<br />
yum install kernel<br />
<br />
Double check the grub file to make sure it is the bootable kernel (/boot/grub/grub.conf). If all is okay we are ready to restart the server.<br />
<br />
At this stage (before the reboot) I also modify the hosts sshd config file, so it doesn't listen to every interface on the server, which would block any guest's attempt to run sshd.<br />
<br />
vi /etc/ssh/sshd_config<br />
<br />
and add the line "ListenAddress 192.168.0.1"<br />
<br />
== Install util-vserver ==<br />
<br />
To install util-vserver, run<br />
yum install util-vserver{,-core,-lib,-sysv,-build}<br />
<br />
== Post installation steps ==<br />
<br />
Make certain /proc entries visible<br />
<br />
/etc/init.d/vprocunhide start<br />
<br />
== Install a guest ==<br />
<br />
As root, try the following to test your installation (this example installs a CentOS 5 guest)<br />
<br />
vserver testing01 build -m yum --context 4040 --hostname=test01.test.loc \<br />
--interface eth0:192.168.101.101/255.255.0.0 -- -d centos5<br />
<br />
yum will install the minimal packages now. If you see something like<br />
<br />
/usr/lib/util-vserver/distributions/centos5/initpost: line 105: 3587 Killed<br />
$_VSERVER "$vserver" exec bash -c ': >/tmp/startwait' >&/dev/null<br />
<br />
Don't worry, it's okay.<br />
<br />
At this point you should be able to start and enter your vserver install. To start the guest do,<br />
<br />
vserver testing01 start<br />
<br />
And to enter the guest, do <br />
<br />
vserver testing01 enter<br />
<br />
To get back to the host, just exit the shell.<br />
<br />
If you want to manage the packages inside the guest, you will have to install some package management programs as well as internalize the RPM database. This can be achieved by<br />
vyum testing01 -- install yum<br />
vserver testing01 pkgmgmt internalize<br />
<br />
Depending on your host distribution, you may also need to do<br />
vserver testing01 exec bash -c "rm -f /var/lib/rpm/__db*; rpm --rebuilddb"<br />
You'll know it's required if a simple ''rpm -qa'' inside the guest complains about a database version mismatch.<br />
<br />
Optionally, the following may be run to increase the functionality of the guest:<br />
vyum testing01 -- install yum vim-common vim-minimal vim-enhanced openssh-server openssh \<br />
gcc gcc-c++ kernel-devel bison openssl-devel libtermcap-devel ncurses-devel doxygen \<br />
curl-devel newt-devel mlocate lynx tar wget nmap bzip2 speex speex-devel unixODBC \<br />
unixODBC-devel libtool-ltdl libtool-ltdl-devel mysql-connector-odbc mysql mysql-devel<br />
mkdir /etc/vservers/testing01/apps/vunify<br />
vserver testing01 hashify<br />
<br />
Enter the guest and run:<br />
pwconv<br />
which splits /etc/passwd into /etc/passwd and /etc/shadow.<br />
<br />
Then remove any lines which contain 'pam_loginuid.so' from /etc/pam.d/sshd, /etc/pam.d/login and /etc/pam.d/remote.<br />
<br />
Edit /etc/ssh/sshd_config and change the line '#ListenAddress 0.0.0.0' to 'ListenAddress w.x.y.z' (where w.x.y.z is the IP allocated to the guest)<br />
<br />
If all goes well you now have a working setup :)</div>83.67.115.198