<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.openvz.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=SHaggY+caT</id>
	<title>OpenVZ Virtuozzo Containers Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.openvz.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=SHaggY+caT"/>
	<link rel="alternate" type="text/html" href="https://wiki.openvz.org/Special:Contributions/SHaggY_caT"/>
	<updated>2026-06-13T17:47:37Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.1</generator>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Application_Templates&amp;diff=8278</id>
		<title>Application Templates</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Application_Templates&amp;diff=8278"/>
		<updated>2010-03-02T21:05:42Z</updated>

		<summary type="html">&lt;p&gt;SHaggY caT: /* Step 3: Package the Software */ Fix broken command&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Abstract===&lt;br /&gt;
Application Templates (AT's) are commonly found when using Virtualization as a means to try out new software without having to perform a full manual install. Unfortunately, OpenVZ, as of yet, doesn't have any precreated AT's for people to try out, which might be attributed to the lack of documentation on how to create them. The primary goal of this howto is to give an overview of how an AT can be created for OpenVZ without too much trouble. This howto assumes the user is familiar with basic OpenVZ terminology and operation, so basic tasks such as setting VE memory, networking parameters, package repositories, etc are not covered here.&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
There are two ways to create an AT: as a full VE template, or an interactive shell script/installer that installs the software into an existing VE. The second method is more advanced, and will be very specific to the individual applications, so is out of the scope of this document.&lt;br /&gt;
&lt;br /&gt;
===Step 1: The Base===&lt;br /&gt;
Choose the base OS you'd like to use and find an existing VE template to use (or create your [{{fullurl:Category:Templates}} own]). For this document, I'm using the [http://download.openvz.org/template/precreated/contrib/centos-5-x86_64-default-5.2-20081107.tar.gz CentOS 5 x86_64] template and will be installing Ruby-on-Rails.&lt;br /&gt;
====Creating the bare VE====&lt;br /&gt;
&amp;lt;pre&amp;gt;vzctl create 3000 --ostemplate centos-5-x86_64-default-5.2-20081107 --hostname RoR-AT &lt;br /&gt;
vzctl set 3000 --userpasswd root:&amp;lt;whatever&amp;gt; --save&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Step 2: Software Installation===&lt;br /&gt;
This is the part where you'll follow the application specific installation procedures. Make sure that you install all the dependancies and do a proper configuration so that the application is usable.&lt;br /&gt;
In regards to Ruby-on-Rails, I found a good guide on installing RoR on CentOS [http://wiki.rubyonrails.org/rails/pages/RailsOnCentos here].&lt;br /&gt;
&lt;br /&gt;
===Step 3: Package the Software===&lt;br /&gt;
Once you have everything installed and configured, packaging is a simple procedure:&lt;br /&gt;
*Remove any unecessary files (e.g. /tmp /var/tmp /usr/src/, any downloaded files, etc)&lt;br /&gt;
*Stop the VE&lt;br /&gt;
:&amp;lt;pre&amp;gt;vzctl stop 3000&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Create a tar.gz of the /vz/private/$VEID directory&lt;br /&gt;
:&amp;lt;pre&amp;gt;tar cfvz /vz/template/cache/centos-5-x86_64-RoR-AT-11152008.tar.gz ./ &amp;lt;/pre&amp;gt;&lt;br /&gt;
*Done&lt;br /&gt;
&lt;br /&gt;
===Step 4: Deployment/Distribution===&lt;br /&gt;
To do rapid deployment of your new AT, you can utilize for/while loops to create multiple VE's as shown [[Demo scripts | here]].&lt;br /&gt;
&lt;br /&gt;
As for distribution, please share any of the AT's you create [http://download.openvz.org/template/precreated/contrib/ here]&lt;br /&gt;
&lt;br /&gt;
[[Category:HOWTO]]&lt;br /&gt;
[[Category:Templates]]&lt;/div&gt;</summary>
		<author><name>SHaggY caT</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Install_vzpkg2_and_pkg-cacher&amp;diff=7154</id>
		<title>Install vzpkg2 and pkg-cacher</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Install_vzpkg2_and_pkg-cacher&amp;diff=7154"/>
		<updated>2009-03-19T13:16:09Z</updated>

		<summary type="html">&lt;p&gt;SHaggY caT: This packege did'nt install by you for dependenses, and, Debian/Ubuntu template cahe did'nt created&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
Robert Nelson has created a couple new utilities to make managing and updating templates and containers easier, vzpkg2 pkg-cacher.  So far they will create and update a large range of containers, including both 32bit and 64bit of the following:&lt;br /&gt;
    &lt;br /&gt;
* Centos 4 and 5,&lt;br /&gt;
* Fedora 7, 8 and 9,&lt;br /&gt;
* Debian Sarge and Etch,&lt;br /&gt;
* Ubuntu Feisty, Gutsy and Hardy.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Pkg-cacher is a transparent caching proxy daemon optimized for Debian and RPM packages.  In other terms, pkg-cacher is a service that runs on a machine that other machines and containers, or &amp;quot;clients&amp;quot;, use to update themselves instead of each of them directly hitting the package repositories.  Pkg-cacher only downloads a file once and then gives that to all its clients, instead of each of the clients downloading the file from the Internet at large.  It is based on [http://www.nick-andrew.net/projects/apt-cacher/ apt-cacher], available with Debian.  This version has been modified to understand RedHat RPM repositories.  It also adds support for the HTTP Range header and deals correctly with files which have the same name but different content on different distributions or in some cases different versions of the same distribution.  &lt;br /&gt;
&lt;br /&gt;
Robert has setup repositories for Fedora, CentOS and Debian.&lt;br /&gt;
&lt;br /&gt;
====Screencast====&lt;br /&gt;
&lt;br /&gt;
Scott Dowdle has recorded a good screencast overview of vzpkg2 and pkg-cacher at:&lt;br /&gt;
&lt;br /&gt;
 http://www.montanalinux.org/vzpkg2-screencast.html&lt;br /&gt;
&lt;br /&gt;
===Installation===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Centos &amp;amp; Fedora installs:====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;u&amp;gt;Remove Old Packages&amp;lt;/u&amp;gt;=====&lt;br /&gt;
If this is an '''existing''' install, uninstall your vzpkg and vztmpl-* packages:&lt;br /&gt;
&lt;br /&gt;
 yum remove vzpkg vztmpl-*&lt;br /&gt;
&lt;br /&gt;
and backup &amp;amp; remove your current template directory:&lt;br /&gt;
&lt;br /&gt;
 tar cjf /some/backup/location/old_templates.tbz /vz/template&lt;br /&gt;
 rm -r /vz/template&lt;br /&gt;
&lt;br /&gt;
If this is a '''new''' install, you should probably review the [http://download.openvz.org/doc/OpenVZ-Users-Guide.pdf OpenVZ User's Guide] and the wiki's [[Quick installation]] page.  The only way you would vary your installation setups is declining to install the default vzpkg package, and instead using vzpkg2 here.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;u&amp;gt;Download the repository file for your OS&amp;lt;/u&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
For CentOS:&lt;br /&gt;
    wget http://repo.opensource-sw.net/centos/ossw.repo -P /etc/yum.repos.d&lt;br /&gt;
&lt;br /&gt;
For Fedora:&lt;br /&gt;
    wget http://repo.opensource-sw.net/fedora/ossw.repo -P /etc/yum.repos.d&lt;br /&gt;
&lt;br /&gt;
You may wish to edit the repository file, perhaps to add a priorities setting.  &lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;u&amp;gt;Install vzpkg2 and pkg-cacher&amp;lt;/u&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
Once the repository is added in /etc/yum.repos.d, you can now install the new vzpkg2 and pkg-cacher from it:&lt;br /&gt;
&lt;br /&gt;
 yum install vzpkg2 vztmpl2-centos vztmpl2-fedora vztmpl2-debian vztmpl2-ubuntu&lt;br /&gt;
 yum install pkg-cacher-sa debootstrap&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;u&amp;gt;Configure vzpkg2&amp;lt;/u&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
Open /etc/vz/vzpkg.conf in an editor.  Replace 'hostname' with the hostname or IP of the machine you are installing this on for VZPKG_CACHE_HOST, make sure not to use 'localhost', because this name is what OpenVZ Containers will use to access the pkg-cacher daemon:&lt;br /&gt;
&lt;br /&gt;
 VZPKG_CACHE_HOST=hostname:3142&lt;br /&gt;
&lt;br /&gt;
While you are here, review this file to ensure it makes sense for your setup.  In particular, you will probably have to update the VZPKG_DNS line with IP addresses of DNS servers you use.&lt;br /&gt;
&lt;br /&gt;
 VZPKG_DNS=192.168.1.2,192.168.1.3&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;u&amp;gt;Configure pkg-cacher&amp;lt;/u&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
Edit /etc/pkg-cacher/pkg-cacher.conf.  You should read the included documentation in the file to ensure it is appropriate for your setup.  Mostly the defaults will work just fine.  By default pkg-cacher will let any system use its cache.  You will probably want to limit it to your own systems on the line:&lt;br /&gt;
&lt;br /&gt;
 allowed_hosts=*&lt;br /&gt;
&lt;br /&gt;
Once you have checked and updated pkg-cacher.conf, simply restart it by running as root:&lt;br /&gt;
&lt;br /&gt;
 service pkg-cacher restart&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;u&amp;gt;Generate the new template cache&amp;lt;/u&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
Now everything should be ready to go!  Make sure both the 'vz' service and 'pkg-cacher' service are running.&lt;br /&gt;
&lt;br /&gt;
To build an individual OS Template just run the 'vzpkgcache' command and pass it the name of the OS Template you want to build.  For a list of OS Templates you can build, run the 'vzpkgls' command.  Example:&lt;br /&gt;
&lt;br /&gt;
 vzpkgcache centos-5-i386-default&lt;br /&gt;
&lt;br /&gt;
If you'd like to build all OS Templates available, just run the 'vzpkgcache' command without any parameters.  Example:&lt;br /&gt;
&lt;br /&gt;
  vzpkgcache&lt;br /&gt;
&lt;br /&gt;
vzpkg2 should get to work generating your initial caches.  Now you can run 'vzctl create' and use them.&lt;br /&gt;
&lt;br /&gt;
====Debian Installs:====&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;u&amp;gt;Remove Old Packages&amp;lt;/u&amp;gt;=====&lt;br /&gt;
If this is an '''existing''' install, uninstall your vzpkg and vztmpl-* packages:&lt;br /&gt;
&lt;br /&gt;
 apt-get erase vzpkg vzctl-ostmpl-*&lt;br /&gt;
&lt;br /&gt;
and backup &amp;amp; remove your current template directory:&lt;br /&gt;
&lt;br /&gt;
 tar cjf /some/backup/location/old_templates.tbz /vz/template&lt;br /&gt;
 rm -r /vz/template&lt;br /&gt;
&lt;br /&gt;
If this is a '''new''' install, you should probably review the [http://download.openvz.org/doc/OpenVZ-Users-Guide.pdf OpenVZ User's Guide] and the wiki's [[Installation on Debian]] page.  The only way you would vary your installation setups is declining to install the default vzpkg package, and instead using vzpkg2 here.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;u&amp;gt;Add the deb repositories to your /etc/apt/sources.list:&amp;lt;/u&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
Add the following lines to your /etc/apt/sources.list:&lt;br /&gt;
&lt;br /&gt;
Etch:&lt;br /&gt;
    deb http://repo.opensource-sw.net/debian/ etch openvz&lt;br /&gt;
    deb-src http://repo.opensource-sw.net/debian/ etch openvz&lt;br /&gt;
&lt;br /&gt;
Sarge:&lt;br /&gt;
    deb http://repo.opensource-sw.net/debian/ sarge openvz&lt;br /&gt;
    deb-src http://repo.opensource-sw.net/debian/ sarge openvz&lt;br /&gt;
&lt;br /&gt;
Then do:&lt;br /&gt;
    apt-get update&lt;br /&gt;
    apt-get install pkg-cacher-sa vzpkg2&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;u&amp;gt;Adding New Templates:&amp;lt;/u&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
Install the desired OS Template Metadata packages:&lt;br /&gt;
&lt;br /&gt;
    apt-get install vztmpl2-centos vztmpl2-fedora vztmpl2-ubuntu vztmpl2-debian&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;u&amp;gt;Configure vzpkg2&amp;lt;/u&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
Open /etc/vz/vzpkg.conf in an editor.  Replace 'hostname' with the hostname or IP of the machine you are installing this on for VZPKG_CACHE_HOST, make sure not to use 'localhost', because this name is what OpenVZ Containers will use to access the pkg-cacher daemon:&lt;br /&gt;
&lt;br /&gt;
 VZPKG_CACHE_HOST=hostname:3142&lt;br /&gt;
&lt;br /&gt;
While you are here, review this file to ensure it makes sense for your setup.  In particular, you will probably have to update the VZPKG_DNS line with IP addresses of DNS servers you use.&lt;br /&gt;
&lt;br /&gt;
 VZPKG_DNS=192.168.1.2,192.168.1.3&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;u&amp;gt;Configure pkg-cacher&amp;lt;/u&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
Edit /etc/pkg-cacher/pkg-cacher.conf.  You should read the included documentation in the file to ensure it is appropriate for your setup.  Mostly the defaults will work just fine.  By default pkg-cacher will let any system use its cache.  You will probably want to limit it to your own systems on the line:&lt;br /&gt;
&lt;br /&gt;
 allowed_hosts=*&lt;br /&gt;
&lt;br /&gt;
Once you have checked and updated pkg-cacher.conf, simply restart it.&lt;br /&gt;
&lt;br /&gt;
=====&amp;lt;u&amp;gt;Generate the new template cache&amp;lt;/u&amp;gt;=====&lt;br /&gt;
&lt;br /&gt;
Now everything should be ready to go!  Make sure both the 'vz' service and 'pkg-cacher' service are running&lt;br /&gt;
&lt;br /&gt;
To get a list of what OS Templates you may now use, type the following:&lt;br /&gt;
&lt;br /&gt;
 vzpkgls&lt;br /&gt;
&lt;br /&gt;
That will produce a list of available OS Templates.  Use any name given in the list as a parameter to vzpkgcache to build that OS Template.  Example:&lt;br /&gt;
&lt;br /&gt;
 vzpkgcache centos-5-i386-default&lt;br /&gt;
&lt;br /&gt;
If you want to build all OS Templates you can simply run vzpkgcache without any paramters:&lt;br /&gt;
&lt;br /&gt;
 vzpkgcache&lt;br /&gt;
&lt;br /&gt;
vzpkg2 should get to work generating your initial caches.  Now you can run 'vzctl create' and use them.&lt;br /&gt;
&lt;br /&gt;
===Source===&lt;br /&gt;
&lt;br /&gt;
The source for the new vzpkg2 and templates is available on http://git.opensource-sw.net.  In order to clone the updated source use the command:&lt;br /&gt;
 git clone http://git.opensource-sw.net/git/vzpkg  &lt;br /&gt;
&lt;br /&gt;
The templates are available using:&lt;br /&gt;
 git clone http://git.opensource-sw.net/git/vztmpl&lt;/div&gt;</summary>
		<author><name>SHaggY caT</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Package_managers&amp;diff=6535</id>
		<title>Package managers</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Package_managers&amp;diff=6535"/>
		<updated>2008-10-18T11:07:06Z</updated>

		<summary type="html">&lt;p&gt;SHaggY caT: /* Commands */ name &amp;quot;Mandrike&amp;quot; RIP,  now uses &amp;quot;Mandriva&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;With OpenVZ, you can run many different Linux distributions on a single box. One particular thing in which distributions differ is package management. This article summarizes how to perform various common package management tasks on a different distributions.&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! align=&amp;quot;center&amp;quot; | Action&lt;br /&gt;
! RPM&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;RHEL, Fedora, CentOS, Mandriva, SUSE, ...&amp;lt;/small&amp;gt;&lt;br /&gt;
! DEB&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;Debian, Ubuntu&amp;lt;/small&amp;gt;&lt;br /&gt;
! Ebuild&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;Gentoo, Sabayon&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot; align=&amp;quot;center&amp;quot; | &amp;lt;big&amp;gt;'''Basic queries'''&amp;lt;/big&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! List of all installed packages&lt;br /&gt;
|| &amp;lt;code&amp;gt;rpm -qa&amp;lt;/code&amp;gt;&lt;br /&gt;
|| &amp;lt;code&amp;gt;dpkg -l&amp;lt;/code&amp;gt;&lt;br /&gt;
|| &amp;lt;code&amp;gt;equery list&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! List of installing packages matching ''substr''&lt;br /&gt;
|| &amp;lt;code&amp;gt;rpm -qa ''\*substr\*''&amp;lt;/code&amp;gt;&lt;br /&gt;
|| &amp;lt;code&amp;gt;dpkg -l ''\*substr\*''&amp;lt;/code&amp;gt;&lt;br /&gt;
|| &amp;lt;code&amp;gt;equery list ''substr''&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! Basic information about an installed ''package''&lt;br /&gt;
|| &amp;lt;code&amp;gt;rpm -qi ''package''&amp;lt;/code&amp;gt;&lt;br /&gt;
|| &amp;lt;code&amp;gt;dpkg -p ''package''&amp;lt;/code&amp;gt;&lt;br /&gt;
|| &amp;lt;code&amp;gt;-???-&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! List of files in a given ''package''&lt;br /&gt;
|| &amp;lt;code&amp;gt;rpm -ql ''package''&amp;lt;/code&amp;gt;&lt;br /&gt;
|| &amp;lt;code&amp;gt;dpkg -L ''package''&amp;lt;/code&amp;gt;&lt;br /&gt;
|| &amp;lt;code&amp;gt;equery files ''package''&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot; align=&amp;quot;center&amp;quot; | &amp;lt;big&amp;gt;'''Advanced queries'''&amp;lt;/big&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! Which package a ''file'' belongs to?&lt;br /&gt;
|| &amp;lt;code&amp;gt;rpm -qf ''file''&amp;lt;/code&amp;gt;&lt;br /&gt;
|| &amp;lt;code&amp;gt;dpkg -S ''file''&amp;lt;/code&amp;gt;&lt;br /&gt;
|| &amp;lt;code&amp;gt;equery belongs ''file''&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! Check the hash (i.e. MD5 etc.) sums of an installed package&lt;br /&gt;
|| &amp;lt;code&amp;gt;rpm -V ''package''&amp;lt;/code&amp;gt;&lt;br /&gt;
|| &amp;lt;code&amp;gt;debsums -ca ''package''&amp;lt;/code&amp;gt;&lt;br /&gt;
|| &amp;lt;code&amp;gt;equery check ''package''&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! Show pre/post install/uninstall scripts from a ''package''&lt;br /&gt;
|| &amp;lt;code&amp;gt;rpm -q --scripts ''package''&amp;lt;/code&amp;gt;&lt;br /&gt;
|| &amp;lt;code&amp;gt;less /var/lib/dpkg/info/''package''.{pre,post,config}*&amp;lt;/code&amp;gt;&lt;br /&gt;
|| &amp;lt;code&amp;gt;-???-&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! Show change log for a ''package''&lt;br /&gt;
|| &amp;lt;code&amp;gt;rpm -q --changelog ''package''&amp;lt;/code&amp;gt;&lt;br /&gt;
|| &amp;lt;code&amp;gt;zcat /usr/share/doc/package/changelog.Debian.gz&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;code&amp;gt;aptitude [-t release] changelog package&amp;lt;/code&amp;gt;&lt;br /&gt;
|| &amp;lt;code&amp;gt;-???-&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot; align=&amp;quot;center&amp;quot; | &amp;lt;big&amp;gt;'''Local package installation/upgrade/removal'''&amp;lt;/big&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! Install a package from local ''package_file''&lt;br /&gt;
|| &amp;lt;code&amp;gt;rpm -ihv ''package_file*.rpm''&amp;lt;br/&amp;gt;yum localinstall ''package_file*.rpm''&amp;lt;ref name=&amp;quot;localinstall&amp;quot;&amp;gt;In case there are unsatisfied dependencies for ''package_file'', yum will try to get and install it from known repositores.&amp;lt;/ref&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|| &amp;lt;code&amp;gt;dpkg -i ''package_file*.deb'' &amp;lt;ref name=&amp;quot;apt&amp;quot;&amp;gt;Usually it is not necessary to download packages manually and install them. Use apt-cache search ''name'' to search for package in configured repositories and apt-get install ''package'' to install package and all it's dependencies&amp;lt;/ref&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|| &amp;lt;code&amp;gt;-???-&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! Upgrade a package from local ''package_file''&lt;br /&gt;
|| &amp;lt;code&amp;gt;rpm -Uhv ''package_file*.rpm''&amp;lt;/code&amp;gt;&lt;br /&gt;
|| &amp;lt;code&amp;gt;dpkg -i ''package_file*.deb'' &amp;lt;ref name=&amp;quot;apt&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|| &amp;lt;code&amp;gt;-???-&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! Remove an installed ''package''&lt;br /&gt;
|| &amp;lt;code&amp;gt;rpm -e ''package''&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;yum remove|erase ''package''&amp;lt;ref name=&amp;quot;yum-remove&amp;quot;&amp;gt;This will also remove any packages which depend on the ''package''&amp;lt;/ref&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|| &amp;lt;code&amp;gt;dpkg -r ''package''&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;dpkg -P ''package''&amp;lt;/code&amp;gt;&lt;br /&gt;
|| &amp;lt;code&amp;gt;emerge --unmerge ''package''&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;emerge --prune ''package''&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot; align=&amp;quot;center&amp;quot; | &amp;lt;big&amp;gt;'''Package installation from repositories'''&amp;lt;/big&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! Install a ''package''&lt;br /&gt;
|| &amp;lt;code&amp;gt;yum install ''package''&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;urpmi ''package''&amp;lt;/code&amp;gt;&lt;br /&gt;
|| &amp;lt;code&amp;gt;apt-get update &amp;amp;&amp;amp; apt-get install ''package''&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;aptitude update &amp;amp;&amp;amp; aptitude install ''package''&amp;lt;/code&amp;gt;&lt;br /&gt;
|| &amp;lt;code&amp;gt;emerge -av ''package''&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! Only download a ''package'' from repository, do not install&lt;br /&gt;
|| First install the yum-downloadonly plugin by running: &amp;lt;br/&amp;gt;&amp;lt;code&amp;gt;yum install yum-downloadonly&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt; And then: &amp;lt;br/&amp;gt; &amp;lt;code&amp;gt;yum install|update ''package'' -y --downloadonly --downloaddir=/opt&amp;lt;/code&amp;gt;&lt;br /&gt;
|| &amp;lt;code&amp;gt;apt-get install --download-only --reinstall ''package''&amp;lt;/code&amp;gt;&amp;lt;ref name=&amp;quot;dpkgdir&amp;quot;&amp;gt;Package will reside in /var/cache/apt/archives.&amp;lt;/ref&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;code&amp;gt;aptitude download ''package''&amp;lt;/code&amp;gt;&lt;br /&gt;
|| &amp;lt;code&amp;gt;emerge -avf ''package''&amp;lt;/code&amp;gt;&amp;lt;ref name=&amp;quot;distfiles&amp;quot;&amp;gt;Package sources will reside in /usr/portage/distfiles.&amp;lt;/ref&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot; align=&amp;quot;center&amp;quot; | &amp;lt;big&amp;gt;'''Get information about package interdependencies'''&amp;lt;/big&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! What a given ''package'' provides?&lt;br /&gt;
|| &amp;lt;code&amp;gt;rpm -q --provides ''package''&amp;lt;/code&amp;gt;&lt;br /&gt;
|| &amp;lt;code&amp;gt;dpkg-query -W -f='${Provides}\n' ''package''&amp;lt;/code&amp;gt;&lt;br /&gt;
|| &amp;lt;code&amp;gt;-???-&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! What a given ''package'' requires?&lt;br /&gt;
|| &amp;lt;code&amp;gt;rpm -q --requires ''package''&amp;lt;/code&amp;gt;&lt;br /&gt;
|| &amp;lt;code&amp;gt;dpkg-query -W -f='${Depends}\n' ''package''&amp;lt;/code&amp;gt;&lt;br /&gt;
|| &amp;lt;code&amp;gt;-???-&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! Which installed package(s) provide a given ''dependency''&amp;lt;ref name=&amp;quot;dep&amp;quot;&amp;gt;In rpm world, a ''dependency'' can be a package name, a file, or a special atom like &amp;lt;code&amp;gt;perl(IO::Zlib)&amp;lt;/code&amp;gt; for a perl module. In deb world, this can be either real or virtual package name.&amp;lt;/ref&amp;gt;?&lt;br /&gt;
|| &amp;lt;code&amp;gt;rpm -q --whatprovides ''dependency''&amp;lt;/code&amp;gt;&lt;br /&gt;
|| &amp;lt;code&amp;gt;dpkg-query -W -f='${Package}: ${Provides}\n' '*' | grep ': .*package'&amp;lt;/code&amp;gt;&lt;br /&gt;
|| &amp;lt;code&amp;gt;-???-&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! Which installed package(s) require a given ''dependency''&amp;lt;ref name=&amp;quot;dep&amp;quot;/&amp;gt;?&lt;br /&gt;
|| &amp;lt;code&amp;gt;rpm -q --whatrequires ''dependency''&amp;lt;/code&amp;gt;&lt;br /&gt;
|| &amp;lt;code&amp;gt;dpkg-query -W -f='${Package}: ${Depends}\n' '*' | grep ': .*package'&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;aptitude why package&amp;lt;/code&amp;gt;&amp;lt;ref name=&amp;quot;why&amp;quot;&amp;gt;Actualy shows the whole dpendency situation that leads to install this package&amp;lt;/ref&amp;gt;&lt;br /&gt;
|| &amp;lt;code&amp;gt;-???-&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! Show what prevents installation of a package&lt;br /&gt;
|| &amp;lt;code&amp;gt;-???-&amp;lt;/code&amp;gt;&lt;br /&gt;
|| &amp;lt;code&amp;gt;aptitude why-not package&amp;lt;/code&amp;gt;&lt;br /&gt;
|| &amp;lt;code&amp;gt;-???-&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! Get package source files&lt;br /&gt;
|| &amp;lt;code&amp;gt;-???-&amp;lt;/code&amp;gt;&lt;br /&gt;
|| &amp;lt;code&amp;gt;apt-get source ''package''&amp;lt;/code&amp;gt;&lt;br /&gt;
|| &amp;lt;code&amp;gt;-???-&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot; align=&amp;quot;center&amp;quot; | &amp;lt;big&amp;gt;'''Working with package files'''&amp;lt;/big&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! Unpack a package ''file'' to local directory&lt;br /&gt;
|| &amp;lt;code&amp;gt;rpm2cpio ''file.rpm'' | cpio -id&amp;lt;/code&amp;gt;&lt;br /&gt;
|| &amp;lt;code&amp;gt;dpkg -x ''file.deb'' .&amp;lt;/code&amp;gt;&lt;br /&gt;
|| N/A&lt;br /&gt;
|-&lt;br /&gt;
! Check package file integrity (checksums, signatures...)&lt;br /&gt;
|| &amp;lt;code&amp;gt;rpm -K ''file.rpm''&amp;lt;/code&amp;gt;&lt;br /&gt;
|| -???-&lt;br /&gt;
|| N/A&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot; align=&amp;quot;center&amp;quot; | &amp;lt;big&amp;gt;'''Repository queries'''&amp;lt;/big&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! Find a package which &amp;lt;code&amp;gt;/some/file&amp;lt;/code&amp;gt; belongs to&lt;br /&gt;
|| &amp;lt;code&amp;gt;yum provides ''/some/file''&amp;lt;/code&amp;gt;&lt;br /&gt;
|| First run: &amp;lt;br/&amp;gt;&amp;lt;code&amp;gt;apt-file update&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;and then:&amp;lt;br/&amp;gt;&amp;lt;code&amp;gt;apt-file search ''/some/file''&amp;lt;/code&amp;gt;&lt;br /&gt;
|| N/A&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Relevant directories and files ==&lt;br /&gt;
&lt;br /&gt;
=== Red Hat, Fedora, CentOS ===&lt;br /&gt;
&lt;br /&gt;
* yum config: &amp;lt;code&amp;gt;/etc/yum.conf&amp;lt;/code&amp;gt;.&lt;br /&gt;
* yum repos: &amp;lt;code&amp;gt;/etc/yum.repos.d/&amp;lt;/code&amp;gt;.&lt;br /&gt;
* rpm configs and macros: &amp;lt;code&amp;gt;/etc/rpm/&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/usr/lib/rpm/&amp;lt;/code&amp;gt;, &lt;br /&gt;
* rpm DB: &amp;lt;code&amp;gt;/var/lib/rpm/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Debian/Ubuntu ===&lt;br /&gt;
&lt;br /&gt;
* List of repositories and mirror sites: &amp;lt;code&amp;gt;/etc/apt/sources.list&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/etc/apt/sources.list.d/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Gentoo ===&lt;br /&gt;
&lt;br /&gt;
* emerge configs: &amp;lt;code&amp;gt;/etc/make.conf&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/etc/portage/&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Portage tree: &amp;lt;code&amp;gt;/usr/portage&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Notes==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
=== Debian ===&lt;br /&gt;
* [http://www.debian.org/doc/FAQ/ch-pkgtools.en.html Debian FAQ: package management tools]&lt;br /&gt;
* [http://www.debian.org/doc/manuals/apt-howto/ APT HOWTO]&lt;br /&gt;
&lt;br /&gt;
[[Category: HOWTO]]&lt;br /&gt;
[[Category: Templates]]&lt;br /&gt;
[[Category: Debian]]&lt;br /&gt;
[[Category: Ubuntu]]&lt;br /&gt;
[[Category: Gentoo]]&lt;/div&gt;</summary>
		<author><name>SHaggY caT</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=User:SHaggY_caT&amp;diff=6499</id>
		<title>User:SHaggY caT</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=User:SHaggY_caT&amp;diff=6499"/>
		<updated>2008-10-04T07:58:55Z</updated>

		<summary type="html">&lt;p&gt;SHaggY caT: New page: Hi! My Name is Galia, i'm live in Moscow, Russia. I work in one big Internet-company, and, I very intresting virtualization technologies.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi! My Name is Galia, i'm live in Moscow, Russia.&lt;br /&gt;
I work in one big Internet-company, and, I very intresting virtualization technologies.&lt;/div&gt;</summary>
		<author><name>SHaggY caT</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=X_inside_VE&amp;diff=6498</id>
		<title>X inside VE</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=X_inside_VE&amp;diff=6498"/>
		<updated>2008-10-04T07:52:37Z</updated>

		<summary type="html">&lt;p&gt;SHaggY caT: /* See also */ fix link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are several ways to run X applications inside your [[container]].&lt;br /&gt;
&lt;br /&gt;
== X forwarding ==&lt;br /&gt;
&lt;br /&gt;
=== Single application ===&lt;br /&gt;
&lt;br /&gt;
To run an X application inside a [[container]], one need simply to connect to a container with '''ssh -X''':&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
host# ssh -2 -c blowfish -X user@address&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After login to container check that &amp;lt;code&amp;gt;$DISPLAY&amp;lt;/code&amp;gt; variable is set and X11 forwarding is enabled:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ve# echo $DISPLAY&lt;br /&gt;
localhost:10.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In case &amp;lt;code&amp;gt;$DISPLAY&amp;lt;/code&amp;gt; is not set, make sure that X forwarding is enabled in &amp;lt;code&amp;gt;sshd&amp;lt;/code&amp;gt; config inside container. In most Linux distros sshd configuration is stored in &amp;lt;code&amp;gt;/etc/ssh/sshd_config&amp;lt;/code&amp;gt;. You should set parameter &amp;lt;code&amp;gt;X11Forwarding&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;yes&amp;lt;/code&amp;gt;. Also container should contain &amp;lt;code&amp;gt;xauth&amp;lt;/code&amp;gt; package, thus install &amp;lt;code&amp;gt;xauth&amp;lt;/code&amp;gt; if it is missing (in Debian this is part of the xbase-clients package). After that, restart your sshd daemon:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ve# /etc/init.d/sshd restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|Don't forget to reconnect after this}}&lt;br /&gt;
&lt;br /&gt;
Now you can run X applications from your container:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ve# firefox&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Desktop ===&lt;br /&gt;
&lt;br /&gt;
Note : If you want to run complete X window environment (including window manager), you should kill local window manager and run only pure X server. Secondly you should use  '''-Y''' option when invoking ssh. And if you want to run gnome/kde/..., don't forget to increase [[UBC]] limits, 'cause default values are certainly too small for these monsters. ;)&lt;br /&gt;
&lt;br /&gt;
You can run a desktop with ''xinit'' (on the node):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
xinit -e ssh -XCc blowfish user@ip_address &amp;quot;/usr/bin/xfce4-session &amp;amp;&amp;quot; -- :1 &amp;amp; disown&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Substitute the window manager of choice&lt;br /&gt;
* Once xfce has started, you can then close the xterm if you like&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your node will be on Ctrl-Alt-F7&lt;br /&gt;
&lt;br /&gt;
And your VM on Ctrl-Alt-F8&lt;br /&gt;
&lt;br /&gt;
== VNC for X desktop ==&lt;br /&gt;
First, one need to run '''Xvnc''' server inside container. The easiest way for this is to run&lt;br /&gt;
'''vncserver''' script. This scripts starts all the required services&lt;br /&gt;
and small http daemon which provides graphical web access to your desktop (via Java applet).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ve# vncserver -name mydesktop&lt;br /&gt;
New 'mydekstop' desktop is ve:1&lt;br /&gt;
&lt;br /&gt;
Starting applications specified in ~/.vnc/xstartup&lt;br /&gt;
Log file is ~/.vnc/ve:1.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now when your desktop is up and running you can connect to it&lt;br /&gt;
using '''vncviewer''' command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
host# vncviewer &amp;lt;container_IP&amp;gt;:1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the VNC desktop is the same size or larger than your X desktop, you will see scroll bars on the bottom and the side.  This is often inconvenient. You may reduce your VNC desktop to a more reasonable size like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;vncserver -geometry 1000x650&amp;lt;/pre&amp;gt;&lt;br /&gt;
This setting works quite well for a 1024 by 768 X desktop setting.&lt;br /&gt;
&lt;br /&gt;
=== Starting KDE desktop with VNC ===&lt;br /&gt;
To start KDE desktop instead of default twm one replace &amp;lt;code&amp;gt;twm &amp;amp;&amp;lt;/code&amp;gt; line with &amp;lt;code&amp;gt;startkde &amp;amp;&amp;lt;/code&amp;gt; in user's&lt;br /&gt;
&amp;lt;code&amp;gt;~/.vnc/xstartup&amp;lt;/code&amp;gt; file on the container.&lt;br /&gt;
&lt;br /&gt;
=== Connecting with VNC from firewalled network ===&lt;br /&gt;
VNC uses 590x TCP ports for its connections. These ports can be firewalled in&lt;br /&gt;
many networks so in order to be able to connect to remote side one need to tunnel VNC connections somehow.&lt;br /&gt;
A usual '''ssh''' can be used for tunneling VNC connections as described below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
localhost# ssh -L 5900:localhost:5900 &amp;lt;remote host&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;remote host&amp;gt; is the name of the system you want to connect to. When you are asked for a username and password enter your normal username and password. Then start the VNC session to localhost, i.e.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
localhost# vncviewer localhost&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using Xephyr ==&lt;br /&gt;
&lt;br /&gt;
Xephyr gives you nested X windows.&lt;br /&gt;
&lt;br /&gt;
First, install Xephyr on your host.&lt;br /&gt;
&lt;br /&gt;
Start Xephyr&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Xephyr -ac -screen 1280x1024 -br -reset -terminate :1 &amp;amp;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Change your display settings (don't forget to change them back after you establish a connection)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;DISPLAY=:1,0&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Forward your application or desktop over ssh to Xephyr&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;ssh -XfC -c blowfish user@server xfce4-session&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you use an alternate window manager, substitute &amp;quot;startkde&amp;quot;, &amp;quot;gnome-session&amp;quot;, &amp;quot;startfluxbox&amp;quot;, etc. as needed. &lt;br /&gt;
&lt;br /&gt;
[http://cafelinux.org/OptickleArt/albums/userpics/Xephyr.png Screenshot]&lt;br /&gt;
&lt;br /&gt;
== Using XDM with XDMCP ==&lt;br /&gt;
This method will give you a graphical login prompt remotely similar to VNC, but with some differences. Most notably, XDMCP is faster than VNC (due to the way each deals with screen handling) and but you CANNOT connect to existing sessions like you can with VNC. Each time you logout, your programs are closed. XDMCP is better suited in situations where you don't have a local display (or dumb terminals/clients) but want to run X11 programs&lt;br /&gt;
&lt;br /&gt;
=== container Configuration ===&lt;br /&gt;
Install your desktop environment as you'd like (kde/gnome/xfce/etc) and ensure you install at least XDM. You can opt to use GDM/KDM as they also do the same job as XDM. The configuration for KDM/GDM is different than XDM's and I was only able to find one link on configuring GDM (more below).&lt;br /&gt;
&lt;br /&gt;
===== XDM =====&lt;br /&gt;
Configuring XDM requires editing 3 files: /etc/X11/xdm/xdm-config, /etc/X11/xdm/Xservers, /etc/X11/xdm/Xaccess&lt;br /&gt;
&lt;br /&gt;
In xdm-config, comment out the line where it says '''DisplayManager.requestPort:    0'''&lt;br /&gt;
&lt;br /&gt;
In Xservers, comment out the line ''':0 local /usr/bin/X :0 vt7'''' (this starts a local X server, which will fail)&lt;br /&gt;
&lt;br /&gt;
In Xaccess, uncomment the line with ''' *          #any host can get a login window'''&lt;br /&gt;
(Please keep in mind the security implications by the above line. Read the comments found in the file and set it appropriately)&lt;br /&gt;
&lt;br /&gt;
To provide the possibility to run sound applications from container, /dev/dsp device file needs to be exported in container:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vzctl set 221 --devnodes dsp:rw --save&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, if you intend to make xdm invoking a heavy desktop like kde, it is reasonable to increase the amount of memory available for allocation inside  this container:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vzctl set 221 --privvmpages 500M:600M --save&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
For light desktop like icewm this is not needed.&lt;br /&gt;
&lt;br /&gt;
Once these changes have been made, start your xdm server by the appropriate startup script (typically similar to /etc/init.d/xdm start). That concludes the XDM setup in the container.&lt;br /&gt;
&lt;br /&gt;
===== GDM =====&lt;br /&gt;
Edit the '''gdm.conf''' file and in xdmcp section, comment out the 0=standard line under the [servers] section - this will prevent gdm from trying to launch an X server on the local machine - it will simply listen for xdmcp requests. Also, change from VCAllocation=true to VTAllocation=false and comment out the FirstVT=7 line. Change the access restrictions (if any) to suit your needs and then start GDM.&lt;br /&gt;
&lt;br /&gt;
=== Client/Host Configuration ===&lt;br /&gt;
&lt;br /&gt;
On the Client/Host (whatever machine you are connecting from to the container), you need to install ONLY a bare Xserver as per your OS instructions (use yum, emerge, apt, whatever). A desktop environment like XFCE/GNOME/KDE is entirely optional on the client, but keep in mind that it won't be used while you're connecting to the desktop on the container.&lt;br /&gt;
&lt;br /&gt;
To get access to the XDM server, just start an Xserver with '''X -query &amp;lt;remote IP&amp;gt; :0''' (where :0 is the local display...set to :1 if you already have an X session running, or use Xnest)&lt;br /&gt;
&lt;br /&gt;
There are guides online on howto securely tunnel XDMCP over the Internet (typically vpn as XDMCP can't be tunneled over ssh afaik), in an otherwise INSECURE protocol.&lt;br /&gt;
&lt;br /&gt;
=== Errata ===&lt;br /&gt;
On a side note, as of December 2007, I was never able to successfully get an Xserver to run inside a container and have the display output onto virtual-terminal 7 (the Xserver default), However, you can get an Xserver running on the hostnode to display output on virtual-terminal 7 without any special configuration (as the hostnode has direct access to all necessary devices).&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[NX inside VE]]&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* http://forum.openvz.org/index.php?t=tree&amp;amp;th=235&amp;amp;mid=1115&amp;amp;&amp;amp;rev=&amp;amp;reveal=&lt;br /&gt;
* http://ait.web.psi.ch/services/linux/software/local/by_task/desktop_sharing/index.html&lt;br /&gt;
* http://ait.web.psi.ch/services/ssh/vnc-ssh.html&lt;br /&gt;
* http://www.vnc.com/pipermail/vnc-list/2002-July/031831.html&lt;br /&gt;
* http://www.linuxjournal.com/article/5499&lt;br /&gt;
* http://www.realvnc.com/pipermail/vnc-list/2002-March/029502.html&lt;br /&gt;
* http://www.redhat.com/archives/rhl-list/2003-December/msg01859.html&lt;br /&gt;
* http://faq.gotomyvnc.com/fom-serve/cache/56.html&lt;br /&gt;
&lt;br /&gt;
[[Category: HOWTO]]&lt;br /&gt;
[[Category: Networking]]&lt;br /&gt;
[[Category: X]]&lt;/div&gt;</summary>
		<author><name>SHaggY caT</name></author>
		
	</entry>
</feed>