Editing
CentOS HowTo
(section)
From Linix VServer
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== D. VServer creation == * '''Build a new minimal vserver''' First, let's create a minimal install of CentOS. We set this up earlier by putting the rpm packages to pkgs/01 EDIT 03.05.2006: With CentOS[[CentOS?action=edit|?]] 4.3 do not update yum, it will not work. If already updated, install original yum with --force <pre class="code">vserver min-centos4 build -m yum --hostname domain.com --interface domain=eth0:192.168.0.136/24 --initstyle sysv \ --context 500 --force -- -d centos4</pre> This should take some time to install depending on your Internet connection. The /etc/resolv.conf file is not created. Manually create it, putting in your DNS servers or copy it from your host: <pre class="code">cp /etc/resolv.conf /vservers/min-centos4/etc/</pre> If you would like to be able to update the rpm packages (yum, etc.) from within the vserver copy in the rpm database and associated files: <pre class="code">cp /vservers/.pkg/min-centos4/rpm/state/* /vservers/min-centos4/.rpmdb/</pre> Next remove the network script before you try and start it: <pre class="code">rm -f /vservers/min-centos4/etc/rc[06].d/K90network</pre> Fix usual /proc permisions: <pre class="code">/path/to/util-vserver-0.30.208/scripts/vprocunhide</pre> Once it is created, you can start it: <pre class="code">vserver min-centos4 start</pre> (Note that sometimes the 'minilogd' process causes the above command to fail. If this is the case, use: <pre class="code">chcontext --xid 500 ps aux</pre> to identify the process, and then: <pre class="code">vkill -c 500 (pid)</pre> to kill the process, replacing (pid) by the pid of the minilogd process.) Then you can enter it: <pre class="code">vserver min-centos4 enter</pre> Next, update it with the latest patches: <pre class="code">yum update</pre> Next, clean up the startup & shutdown scripts: <pre class="code">chkconfig gpm off chkconfig pcmcia off chkconfig smartd off chkconfig haldaemon off chkconfig nfslock off chkconfig network off chkconfig portmap off chkconfig bluetooth off chkconfig rpcidmapd off chkconfig iptables off chkconfig anacron off rm -f /etc/rc[06].d/S01* exit</pre> Setup the vserver to start and stop automatically on reboot: <pre class="code">cd /etc/init.d/ mv vservers-default vservers chkconfig --add vservers chkconfig vservers on echo "default" > /etc/vservers/min-centos4/apps/init/mark</pre> You can now test that it starts and stops with: <pre class="code">service vservers start vserver-stat service vservers stop vserver-stat</pre> </div> <div id="footer"> <div class="copyleft"> <br /> Permission is granted to copy, distribute and/or modify this document under the terms of the<br /> [http://www.fsf.org/licenses/fdl.txt GNU Free Documentation License], Version 1.2 or any later version published by the Free Software Foundation. </div> ----- <div id="toolbar-bottom"> [[CentOS_HowTo?action=edit|Edit this document]] | [[CentOS_HowTo?action=history|View document history]]<br /> </div> Document last modified Thu, 08 Jun 2006 05:32:58<br /> <div class="form"> <br /> Search: </div> </div>
Summary:
Please note that all contributions to Linix VServer may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Linix VServer:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Page actions
Page
Discussion
Read
Edit
History
Page actions
Page
Discussion
More
Tools
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
About
Overview
Paper
News
Developers
Donations
Search
Getting Started
Downloads
FAQs
Documentation
Support
Participate
How to participate
Report a Bug
Communicate
Teams/Projects
Hall of Fame
Resources
Archives
Recent Wiki Changes
Pastebin
Related Projects
VServer Hosting
Happy VServer Users
Tools
What links here
Related changes
Special pages
Page information