Editing
Installation on Gentoo
(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!
== Maintenance made easy == === Start guests on boot === You can start certain guests during boot. Each guest can be assigned a MARK. Now everything you have to do is configure these MARKs in the guests configuration and tell the init script to run all MARKed guests. <pre> (Do this for every guest you want to start) # mkdir -p /etc/vservers/myguest/apps/init # echo "default" > /etc/vservers/myguest/apps/init/mark </pre> '''Note''': Since all guests marked with "default" are started by default, nothing more has to be done. If you have different marks you should also update /etc/conf.d/vservers. === Keep portage in sync === The script vesync will help you to keep the metadata cache and overlays in sync. vemerge is a simple wrapper for emerge in guests. <pre> (Sync metadata for 'myguest') # vesync myguest (Sync metadata for all guests) # vesync -a (Sync metadata for all guests except 'myguest') # vesync -a -e myguest (Sync 'myoverlay' for all guests) # vesync -a \ --overlay /usr/local/overlays/myoverlay \ --overlay-host rsync://rsync.myhost.com/myoverlay \ --overlay-only (emerge app-editors/vim in 'myguest') # vemerge myguest -- app-editors/vim -va </pre> === Update guests === Gentoo guests can share packages to save compilation time. In order to use shared packages, you have to create a central directory for packages on the host. We will use /var/cache/vpackages on the host and mount it to /usr/portage/packages in every guest. <pre> # mkdir -p /var/cache/vpackages # $EDITOR /etc/vservers/myguest/fstab (Add this line at the end) /var/cache/vpackages /usr/portage/packages none bind,rw 0 0 </pre> Now you can use vupdateworld to update every guest. The command is equivalent to something like emerge --deep --update --newuse world depending on command line options. <pre> (Pretend update for 'myguest') # vupdateworld -p myguest (Update 'myguest' using binary packages) # vupdateworld -k myguest (Update all guests using binary packages) # vupdateworld -ka </pre> '''Note''': In order to get binary packages you can either use PORTAGE_BINHOST (see man make.conf) or set FEATURES="buildpkg" in one or more guests. After a successful update you can easily update all configuration files with vdispatch-conf. It is a simple wrapper for dispatch-conf and behaves exactly the same. <pre> (Update configuration files for 'myguest') # vdispatch-conf myguest (Update configuration files for all guests) # vdispatch-conf -a </pre> === Bash scripts === These scripts will hopefully help some of you out with some basic tasks. Review each script carefully, so you know what it is doing. The scripts here were outdated and the original contributor removed them.
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