<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Cum-Sa.Com</title>
	<atom:link href="http://cum-sa.com/articole/feed/" rel="self" type="application/rss+xml" />
	<link>http://cum-sa.com/articole</link>
	<description>Mica enciclopedie Romaneasca</description>
	<lastBuildDate>Sat, 24 Apr 2010 20:59:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Instalare Container VPS-uri pe CentOS 5.4</title>
		<link>http://cum-sa.com/articole/instalare-container-vps-uri-pe-centos-5-4/</link>
		<comments>http://cum-sa.com/articole/instalare-container-vps-uri-pe-centos-5-4/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 13:46:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux/Unix]]></category>
		<category><![CDATA[Tutoriale]]></category>
		<category><![CDATA[centOS]]></category>
		<category><![CDATA[host to build VPS]]></category>
		<category><![CDATA[instalare OpenVZ]]></category>
		<category><![CDATA[openVZ]]></category>
		<category><![CDATA[vps]]></category>

		<guid isPermaLink="false">http://cum-sa.com/?p=463</guid>
		<description><![CDATA[In acest scurt tuotrial voi descrie modul de instalare al Kernel-ului OpenVZ pe sistemul de operare CentOS 5.4 OpenVZ este varianta cu sursa-deschisa (OpenSource) a renumitului Virtuozzo. Ok, Sa incepem: 1. Instalarea OpenVZ Cel mai simplu mod de instalare este sa adaugam in repository-ul YUM si adresa openVZ. Pentru aceasta executam urmatoarele comenzi: cd /etc/yum.repos.d [...]]]></description>
			<content:encoded><![CDATA[<p>In acest scurt tuotrial voi descrie modul de instalare al Kernel-ului OpenVZ pe sistemul de operare CentOS 5.4</p>
<p>OpenVZ este varianta cu sursa-deschisa (OpenSource) a renumitului Virtuozzo.</p>
<p>Ok, Sa incepem:</p>
<h2>1. Instalarea OpenVZ</h2>
<p>Cel mai simplu mod de instalare este sa adaugam in repository-ul YUM si adresa openVZ. Pentru aceasta executam urmatoarele comenzi:</p>
<blockquote>
<pre>cd /etc/yum.repos.d
wget http://download.openvz.org/openvz.repo
rpm --import http://download.openvz.org/RPM-GPG-Key-OpenVZ</pre>
</blockquote>
<p>Acest repository contine 4 variante de kernel:</p>
<ul>
<li> <strong>UP</strong> &#8211; Nu mai este disponibil la adata scrierii acestui articol</li>
<li> <strong>SMP</strong> vine fara nici un fel de modificare (Asemeni variantei UP)</li>
<li> <strong>entnosplit</strong> vine ca <strong>PAE</strong>(Pana la 64 GB Ram, recomandat pentru maxim 10-30 VPS-uri/Container)</li>
<li> <strong>enterprise</strong> vine ca <strong>ent </strong>(Pana la 64 GB Ram, recomandat pentru <span style="color: #ff0000;">containere</span> cu peste 20-30VPS-uri/Container)</li>
</ul>
<p>Pentru instalare simpla se foloseste comanda:</p>
<blockquote>
<pre>yum install ovzkernel</pre>
</blockquote>
<p>Dupa instalare meniul Grub se va updata singur. La bootare alegeti din meniu prima optiune (CentOS 5.4).</p>
<p><small>container = Masina fizica pe care se instaleaza VPS-urile</small></p>
<h2>2. Setari inainte de crearea VPS-urilor.</h2>
<p>Ok, avem kernel-ul pentru OpenVZ, dar nu avem setarile necesare pentru a-l putea folosi corect.<br />
Pentru a face aceste setari deschideti /etc/sysctl.conf si verificati ca urmatoarele linii sa fie precum cele de mai jos:</p>
<blockquote>
<pre>net.ipv4.ip_forward = 1
net.ipv4.conf.default.proxy_arp = 0
net.ipv4.conf.all.rp_filter = 1
kernel.sysrq = 1
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0
net.ipv4.icmp_echo_ignore_broadcasts=1
net.ipv4.conf.default.forwarding=1</pre>
</blockquote>
<p>De obicei se modifica doar valoarea net.ipv4.ip_forward = 0 in net.ipv4.ip_forward = 1 si restul se adauga la sfarsitul fisierului.<br />
Dupa ce facem aceste setari mai avem nevoie de cateva utilitare pentru o utilizare mai usoara a masinii VPS. Acestea sunt <em>vzctl</em> si <em>vzquota</em>:</p>
<blockquote>
<pre>yum install vzctl vzquota</pre>
</blockquote>
<h2>3. Crearea unei masini VPS</h2>
<p>Bun, am instalat kernel-ul, software-ul aditional si am facut setarile generale, acum urmeaza sa pornim masina cu noul kernel.<br />
Pentru aceasta resetam masina si selectam primul Kernel din lista.<br />
Pentru a putea crea VPS-uri cu diverse OS-uri avem nevoie de template-ul pentru acestea si un loc de depozitare.<br />
Acesta este localitat in</p>
<pre>/vz/template/cache
</pre>
<p>Template-urile pot fi descarcate de la http://download.openvz.org/template/precreated/contrib/ dupa cum urmeaza:</p>
<pre><img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/altlinux-2.4.tar.gz">altlinux-2.4.tar.gz</a>                             22-Aug-2006 06:49   24M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/altlinux-3.0-etcnet07.tar.gz">altlinux-3.0-etcnet07.tar.gz</a>                    02-Nov-2006 09:41   20M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/altlinux-3.0.tar.gz">altlinux-3.0.tar.gz</a>                             02-Nov-2006 09:43   20M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/altlinux-4.0-i586.tar.gz">altlinux-4.0-i586.tar.gz</a>                        18-Jul-2007 12:20   22M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/altlinux-5.1-i586.tar.gz">altlinux-5.1-i586.tar.gz</a>                        03-Feb-2010 08:19   34M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/altlinux-5.1-x86_64.tar.gz">altlinux-5.1-x86_64.tar.gz</a>                      03-Feb-2010 08:30   35M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/altlinux-20060914-x86_64.tar.gz">altlinux-20060914-x86_64.tar.gz</a>                 02-Nov-2006 09:38   21M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/altlinux-20060914.tar.gz">altlinux-20060914.tar.gz</a>                        02-Nov-2006 09:35   20M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/altlinux-20060928-x86_64.tar.gz">altlinux-20060928-x86_64.tar.gz</a>                 02-Nov-2006 09:40   21M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/arch-0.8-i686-minimal.tar.gz">arch-0.8-i686-minimal.tar.gz</a>                    01-Apr-2007 11:29   88M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/arch-0.8-x86_64-minimal.tar.gz">arch-0.8-x86_64-minimal.tar.gz</a>                  01-Apr-2007 11:28   93M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/arch-2010.01-i686-minimal.tar.gz">arch-2010.01-i686-minimal.tar.gz</a>                25-Jan-2010 10:34   99M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/arch-2010.01-x86_64-minimal.tar.gz">arch-2010.01-x86_64-minimal.tar.gz</a>              25-Jan-2010 08:09  103M
<img src="http://download.openvz.org/icons/text.gif" alt="[TXT]" /> <a href="http://download.openvz.org/template/precreated/contrib/arch-2010.x-about-and-MD5SUMs.txt">arch-2010.x-about-and-MD5SUMs.txt</a>               25-Jan-2010 16:31  828
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/centos-4-i386-default-4.8-20100412.tar.gz">centos-4-i386-default-4.8-20100412.tar.gz</a>       12-Apr-2010 19:03  128M
<img src="http://download.openvz.org/icons/text.gif" alt="[TXT]" /> <a href="http://download.openvz.org/template/precreated/contrib/centos-4-i386-default-4.8-20100412.tar.gz.asc">centos-4-i386-default-4.8-20100412.tar.gz.asc</a>   12-Apr-2010 19:03  189
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/centos-4-x86_64-default-4.8-20100412.tar.gz">centos-4-x86_64-default-4.8-20100412.tar.gz</a>     12-Apr-2010 19:07  126M
<img src="http://download.openvz.org/icons/text.gif" alt="[TXT]" /> <a href="http://download.openvz.org/template/precreated/contrib/centos-4-x86_64-default-4.8-20100412.tar.gz.asc">centos-4-x86_64-default-4.8-20100412.tar.gz.asc</a> 12-Apr-2010 19:07  189
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/centos-5-i386-default-5.4-20100412.tar.gz">centos-5-i386-default-5.4-20100412.tar.gz</a>       12-Apr-2010 19:11  152M
<img src="http://download.openvz.org/icons/text.gif" alt="[TXT]" /> <a href="http://download.openvz.org/template/precreated/contrib/centos-5-i386-default-5.4-20100412.tar.gz.asc">centos-5-i386-default-5.4-20100412.tar.gz.asc</a>   12-Apr-2010 19:11  189
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/centos-5-i386-default.tar.gz">centos-5-i386-default.tar.gz</a>                    13-May-2008 12:01  124M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/centos-5-i386-minimal.tar.gz">centos-5-i386-minimal.tar.gz</a>                    13-May-2008 12:03   46M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/centos-5-x86_64-default-5.4-20100412.tar.gz">centos-5-x86_64-default-5.4-20100412.tar.gz</a>     12-Apr-2010 19:16  158M
<img src="http://download.openvz.org/icons/text.gif" alt="[TXT]" /> <a href="http://download.openvz.org/template/precreated/contrib/centos-5-x86_64-default-5.4-20100412.tar.gz.asc">centos-5-x86_64-default-5.4-20100412.tar.gz.asc</a> 12-Apr-2010 19:16  189
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/centos-5-x86_64-default.tar.gz">centos-5-x86_64-default.tar.gz</a>                  13-May-2008 12:04  143M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/centos-5-x86_64-minimal.tar.gz">centos-5-x86_64-minimal.tar.gz</a>                  13-May-2008 12:04   46M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/cern-4-i386-default.tar.gz">cern-4-i386-default.tar.gz</a>                      15-Aug-2007 17:01  123M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/cern-4-i386-minimal.tar.gz">cern-4-i386-minimal.tar.gz</a>                      15-Aug-2007 17:03   46M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/cern-4-x86_64-default.tar.gz">cern-4-x86_64-default.tar.gz</a>                    15-Aug-2007 17:09  134M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/cern-4-x86_64-minimal.tar.gz">cern-4-x86_64-minimal.tar.gz</a>                    15-Aug-2007 17:12   51M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/debian-4.0-amd64-minimal.tar.gz">debian-4.0-amd64-minimal.tar.gz</a>                 13-Jan-2009 02:43   46M
<img src="http://download.openvz.org/icons/text.gif" alt="[TXT]" /> <a href="http://download.openvz.org/template/precreated/contrib/debian-4.0-amd64-minimal.tar.gz.asc">debian-4.0-amd64-minimal.tar.gz.asc</a>             13-Jan-2009 02:46  197
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/debian-4.0-i386-minimal.tar.gz">debian-4.0-i386-minimal.tar.gz</a>                  13-Jan-2009 02:44   47M
<img src="http://download.openvz.org/icons/text.gif" alt="[TXT]" /> <a href="http://download.openvz.org/template/precreated/contrib/debian-4.0-i386-minimal.tar.gz.asc">debian-4.0-i386-minimal.tar.gz.asc</a>              13-Jan-2009 02:46  197
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/debian-4.0-proxmox-mailgateway-2.0.tar.gz">debian-4.0-proxmox-mailgateway-2.0.tar.gz</a>       03-Jul-2007 02:43  117M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/debian-5.0-amd64-minimal.tar.gz">debian-5.0-amd64-minimal.tar.gz</a>                 13-Jan-2009 02:44   59M
<img src="http://download.openvz.org/icons/text.gif" alt="[TXT]" /> <a href="http://download.openvz.org/template/precreated/contrib/debian-5.0-amd64-minimal.tar.gz.asc">debian-5.0-amd64-minimal.tar.gz.asc</a>             13-Jan-2009 02:46  197
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/debian-5.0-i386-minimal.tar.gz">debian-5.0-i386-minimal.tar.gz</a>                  13-Jan-2009 02:44   59M
<img src="http://download.openvz.org/icons/text.gif" alt="[TXT]" /> <a href="http://download.openvz.org/template/precreated/contrib/debian-5.0-i386-minimal.tar.gz.asc">debian-5.0-i386-minimal.tar.gz.asc</a>              13-Jan-2009 02:46  197
<img src="http://download.openvz.org/icons/text.gif" alt="[TXT]" /> <a href="http://download.openvz.org/template/precreated/contrib/dowdle-public-key.asc">dowdle-public-key.asc</a>                           24-Feb-2009 19:01  1.7K
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/fedora-8-i386-default-EOL.tar.gz">fedora-8-i386-default-EOL.tar.gz</a>                04-Jan-2009 02:05  133M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/fedora-8-x86_64-default-EOL.tar.gz">fedora-8-x86_64-default-EOL.tar.gz</a>              04-Jan-2009 02:10  140M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/fedora-9-i386-default-EOL.tar.gz">fedora-9-i386-default-EOL.tar.gz</a>                30-Jun-2009 16:13  139M
<img src="http://download.openvz.org/icons/text.gif" alt="[TXT]" /> <a href="http://download.openvz.org/template/precreated/contrib/fedora-9-i386-default-EOL.tar.gz.asc">fedora-9-i386-default-EOL.tar.gz.asc</a>            30-Jun-2009 16:13  189
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/fedora-9-i386-default.tar.gz">fedora-9-i386-default.tar.gz</a>                    14-May-2008 15:21  152M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/fedora-9-i386-minimal.tar.gz">fedora-9-i386-minimal.tar.gz</a>                    14-May-2008 14:32   60M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/fedora-9-x86_64-default-EOL.tar.gz">fedora-9-x86_64-default-EOL.tar.gz</a>              30-Jun-2009 16:17  145M
<img src="http://download.openvz.org/icons/text.gif" alt="[TXT]" /> <a href="http://download.openvz.org/template/precreated/contrib/fedora-9-x86_64-default-EOL.tar.gz.asc">fedora-9-x86_64-default-EOL.tar.gz.asc</a>          30-Jun-2009 16:17  189
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/fedora-9-x86_64-default.tar.gz">fedora-9-x86_64-default.tar.gz</a>                  14-May-2008 15:24  173M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/fedora-9-x86_64-minimal.tar.gz">fedora-9-x86_64-minimal.tar.gz</a>                  14-May-2008 15:55   65M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/fedora-10-i386-default-EOL.tar.gz">fedora-10-i386-default-EOL.tar.gz</a>               16-Feb-2010 16:10  150M
<img src="http://download.openvz.org/icons/text.gif" alt="[TXT]" /> <a href="http://download.openvz.org/template/precreated/contrib/fedora-10-i386-default-EOL.tar.gz.asc">fedora-10-i386-default-EOL.tar.gz.asc</a>           16-Feb-2010 16:10  189
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/fedora-10-x86_64-default-EOL.tar.gz">fedora-10-x86_64-default-EOL.tar.gz</a>             21-Dec-2009 18:53  156M
<img src="http://download.openvz.org/icons/text.gif" alt="[TXT]" /> <a href="http://download.openvz.org/template/precreated/contrib/fedora-10-x86_64-default-EOL.tar.gz.asc">fedora-10-x86_64-default-EOL.tar.gz.asc</a>         21-Dec-2009 18:54  189
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/fedora-11-i386-default-20100412.tar.gz">fedora-11-i386-default-20100412.tar.gz</a>          12-Apr-2010 19:21  163M
<img src="http://download.openvz.org/icons/text.gif" alt="[TXT]" /> <a href="http://download.openvz.org/template/precreated/contrib/fedora-11-i386-default-20100412.tar.gz.asc">fedora-11-i386-default-20100412.tar.gz.asc</a>      12-Apr-2010 19:21  189
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/fedora-11-x86_64-default-20100412.tar.gz">fedora-11-x86_64-default-20100412.tar.gz</a>        12-Apr-2010 19:25  169M
<img src="http://download.openvz.org/icons/text.gif" alt="[TXT]" /> <a href="http://download.openvz.org/template/precreated/contrib/fedora-11-x86_64-default-20100412.tar.gz.asc">fedora-11-x86_64-default-20100412.tar.gz.asc</a>    12-Apr-2010 19:25  189
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/fedora-12-i386-default-20100412.tar.gz">fedora-12-i386-default-20100412.tar.gz</a>          12-Apr-2010 19:31  174M
<img src="http://download.openvz.org/icons/text.gif" alt="[TXT]" /> <a href="http://download.openvz.org/template/precreated/contrib/fedora-12-i386-default-20100412.tar.gz.asc">fedora-12-i386-default-20100412.tar.gz.asc</a>      12-Apr-2010 19:31  189
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/fedora-12-x86_64-default-20100412.tar.gz">fedora-12-x86_64-default-20100412.tar.gz</a>        12-Apr-2010 19:36  184M
<img src="http://download.openvz.org/icons/text.gif" alt="[TXT]" /> <a href="http://download.openvz.org/template/precreated/contrib/fedora-12-x86_64-default-20100412.tar.gz.asc">fedora-12-x86_64-default-20100412.tar.gz.asc</a>    12-Apr-2010 19:36  189
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/fedora-core-7-i386-default.tar.gz">fedora-core-7-i386-default.tar.gz</a>               09-Jun-2007 10:08  109M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/fedora-core-7-i386-minimal.tar.gz">fedora-core-7-i386-minimal.tar.gz</a>               09-Jun-2007 10:08   61M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/gentoo-amd64-20071018.tar.gz">gentoo-amd64-20071018.tar.gz</a>                    09-Nov-2007 14:13  139M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/gentoo-openvz-amd64-2008.11.27.tar.gz">gentoo-openvz-amd64-2008.11.27.tar.gz</a>           27-Nov-2008 03:42  139M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/gentoo-openvz-x86-2008.11.30.tar.gz">gentoo-openvz-x86-2008.11.30.tar.gz</a>             30-Nov-2008 06:51  124M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/opensuse-10.1-i386.tar.gz">opensuse-10.1-i386.tar.gz</a>                       30-Nov-2008 03:54  148M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/opensuse-11.0-i586-20081217.tar.gz">opensuse-11.0-i586-20081217.tar.gz</a>              02-Feb-2009 17:51  191M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/owl-current-20100323-i686.tar.gz">owl-current-20100323-i686.tar.gz</a>                24-Mar-2010 22:37  109M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/owl-current-20100323-x86_64.tar.gz">owl-current-20100323-x86_64.tar.gz</a>              24-Mar-2010 22:38  113M
<img src="http://download.openvz.org/icons/unknown.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/owl-current-20100323.checksums">owl-current-20100323.checksums</a>                  24-Mar-2010 22:38  453
<img src="http://download.openvz.org/icons/text.gif" alt="[TXT]" /> <a href="http://download.openvz.org/template/precreated/contrib/owl-current-20100323.checksums.asc">owl-current-20100323.checksums.asc</a>              24-Mar-2010 22:38  353
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/slackware-10.2-i386-minimal.tar.gz">slackware-10.2-i386-minimal.tar.gz</a>              03-May-2007 06:35   26M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/slackware-11.0-i386-minimal.tar.gz">slackware-11.0-i386-minimal.tar.gz</a>              07-May-2007 11:49   28M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/slackware-12.0-i386-minimal.tar.gz">slackware-12.0-i386-minimal.tar.gz</a>              12-Jul-2007 11:14   29M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/slackware-13.0-i386-minimal.tar.gz">slackware-13.0-i386-minimal.tar.gz</a>              28-Mar-2010 11:20   38M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/sles-10.2-i586-minimal.tar.gz">sles-10.2-i586-minimal.tar.gz</a>                   01-Sep-2008 13:53   73M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/suse-9.3-x86_64.tar.gz">suse-9.3-x86_64.tar.gz</a>                          24-May-2006 02:59  155M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/ubuntu-6.06-i386-minimal.tar.gz">ubuntu-6.06-i386-minimal.tar.gz</a>                 12-Jun-2006 17:34   60M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/ubuntu-7.10-i386-minimal.tar.gz">ubuntu-7.10-i386-minimal.tar.gz</a>                 25-Nov-2007 09:02   45M
<img src="http://download.openvz.org/icons/unknown.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/ubuntu-7.10-i386-minimal.tar.gz.md5">ubuntu-7.10-i386-minimal.tar.gz.md5</a>             25-Nov-2007 09:02   66
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/ubuntu-8.04.2-i386-minimal.tar.gz">ubuntu-8.04.2-i386-minimal.tar.gz</a>               27-Feb-2009 12:08   50M
<img src="http://download.openvz.org/icons/compressed.gif" alt="[   ]" /> <a href="http://download.openvz.org/template/precreated/contrib/ubuntu-9.04-i386-minimal.tar.gz">ubuntu-9.04-i386-minimal.tar.gz</a>                 04-May-2009 07:52   59M</pre>
<p>Acestea le descarcam cu wget.<br />
Dupa alegerea OS-ului dorit putem sa ne apucam de instalarea lui:</p>
<blockquote>
<pre>vzctl create 150 --ostemplate debian-5.0-i386-minimal --config vps.basic</pre>
</blockquote>
<p>Eu am ales debian 5 minimal. Adica un sistem default fara nici un fel de aplicatie instalata, cu configuratia basic de VPS (100% resurse alocate).<br />
150 este un identificator unic pentru un VPS, un fel de nume pentru acesta.<br />
Bun, acum avem un VPS,  ca sa il pornim folosim comanda vzctl start ID (In cazul nostru 150).</p>
<h2>4. Setari principale disponibile</h2>
<p>Daca dorim ca VPS-ul sa porneasca automat la resetarea serverului-gazda atunci trebuie sa ii spunem serverului gazda sa faca acest lucru:</p>
<pre>vzctl set 150 --onboot yes --save</pre>
<p>Pentru a adauga un hostname si un ip masinii noi create din masina-gazda folositi comanda:</p>
<pre>vzctl set 150 --hostname test.dabv.net --save
vzctl set 150 --ipadd 192.168.0.150 --save</pre>
<p>Daca doresti sa limitezi numarul de socket-uri deschise care le poate &#8220;duce&#8221; un VPS, poti folosi comanda urmatoare:</p>
<pre>vzctl set 150 --numothersock 999 --save
</pre>
<p>Unde 150 este identificatorul VPS-ului si 999 este numarul maxim de socket-uri acceptate.</p>
<p>De asemenea, parametrii pot fi modificati si manual, editand fisierul de configurare aflat la <strong>/etc/vz/conf/ID.conf</strong>, unde ID reprezinta identificatorul unic.</p>
<p>Alte comenzi ar fi <strong>start</strong>, <strong>restart</strong>, <strong>destroy</strong> (stergerea definitiva a VPS-ului), <strong>exec</strong>(Executa comenzile date din masina-gazda) sau chiar <strong>enter</strong> (Intri pe masina virtuala din masina gazda fara autentificare).<br />
Exemple:</p>
<pre>vzctl start 150
vzctl restart 150
vzctl stop 150
vzctl destroy 150
vzctl exec 150 ps ax
vzctl enter 150
</pre>
<p>Pentru a iesi de pe masina virtuala in masina-gazda se foloseste comanda &#8220;exit&#8221;.</p>
<h2>5. Verificarea starii VPS-urilor</h2>
<p>Pentru a verifica lista VPS-urilor si starea lor se foloseste comanda vzlist -a:</p>
<pre>     [root@dabv.net /]# vzlist -a
      VEID      NPROC STATUS  IP_ADDR         HOSTNAME
       150         18 running 192.168.0.150   test.dabv.net
       151         47 running 192.168.0.151   test2.dabv.net</pre>
<p>Pentru a vedea resursele alocate/consumate de un VPS putem vesea fisierul /proc/user_beancounters din fiecare VPS:</p>
<pre>      [root@dabv.net /]# vzctl exec 150 cat /proc/user_beancounters</pre>
<p>Rezultatul acesti comenzi va fi de genul:</p>
<pre>
Version: 2.5
uid            resource              held        maxheld    barrier            limit      failcnt
150:          kmemsize          1361386     1509512   11055923   11377049       0
                lockedpages           0               0        256               256           0
                privvmpages        4424           4794      65536         69632          0
                shmpages             45              45      21504           21504          0
                dummy                  0               0          0                  0             0
                numproc               17             20        240               240            0
                physpages           2074          2263        0           2147483647      0
                vmguarpages          0              0        33792        2147483647      0
                oomguarpages      2074       2263        26112        2147483647      0
                numtcpsock            4          4              360              360            0
                numflock                3          4              188              206            0
                numpty                  0          0               16              16              0
                numsiginfo              0          1              256             256             0
                tcpsndbuf           35840        0          1720320        2703360        0
                tcprcvbuf           65536        0           1720320       2703360         0
                othersockbuf       6720       8640        1126080        2097152        0
                dgramrcvbuf           0         8384        262144         262144          0
                numothersock         7          10             360              360            0
                dcachesize             0          0           3409920       3624960          0
                numfile                 402       452            9312           9312             0
                numiptent             14         14              128            128              0</pre>
<p>Sper ca v-a fost de folos acest articol. Daca aveti intrebari sau completari la acest articol nu ezitati sa postati un comentariu.</p>
<p>Forum related: <a href="http://invata.cum-sa.com/unixlinux/instalare-cluster-masini-virtuale-problemerezolvari/">http://invata.cum-sa.com/unixlinux/instalare-cluster-masini-virtuale-problemerezolvari/</a></p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://cum-sa.com/articole/download-windows-vista-royal-business-edition-2009-sp1-32bit/" rel="bookmark" class="crp_title">Download Windows Vista Royal Business Edition 2009 SP1 32Bit</a></li><li><a href="http://cum-sa.com/articole/download-filezila-cel-mai-bun-client-ftp/" rel="bookmark" class="crp_title">Download Filezila &#8211; Cel mai bun client FTP</a></li><li><a href="http://cum-sa.com/articole/vboxheadless-running-virtual-machines-with-virtualbox-3-1-x-on-a-headless-debian-lenny-server/" rel="bookmark" class="crp_title">VBoxHeadless &#8211; Running Virtual Machines With VirtualBox 3.1.x On A Headless Debian Lenny Server</a></li><li><a href="http://cum-sa.com/articole/download-microsoft-windows-xp-performance-edition-2009/" rel="bookmark" class="crp_title">Download Microsoft Windows xp performance edition 2009</a></li><li><a href="http://cum-sa.com/articole/download-microsoft-windows-xp-professional-sp3-integrated-corporate-june-2009/" rel="bookmark" class="crp_title">Download Microsoft Windows XP Professional SP3 Integrated Corporate June 2009</a></li></ul></div>1234 Vizualizari.]]></content:encoded>
			<wfw:commentRss>http://cum-sa.com/articole/instalare-container-vps-uri-pe-centos-5-4/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Installing PHP 5.3, Nginx And PHP-fpm On Ubuntu/Debian</title>
		<link>http://cum-sa.com/articole/installing-php-5-3-nginx-and-php-fpm-on-ubuntudebian/</link>
		<comments>http://cum-sa.com/articole/installing-php-5-3-nginx-and-php-fpm-on-ubuntudebian/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 22:36:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[English tutorials]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[Hgnix]]></category>
		<category><![CDATA[php 5.3]]></category>
		<category><![CDATA[php-fpm]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://cum-sa.com/?p=454</guid>
		<description><![CDATA[Since Apache is most of the time a memory hungy process, people started to look for different ways to host their website. Apache is clearly not the only webserver available. A few good examples are lighttpd and nginx. In this tutorial I will show you how to install it on your Ubuntu server. This tutorial [...]]]></description>
			<content:encoded><![CDATA[<p>Since Apache is most of the time a memory hungy process, people started to look for different ways to host their website. Apache is clearly not the only webserver available. A few good examples are lighttpd and nginx. In this tutorial I will show you how to install it on your Ubuntu server. This tutorial also applies to Debian, though. There is only a very small difference.</p>
<p>  Ready? Let&#8217;s begin shall we.</p>
<p>&nbsp;</p>
<h3>Step 0 &#8211; Preliminary Notes</h3>
<p>In order to complete this tutorial, I assume you have installed a base system of Debian or Ubuntu. How this can be done, can be read in different tutorials. This tutorial only focusses on getting nginx+php running without much hassle.</p>
<p>&nbsp;</p>
<h3>Step 1 &#8211; Nginx</h3>
<p>Installing nginx is the first step we have to do. This can be easily done by downloading it from the repository.</p>
<p class="command">sudo apt-get install nginx</p>
<p>The default vhost has to be changed in order to work properly.</p>
<p class="command">sudo vim /etc/nginx/sites-available/default</p>
<p>  A nice starting point for your config is:</p>
<pre>server {
    listen   80;
    server_name  localhost;
    access_log  /var/log/nginx/localhost.access.log;

## Default location
    location / {
        root   /var/www;
        index  index.php;
    }

## Images and static content is treated different
    location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
      access_log        off;
      expires           30d;
      root /var/www;
    }

## Parse all .php file in the /var/www directory
    location ~ .php$ {
        fastcgi_split_path_info ^(.+\.php)(.*)$;
        fastcgi_pass   backend;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  /var/www$fastcgi_script_name;
        include fastcgi_params;
        fastcgi_param  QUERY_STRING     $query_string;
        fastcgi_param  REQUEST_METHOD   $request_method;
        fastcgi_param  CONTENT_TYPE     $content_type;
        fastcgi_param  CONTENT_LENGTH   $content_length;
        fastcgi_intercept_errors        on;
        fastcgi_ignore_client_abort     off;
        fastcgi_connect_timeout 60;
        fastcgi_send_timeout 180;
        fastcgi_read_timeout 180;
        fastcgi_buffer_size 128k;
        fastcgi_buffers 4 256k;
        fastcgi_busy_buffers_size 256k;
        fastcgi_temp_file_write_size 256k;
    }

## Disable viewing .htaccess &amp; .htpassword
    location ~ /\.ht {
        deny  all;
    }
}upstream backend {        server 127.0.0.1:9000;}&nbsp;</pre>
<p>Ok, we&#8217;re done here. Now we&#8217;ll install the needed files for PHP.</p>
<p>&nbsp;</p>
<h3>Step 2 &#8211; Installing PHP</h3>
<p>Many sites rely on PHP for providing them dynamic content, whether this is a wiki, forum software, weblog or something entirely different.</p>
<p>  If you are running Ubuntu, we first have to resolve two dependencies required for the dotdeb packages. If you are running the amd64 version, you should replace <span class="system">i386</span> with <span class="system">amd64</span>.</p>
<p>  <span class="highlight">For Debian you won&#8217;t have to do this!</span> </p>
<p class="command">cd /tmp</p>
<p class="command">wget http://us.archive.ubuntu.com/ubuntu/pool/main/k/krb5/libkrb53_1.6.dfsg.4~beta1-5ubuntu2_i386.deb</p>
<p class="command">wget http://us.archive.ubuntu.com/ubuntu/pool/main/i/icu/libicu38_3.8-6ubuntu0.2_i386.deb</p>
<p class="command">sudo dpkg -i *.deb</p>
<p>Again, this is <b><u>only</u> </b>required if you&#8217;re on Ubuntu. </p>
<p>The rest of the tutorial applies to both Ubuntu &amp; Debian. </p>
<p>We&#8217;ll have to add the dotdeb repository to the APT sources, so we can use their packaged PHP 5.3 and php-fpm:</p>
<p class="command">sudo echo &#8220;deb http://php53.dotdeb.org stable all&#8221; &gt;&gt; /etc/apt/sources.list</p>
<p>Update apt:</p>
<p class="command">sudo apt-get update</p>
<p>  The resulting text should include dotdeb.</p>
<p>  Now we&#8217;ll install PHP (part 1):</p>
<p class="command">sudo apt-get install php5-cli php5-common php5-suhosin</p>
<p>  We have to install the cli before the rest, because this will cause problems later on.</p>
<p class="command">sudo apt-get install php5-fpm php5-cgi</p>
<p>  If you are planning to use a database or require specific modules (mcrypt, ldap, snmp etc) you can install them as well.</p>
<p>  Ok, so now we have nginx and PHP.</p>
<p>  One minor remark: If you are using &#8220;php short tags&#8221; (<span class="system">&lt;?</span>) you should enable them in your <span class="system">php.ini</span> files (for both fpm and cli). If you do not change this, you will see your code in plain text! </p>
<p>&nbsp;</p>
<h3>Step 3 &#8211; Finalizing</h3>
<p>Restart nginx in order to catch up with the config changes we made earlier.</p>
<p class="command">sudo /etc/init.d/nginx restart</p>
<p>  The restart should have gone without any problems.</p>
<p>  After installing php5-fpm, it should have been started. If you did change your <span class="system">php.ini</span> files, you have to restart php5-fpm.</p>
<p class="command">sudo /etc/init.d/php5-fpm restart</p>
<p>  All right. They should now both be running. </p>
<p>&nbsp;</p>
<h3>Step 4 &#8211; Testing</h3>
<p>In order to test if the execution of PHP is working, create an <span class="system">index.php</span> file in <span class="system">/var/www</span> with the following content:</p>
<pre>&lt;?php phpinfo(); ?&gt;</pre>
<p>  Visit your webserver and you should be able to see the generated phpinfo. If not, something went wrong.</p>
<p>&nbsp;</p>
<h3>Step 5 &#8211; Troubleshooting &amp; Final notes</h3>
<p>If&nbsp; you did not see the phpinfo, there might be something wrong. In order to track down what went wrong, you can check the nginx error log:</p>
<p class="command">sudo tail /var/log/nginx/error.log</p>
<p>  Remember, if you did change your <span class="system">php.ini</span> you have to restart php5-fpm. Restarting nginx isn&#8217;t&#8217; necessary. </p>
<p>  In my example config I&#8217;ve enabled the fastcgi error interception. If a serious error occurs (for instance a &#8220;cannot redeclare class xyz&#8221;), nginx can catch this page and show a &#8220;nice&#8221; error page that something went wrong. This way, there is less information given out in case something is going seriously wrong.</p>
<p>  If you do not like this, you can turn it off.</p>
<p>  If php5-fpm is not running, your PHP files cannot be parsed and nginx will show the user an error page.</p>
<p>  Well, I guess we&#8217;re done and you are now able to serve PHP with your new nginx based webserver. Nginx is pretty nice and you can configure a lot. If you need rewrites, be aware that nginx does not work with <span class="system">.htaccess</span> files. You will need to change your vhost settings in order for the rewrites to work.</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://cum-sa.com/articole/how-to-install-z-push-on-an-ispconfig-3-server-debian-lenny/" rel="bookmark" class="crp_title">How To Install Z-Push On An ISPConfig 3 Server (Debian Lenny)</a></li><li><a href="http://cum-sa.com/articole/how-to-set-up-apache2-with-mod_fcgid-and-php5-on-ubuntu-8-10/" rel="bookmark" class="crp_title">How To Set Up Apache2 With mod_fcgid And PHP5 On Ubuntu 8.10</a></li><li><a href="http://cum-sa.com/articole/vboxheadless-running-virtual-machines-with-virtualbox-3-1-x-on-a-headless-debian-lenny-server/" rel="bookmark" class="crp_title">VBoxHeadless &#8211; Running Virtual Machines With VirtualBox 3.1.x On A Headless Debian Lenny Server</a></li><li><a href="http://cum-sa.com/articole/server-monitoring-with-munin-and-monit-on-debian-lenny/" rel="bookmark" class="crp_title">Server Monitoring With munin And monit On Debian Lenny</a></li><li><a href="http://cum-sa.com/articole/project-natal-for-xbox-360/" rel="bookmark" class="crp_title">Project Natal for XBOX 360</a></li></ul></div>1343 Vizualizari.]]></content:encoded>
			<wfw:commentRss>http://cum-sa.com/articole/installing-php-5-3-nginx-and-php-fpm-on-ubuntudebian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VBoxHeadless &#8211; Running Virtual Machines With VirtualBox 3.1.x On A Headless Debian Lenny Server</title>
		<link>http://cum-sa.com/articole/vboxheadless-running-virtual-machines-with-virtualbox-3-1-x-on-a-headless-debian-lenny-server/</link>
		<comments>http://cum-sa.com/articole/vboxheadless-running-virtual-machines-with-virtualbox-3-1-x-on-a-headless-debian-lenny-server/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 22:33:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[English tutorials]]></category>
		<category><![CDATA[debian lenny]]></category>
		<category><![CDATA[virtualbox]]></category>

		<guid isPermaLink="false">http://cum-sa.com/?p=451</guid>
		<description><![CDATA[This guide explains how you can run virtual machines with Sun xVM VirtualBox 3.1.x on a headless Debian Lenny server. Normally you use the VirtualBox GUI to manage your virtual machines, but a server does not have a desktop environment. Fortunately, VirtualBox comes with a tool called VBoxHeadless that allows you to connect to the [...]]]></description>
			<content:encoded><![CDATA[<p>This guide explains how you can run virtual machines with <a mce_real_href="http://www.virtualbox.org/" href="http://www.virtualbox.org/" target="_blank">Sun xVM VirtualBox 3.1.x </a> on a headless Debian Lenny server. Normally you use the VirtualBox GUI to manage your virtual machines, but a server does not have a desktop environment. Fortunately, VirtualBox comes with a tool called VBoxHeadless that allows you to connect to the virtual machines over a remote desktop connection, so there&#8217;s no need for the VirtualBox GUI. </p>
<p>I do not issue any guarantee that this will work for you!</p>
<p>&nbsp;</p>
<h3>1 Preliminary Note</h3>
<p>I have tested this on a Debian Lenny server (host system) with the IP address <span class="system">192.168.0.100</span> where I&#8217;m logged in as a normal user (user name <span class="system">administrator</span> in this example) instead of as <span class="system">root</span>. </p>
<p>If you only have a root account, but no normal user account, create one as follows (user <span class="system">administrator</span>, group <span class="system">administrator</span>)&#8230;</p>
<p class="command"># groupadd administrator<br />
# useradd -d /home/administrator -m -g administrator -s /bin/bash administrator</p>
<p>&#8230; create a password for the new user&#8230;</p>
<p class="command"># passwd administrator</p>
<p>&#8230; and log in as that user. </p>
<p>&nbsp;</p>
<h3>2 Installing VirtualBox</h3>
<p>To install VirtualBox 2 on our Debian Lenny server, we need root privileges, therefore we run </p>
<p class="command">$ su</p>
<p>Then we add the VirtualBox repository to our apt configuration:</p>
<p class="command"># echo &#8220;deb http://download.virtualbox.org/virtualbox/debian lenny non-free&#8221; &gt; /etc/apt/sources.list.d/virtualbox.list</p>
<p>Then we download Sun&#8217;s public key&#8230;</p>
<p class="command"># wget -q http://download.virtualbox.org/virtualbox/debian/sun_vbox.asc -O- | apt-key add -</p>
<p>&#8230; and update our package database:</p>
<p class="command"># aptitude update</p>
<p>Now we bring our system up to date:</p>
<p class="command"># aptitude safe-upgrade</p>
<p>(It is possible that the kernel gets updated. If this is the case, reboot the system&#8230;</p>
<p class="command"># reboot</p>
<p>&#8230; log in as the normal user again and become root:</p>
<p class="command">$ su</p>
<p> )</p>
<p>Afterwards, we install VirtualBox 3.1.x as follows:</p>
<p class="command"># aptitude install linux-headers-$(uname -r) build-essential virtualbox-3.1 dkms</p>
<p> (The <span class="system">dkms</span> package ensures that the VirtualBox host kernel modules are properly updated if the Linux kernel version changes.) </p>
<p><span class="system">Creating group &#8216;vboxusers&#8217;<br />
  Users of VirtualBox must be members of that group. Host network interfaces will be assigned to that group.</span> <span class="highlight">&lt;&#8211; Ok</span></p>
<p><span class="system">Unable to find a precompiled module for the current kernel![...]<br />
  Should the vboxdrv kernel module be compiled now?</span> <span class="highlight">&lt;&#8211; Yes</span></p>
<p>Now we must add the user that will run VirtualBox (<span class="system">administrator</span> in this example) to the <span class="system">vboxusers</span> group:</p>
<p class="command"># adduser administrator vboxusers</p>
<p>VirtualBox is now installed and ready to be used.</p>
<p>Type</p>
<p class="command"># exit</p>
<p>to leave the root account and become a normal user (<span class="system">administrator</span>) again. </p>
<p>&nbsp;</p>
<h3>3 Using VirtualBox On The Command Line</h3>
<h4>3.1 Creating A VM</h4>
<p>To create a VM on the command line, we can use the <span class="system">VBoxManage</span> command. See</p>
<p class="command">$ VBoxManage &#8211;help</p>
<p> for a list of available switches and (highly recommended!) take a look at <a mce_real_href="http://www.virtualbox.org/manual/UserManual.html#vboxmanage" href="http://www.virtualbox.org/manual/UserManual.html#vboxmanage" target="_blank">http://www.virtualbox.org/manual/UserManual.html#vboxmanage</a>.</p>
<p>I will now create a Debian Lenny Server VM with 256MB memory and a 10GB hard drive from the Debian Lenny Netinstall iso image (which I have stored in <span class="system">/home/debian-500-i386-netinst.iso</span>):</p>
<p class="command">$ VBoxManage createvm &#8211;name &#8220;Debian Lenny Server&#8221; &#8211;register</p>
<p>  $ VBoxManage modifyvm &#8220;Debian Lenny Server&#8221; &#8211;memory 256 &#8211;acpi on &#8211;boot1 dvd &#8211;nic1 bridged &#8211;bridgeadapter1 eth0<br />
  $ VBoxManage createhd &#8211;filename Debian_Lenny_Server.vdi &#8211;size 10000 &#8211;register<br />
  $ VBoxManage storagectl &#8220;Debian Lenny Server&#8221; &#8211;name &#8220;IDE Controller&#8221; &#8211;add ide<br />
  $ VBoxManage storageattach &#8220;Debian Lenny Server&#8221; &#8211;storagectl &#8220;IDE Controller&#8221; &#8211;port 0 &#8211;device 0 &#8211;type hdd &#8211;medium Debian_Lenny_Server.vdi<br />
$ VBoxManage storageattach &#8220;Debian Lenny Server&#8221; &#8211;storagectl &#8220;IDE Controller&#8221; &#8211;port 1 &#8211;device 0 &#8211;type dvddrive &#8211;medium /home/debian-500-i386-netinst.iso</p>
<p>&nbsp;</p>
<h4>3.2 Importing An Existing VM</h4>
<p>Let&#8217;s assume you have a VM called <span class="system">examplevm</span> that you want to reuse on this host. On the old host, you should have a directory <span class="system">Machines/examplevm</span> in the VirtualBox directory; <span class="system">Machines/examplevm</span> should contain the <span class="system">examplevm.xml</span> file. Copy the <span class="system">examplevm</span> directory (including the <span class="system">examplevm.xml</span> file) to your new <span class="system">Machines</span> directory (if your user name is administrator, this is <span class="system">/home/administrator/.VirtualBox/Machines</span> &#8211; the result should be <span class="system">/home/administrator/.VirtualBox/Machines/examplevm/examplevm.xml</span>).</p>
<p>In addition to that copy the <span class="system">examplevm.vdi</span> file from the old <span class="system">VDI</span> directory to the new one (e.g. <span class="system">/home/administrator/.VirtualBox/VDI/examplevm.vdi</span>).</p>
<p>Afterwards, you must register the imported VM:</p>
<p class="command">$ VBoxManage registervm Machines/examplevm/examplevm.xml</p>
<p>&nbsp;</p>
<h4>3.3 Starting A VM With VBoxHeadless</h4>
<p>Regardless of if you create a new VM or import and old one, you can start it with the command:</p>
<p class="command">$ VBoxHeadless &#8211;startvm &#8220;Debian Lenny Server&#8221;</p>
<p>(Replace <span class="system">Debian Lenny Server</span> with the name of your VM.)</p>
<p><span class="system">VBoxHeadless</span> will start the VM and a VRDP (<span class="system">VirtualBox Remote Desktop Protocol</span>) server which allows you to see the VM&#8217;s output remotely on another machine. </p>
<p>To stop a VM, run</p>
<p class="command">$ VBoxManage controlvm &#8220;Debian Lenny Server&#8221; poweroff</p>
<p>To pause a VM, run</p>
<p class="command">$ VBoxManage controlvm &#8220;Debian Lenny Server&#8221; pause</p>
<p>To reset a VM, run</p>
<p class="command">$ VBoxManage controlvm &#8220;Debian Lenny Server&#8221; reset</p>
<p>To learn more about <span class="system">VBoxHeadless</span>, take a look at</p>
<p class="command">$ VBoxHeadless &#8211;help</p>
<p>and at <a mce_real_href="http://www.virtualbox.org/manual/UserManual.html" href="http://www.virtualbox.org/manual/UserManual.html" target="_blank">http://www.virtualbox.org/manual/UserManual.html</a>. </p>
<h3>4 Connecting To A VM From A Remote Desktop</h3>
<h4>4.1 Windows XP</h4>
<p>You can use the built-in <span class="system">Remote Desktop Connection</span> utility to connect to the VM:  </p>
<p><img src="http://cum-sa.com/Uploads/tutoriale/vbox/1.jpg" height="275" width="550"></p>
<p>Type in the hostname or IP address of the host (not the guest!): </p>
<p><img src="http://cum-sa.com/Uploads/tutoriale/vbox/2.jpg" height="175" width="410"></p>
<p>And voila, you should be connected to the VM: </p>
<p><img src="http://cum-sa.com/Uploads/tutoriale/vbox/3.png" height="398" width="550"></p>
<p>&nbsp;</p>
<h4>4.2 Linux</h4>
<p>On Linux desktops, you can use the <span class="system">rdesktop</span> command to connect to the VM. Open a terminal (on Ubuntu, for example, it&#8217;s under <span class="system">Applications &gt; Accessories &gt; Terminal</span>)&#8230; </p>
<p><img src="http://cum-sa.com/Uploads/tutoriale/vbox/4.jpg" height="413" width="550"></p>
<p>&#8230; and type in the following command:</p>
<p class="command">$ rdesktop -a 16 192.168.0.100</p>
<p>(<span class="system">192.168.0.100</span> is the host IP address, not the one of the guest &#8211; replace it with your own IP address or hostname; <span class="system">-a 16</span> means 16 bit colour depth.) </p>
<p><img src="http://cum-sa.com/Uploads/tutoriale/vbox/5.jpg" height="413" width="550"></p>
<p>And voila, you should be connected to the VM: </p>
<p><img src="http://cum-sa.com/Uploads/tutoriale/vbox/6.jpg" height="413" width="550"></p>
<p>&nbsp;</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://cum-sa.com/articole/how-to-install-z-push-on-an-ispconfig-3-server-debian-lenny/" rel="bookmark" class="crp_title">How To Install Z-Push On An ISPConfig 3 Server (Debian Lenny)</a></li><li><a href="http://cum-sa.com/articole/server-monitoring-with-munin-and-monit-on-debian-lenny/" rel="bookmark" class="crp_title">Server Monitoring With munin And monit On Debian Lenny</a></li><li><a href="http://cum-sa.com/articole/installing-php-5-3-nginx-and-php-fpm-on-ubuntudebian/" rel="bookmark" class="crp_title">Installing PHP 5.3, Nginx And PHP-fpm On Ubuntu/Debian</a></li><li><a href="http://cum-sa.com/articole/how-to-set-up-apache2-with-mod_fcgid-and-php5-on-ubuntu-8-10/" rel="bookmark" class="crp_title">How To Set Up Apache2 With mod_fcgid And PHP5 On Ubuntu 8.10</a></li><li><a href="http://cum-sa.com/articole/project-natal-for-xbox-360/" rel="bookmark" class="crp_title">Project Natal for XBOX 360</a></li></ul></div>791 Vizualizari.]]></content:encoded>
			<wfw:commentRss>http://cum-sa.com/articole/vboxheadless-running-virtual-machines-with-virtualbox-3-1-x-on-a-headless-debian-lenny-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Server Monitoring With munin And monit On Debian Lenny</title>
		<link>http://cum-sa.com/articole/server-monitoring-with-munin-and-monit-on-debian-lenny/</link>
		<comments>http://cum-sa.com/articole/server-monitoring-with-munin-and-monit-on-debian-lenny/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 22:23:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[English tutorials]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[lenny]]></category>
		<category><![CDATA[monitorizare]]></category>
		<category><![CDATA[munin]]></category>
		<category><![CDATA[server monitoring]]></category>
		<category><![CDATA[servere]]></category>

		<guid isPermaLink="false">http://cum-sa.com/?p=449</guid>
		<description><![CDATA[In this article I will describe how you can monitor your Debian Lenny server with munin and monit. munin produces nifty little graphics about nearly every aspect of your server (load average, memory usage, CPU usage, MySQL throughput, eth0 traffic, etc.) without much configuration, whereas monit checks the availability of services like Apache, MySQL, Postfix [...]]]></description>
			<content:encoded><![CDATA[<p>In this article I will describe how you can  monitor your Debian Lenny server with munin and monit. munin produces nifty little graphics about nearly every aspect of your server (load average, memory usage, CPU usage, MySQL throughput, eth0 traffic, etc.) without much configuration, whereas monit checks the availability of services like Apache, MySQL, Postfix and takes the appropriate action such as a restart if it finds a service is not behaving as expected. The combination of the two gives you full monitoring: graphics that lets you recognize current or upcoming problems (like &#8220;We need a bigger server soon, our load average is increasing rapidly.&#8221;), and a watchdog that ensures the availability of the monitored services.</p>
<p>Although munin lets you monitor more than one server, we will only discuss the monitoring of the system where it is installed here.</p>
<p>This tutorial was written for Debian Lenny, but the configuration should apply to other distributions with little changes as well.   <a mce_real_href="/loadbalanced_mysql_cluster_debian" href="/loadbalanced_mysql_cluster_debian"></a></p>
<p>I want to say first that this is not the only way of setting up such a system. There are many ways of achieving this goal but this is the way I take. I do not issue any guarantee that this will work for you!</p>
<p>&nbsp;</p>
<h3>1 Preliminary Note </h3>
<p>Our system&#8217;s hostname is <span class="system">server1.example.com</span>, and we have a web site <span class="system">www.example.com</span> on it with the document root <span class="system">/var/www/www.example.com/web</span>.</p>
<p>&nbsp;</p>
<h3>2 Install And Configure munin</h3>
<p>To install munin on Debian Lenny, we do this:</p>
<p class="command">aptitude install munin munin-node</p>
<p>Next, we must edit the munin configuration file <span class="system">/etc/munin/munin.conf</span>. We want munin to put its output into the directory <span class="system">/var/www/www.example.com/web/monitoring</span>, therefore we change the value of <span class="system">htmldir</span>, and we want it to use the name <span class="system">server1.example.com</span> instead of <span class="system">localhost.localdomain</span> in the HTML output, therefore we replace <span class="system">localhost.localdomain</span> with <span class="system">server1.example.com</span>. Without the comments, the changed file looks like this: </p>
<p class="command">vi /etc/munin/munin.conf</p>
<table class="" align="center" bgcolor="#cccccc" border="1" bordercolor="#000000" cellpadding="2" cellspacing="0" width="90%">
<tbody>
<tr>
<td class="">
<pre>dbdir   /var/lib/munin
htmldir /var/www/www.example.com/web/monitoring
logdir  /var/log/munin
rundir  /var/run/munin

tmpldir /etc/munin/templates

[server1.example.com]
    address 127.0.0.1
    use_node_name yes</pre>
</td>
</tr>
</tbody>
</table>
<p>Next we create the directory <span class="system">/var/www/www.example.com/web/monitoring</span> and change its ownership to the user and group <span class="system">munin</span>, otherwise munin cannot place its output in that directory. Then we restart munin:</p>
<p class="command">mkdir -p /var/www/www.example.com/web/monitoring<br />
  chown munin:munin /var/www/www.example.com/web/monitoring<br />
/etc/init.d/munin-node restart</p>
<p>Now wait a few minutes so that munin can produce its first output, and then go to <span class="system">http://www.example.com/monitoring/</span> in your browser, and you see the first statistics. After a few days this could look like this:</p>
<p><img src="http://cum-sa.com/Uploads/tutoriale/mon/1.png" height="667" width="506"> </p>
<p>(This is just a small excerpt of the many graphics that munin produces&#8230;) </p>
<p>&nbsp;</p>
<h3>3 Password-Protect The munin Output Directory (Optional) </h3>
<p>Now it is a good idea to password-protect the directory <span class="system">/var/www/www.example.com/web/monitoring</span> unless you want everybody to be able to see every little statistic about your server.</p>
<p>To do this, we create an <span class="system">.htaccess</span> file in <span class="system">/var/www/www.example.com/web/monitoring</span>:</p>
<p class="command">vi /var/www/www.example.com/web/monitoring/.htaccess</p>
<table class="" align="center" bgcolor="#cccccc" border="1" bordercolor="#000000" cellpadding="2" cellspacing="0" width="90%">
<tbody>
<tr>
<td class="">
<pre>AuthType Basic
AuthName "Members Only"
AuthUserFile /var/www/www.example.com/.htpasswd
&lt;limit GET PUT POST&gt;
require valid-user
&lt;/limit&gt;
</pre>
</td>
</tr>
</tbody>
</table>
<p>Then we must create the password file <span class="system">/var/www/www.example.com/.htpasswd</span>. We want to log in with the username <span class="system">admin</span>, so we do this:</p>
<p class="command">htpasswd -c /var/www/www.example.com/.htpasswd admin </p>
<p>Enter a password for <span class="system">admin</span>, and you&#8217;re done! </p>
<h3>4 Install And Configure monit</h3>
<p>To install monit, we do this:</p>
<p class="command">aptitude install monit</p>
<p>Now we must edit <span class="system">/etc/monit/monitrc</span>. The default <span class="system">/etc/monit/monitrc</span> has lots of examples, and you can find more configuration examples on <a href="http://mmonit.com/monit/documentation/" target="_blank">http://mmonit.com/monit/documentation/</a>. However, in my case I want to monitor <span class="system">proftpd</span>, <span class="system">sshd</span>, <span class="system">mysql</span>, <span class="system">apache</span>, and <span class="system">postfix</span>, I want to enable the monit web interface on port 2812, I want a https web interface, I want to log in to the web interface with the username <span class="system">admin</span> and the password <span class="system">test</span>, and I want monit to send email alerts to <span class="system">root@localhost</span>, so my file looks like this:</p>
<p class="command">cp /etc/monit/monitrc /etc/monit/monitrc_orig<br />
  cat /dev/null &gt; /etc/monit/monitrc<br />
vi /etc/monit/monitrc</p>
<table class="" align="center" bgcolor="#cccccc" border="1" bordercolor="#000000" cellpadding="2" cellspacing="0" width="90%">
<tbody>
<tr>
<td class="">
<pre>set daemon  60
set logfile syslog facility log_daemon
set mailserver localhost
set mail-format { from: monit@server1.example.com }
set alert root@localhost
set httpd port 2812 and
     SSL ENABLE
     PEMFILE  /var/certs/monit.pem
     allow admin:test

check process proftpd with pidfile /var/run/proftpd.pid
   start program = "/etc/init.d/proftpd start"
   stop program  = "/etc/init.d/proftpd stop"
   if failed port 21 protocol ftp then restart
   if 5 restarts within 5 cycles then timeout

check process sshd with pidfile /var/run/sshd.pid
   start program  "/etc/init.d/ssh start"
   stop program  "/etc/init.d/ssh stop"
   if failed port 22 protocol ssh then restart
   if 5 restarts within 5 cycles then timeout

check process mysql with pidfile /var/run/mysqld/mysqld.pid
   group database
   start program = "/etc/init.d/mysql start"
   stop program = "/etc/init.d/mysql stop"
   if failed host 127.0.0.1 port 3306 then restart
   if 5 restarts within 5 cycles then timeout

check process apache with pidfile /var/run/apache2.pid
   group www
   start program = "/etc/init.d/apache2 start"
   stop program  = "/etc/init.d/apache2 stop"
   if failed host www.example.com port 80 protocol http
      and request "/monit/token" then restart
   if cpu is greater than 60% for 2 cycles then alert
   if cpu &gt; 80% for 5 cycles then restart
   if totalmem &gt; 500 MB for 5 cycles then restart
   if children &gt; 250 then restart
   if loadavg(5min) greater than 10 for 8 cycles then stop
   if 3 restarts within 5 cycles then timeout

check process postfix with pidfile /var/spool/postfix/pid/master.pid
   group mail
   start program = "/etc/init.d/postfix start"
   stop  program = "/etc/init.d/postfix stop"
   if failed port 25 protocol smtp then restart
   if 5 restarts within 5 cycles then timeout</pre>
</td>
</tr>
</tbody>
</table>
<p class="highlight">(Please make sure that you check processes only that really exist on your server &#8211; otherwise monit won&#8217;t start. I.e., if you tell monit to check Postfix, but Postfix isn&#8217;t installed on the system, monit won&#8217;t start.)</p>
<p>The configuration file is pretty self-explaining; if you are unsure about an option, take a look at the monit documentation: <a href="http://mmonit.com/monit/documentation/monit.html" target="_blank">http://mmonit.com/monit/documentation/monit.html</a> </p>
<p>In the <span class="system">apache</span> part of the monit configuration you find this:</p>
<table class="" align="center" bgcolor="#cccccc" border="1" bordercolor="#000000" cellpadding="2" cellspacing="0" width="90%">
<tbody>
<tr>
<td class="">
<pre>   if failed host www.example.com port 80 protocol http
      and request "/monit/token" then restart
</pre>
</td>
</tr>
</tbody>
</table>
<p>which means that monit tries to connect to <span class="system">www.example.com</span> on port 80 and tries to access the file <span class="system">/monit/token</span> which is <span class="system">/var/www/www.example.com/web/monit/token</span> because our web site&#8217;s document root is <span class="system">/var/www/www.example.com/web</span>. If monit doesn&#8217;t succeed it means Apache isn&#8217;t running, and monit is going to restart it. Now we must create the file <span class="system">/var/www/www.example.com/web/monit/token</span> and write some random string into it:</p>
<p class="command">mkdir /var/www/www.example.com/web/monit<br />
echo &#8220;hello&#8221; &gt; /var/www/www.example.com/web/monit/token</p>
<p>Next we create the pem cert (<span class="system">/var/certs/monit.pem</span>) we need for the SSL-encrypted monit web interface:</p>
<p class="command">mkdir /var/certs<br />
cd /var/certs</p>
<p>We need an OpenSSL configuration file to create our certificate. It can look like this:</p>
<p class="command">vi /var/certs/monit.cnf</p>
<table class="" align="center" bgcolor="#cccccc" border="1" bordercolor="#000000" cellpadding="2" cellspacing="0" width="90%">
<tbody>
<tr>
<td class="">
<pre># create RSA certs - Server

RANDFILE = ./openssl.rnd

[ req ]
default_bits = 1024
encrypt_key = yes
distinguished_name = req_dn
x509_extensions = cert_type

[ req_dn ]
countryName = Country Name (2 letter code)
countryName_default = MO

stateOrProvinceName             = State or Province Name (full name)
stateOrProvinceName_default     = Monitoria

localityName                    = Locality Name (eg, city)
localityName_default            = Monittown

organizationName                = Organization Name (eg, company)
organizationName_default        = Monit Inc.

organizationalUnitName          = Organizational Unit Name (eg, section)
organizationalUnitName_default  = Dept. of Monitoring Technologies

commonName                      = Common Name (FQDN of your server)
commonName_default              = server.monit.mo

emailAddress                    = Email Address
emailAddress_default            = root@monit.mo

[ cert_type ]
nsCertType = server</pre>
</td>
</tr>
</tbody>
</table>
<p>Now we create the certificate like this:</p>
<p class="command">openssl req -new -x509 -days 365 -nodes -config ./monit.cnf -out /var/certs/monit.pem -keyout /var/certs/monit.pem</p>
<p class="command">openssl gendh 512 &gt;&gt; /var/certs/monit.pem</p>
<p class="command">openssl x509 -subject -dates -fingerprint -noout -in /var/certs/monit.pem</p>
<p class="command">chmod 700 /var/certs/monit.pem</p>
<p>Afterwards we edit <span class="system">/etc/default/monit</span> to enable the monit daemon. Change <span class="system">startup</span> to <span class="system">1</span> and set <span class="system">CHECK_INTERVALS</span> to the interval in seconds that you would like monit to check your system. I choose 60 (seconds) so my file looks like this:</p>
<p class="command">vi /etc/default/monit </p>
<table class="" align="center" bgcolor="#cccccc" border="1" bordercolor="#000000" cellpadding="2" cellspacing="0" width="90%">
<tbody>
<tr>
<td class="">
<pre># Defaults for monit initscript
# sourced by /etc/init.d/monit
# installed at /etc/default/monit by maintainer scripts
# Fredrik Steen &lt;stone@debian.org&gt;

# You must set this variable to for monit to start
startup=1

# To change the intervals which monit should run uncomment
# and change this variable.
CHECK_INTERVALS=60</pre>
</td>
</tr>
</tbody>
</table>
<p>Finally, we can start monit:</p>
<p class="command">/etc/init.d/monit start </p>
<p>Now point your browser to <span class="system">https://www.example.com:2812/</span> (make sure port 2812 isn&#8217;t blocked by your firewall), log in with <span class="system">admin</span> and <span class="system">test</span>, and you should see the monit web interface. It should look like this:</p>
<p><img src="http://cum-sa.com/Uploads/tutoriale/mon/3.png" height="254" width="500"> </p>
<p>(Main Screen) </p>
<p><img src="http://cum-sa.com/Uploads/tutoriale/mon/4.png" height="424" width="500"></p>
<p>(Apache Status Page) </p>
<p>Depending on your configuration in <span class="system">/etc/monit/monitrc</span> monit will restart your services if they fail and send notification emails if process IDs of services change, etc. </p>
<p>Have fun!</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://cum-sa.com/articole/how-to-set-up-apache2-with-mod_fcgid-and-php5-on-ubuntu-8-10/" rel="bookmark" class="crp_title">How To Set Up Apache2 With mod_fcgid And PHP5 On Ubuntu 8.10</a></li><li><a href="http://cum-sa.com/articole/how-to-install-z-push-on-an-ispconfig-3-server-debian-lenny/" rel="bookmark" class="crp_title">How To Install Z-Push On An ISPConfig 3 Server (Debian Lenny)</a></li><li><a href="http://cum-sa.com/articole/vboxheadless-running-virtual-machines-with-virtualbox-3-1-x-on-a-headless-debian-lenny-server/" rel="bookmark" class="crp_title">VBoxHeadless &#8211; Running Virtual Machines With VirtualBox 3.1.x On A Headless Debian Lenny Server</a></li><li><a href="http://cum-sa.com/articole/installing-php-5-3-nginx-and-php-fpm-on-ubuntudebian/" rel="bookmark" class="crp_title">Installing PHP 5.3, Nginx And PHP-fpm On Ubuntu/Debian</a></li><li><a href="http://cum-sa.com/articole/project-natal-for-xbox-360/" rel="bookmark" class="crp_title">Project Natal for XBOX 360</a></li></ul></div>1216 Vizualizari.]]></content:encoded>
			<wfw:commentRss>http://cum-sa.com/articole/server-monitoring-with-munin-and-monit-on-debian-lenny/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Install Z-Push On An ISPConfig 3 Server (Debian Lenny)</title>
		<link>http://cum-sa.com/articole/how-to-install-z-push-on-an-ispconfig-3-server-debian-lenny/</link>
		<comments>http://cum-sa.com/articole/how-to-install-z-push-on-an-ispconfig-3-server-debian-lenny/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 22:12:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[English tutorials]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[ispconfig server]]></category>
		<category><![CDATA[z-push install]]></category>

		<guid isPermaLink="false">http://cum-sa.com/?p=446</guid>
		<description><![CDATA[Z-push is an implementation of the ActiveSync protocol which is used &#8216;over-the-air&#8217; for multi platform ActiveSync devices, including Windows Mobile, iPhone, Sony Ericsson and Nokia mobile devices. With Z-push any groupware can be connected and synced with these devices. This install of Z-Push is on a The Perfect Server &#8211; Debian Lenny (Debian 5.0) [ISPConfig [...]]]></description>
			<content:encoded><![CDATA[<p> Z-push is an implementation of the ActiveSync protocol which is used &#8216;over-the-air&#8217; for multi platform ActiveSync devices, including Windows Mobile, iPhone, Sony Ericsson and Nokia mobile devices. With Z-push any groupware can be connected and synced with these devices. This install of Z-Push is on a <a mce_real_href="/perfect-server-debian-lenny-ispconfig3" href="/perfect-server-debian-lenny-ispconfig3" target="_blank">The Perfect Server &#8211; Debian Lenny (Debian 5.0) [ISPConfig 3]</a> setup.</p>
<p>I&#8217;m using z-push on my 1st website of the server (<span class="system">client1</span> / <span class="system">web1</span>).<br />
You will need to change the <span class="system">/var/clients/client1/web1/web/</span> part to your own settings if different.</p>
<p>For z-push to work you will need to have imap enabled for the user.</p>
<p>A quote from a famous person:</p>
<p><i>This document comes without warranty of any kind! I want to say that this is not the only way of setting up such a system. There are many ways of achieving this goal but this is the way I take. I do not issue any guarantee that this will work for you!</i></p>
<p>&#8211; Let&#8217;s get started with installing z-push. &#8211;</p>
<p>Make sure that you are doing this as su user (root).<br />
  Also make sure that you are using the latest version of z-push. More info @ <a mce_real_href="http://z-push.sourceforge.net/soswp/index.php?pages_id=39&amp;t=Download" href="http://z-push.sourceforge.net/soswp/index.php?pages_id=39&amp;t=Download" target="_blank">http://z-push.sourceforge.net/soswp/index.php?pages_id=39&amp;t=Download</a>.<br />
At time of writing this &#8220;howto&#8221; it was version z-push-1.3RC2.</p>
<p>* Download, un-tar and move directory:</p>
<p class="command">cd /tmp</p>
<p>   wget http://download.berlios.de/z-push/z-push-1.3RC2.tar.gz<br />
   tar zxf z-push-1.3RC2.tar.gz<br />
mv z-push /var/clients/client1/web1/web/</p>
<p>* Edit the <span class="system">z-push/config.php</span> file.</p>
<p class="command"> cd /var/clients/client1/web1/web/z-push</p>
<p>nano config.php</p>
<p>- Make sure that <span class="system">date_default_timezone_set</span> (line 14) is set to your time zone.<br />
- Set <span class="system">$BACKEND_PROVIDER</span> to <span class="system">BackendIMAP</span> (line 49).</p>
<p>* Remove the file <span class="system">backend/ics.php</span>:</p>
<p class="command">rm /var/clients/client1/web1/web/z-push/backend/ics.php</p>
<p>* Make sure that directory <span class="system">z-push/state</span> is writable for your webserver:</p>
<p class="command">chmod 777 /var/clients/client1/web1/web/z-push/state</p>
<p>* Create a <span class="system">.htaccess</span> file:</p>
<p class="command">nano .htaccess</p>
<p>And add this to it:</p>
<pre>php_flag magic_quotes_gpc off
php_flag register_globals off
php_flag magic_quotes_runtime off
php_flag short_open_tag on</pre>
<p>You can also add the above to the <span class="system">Apache Directives</span> field in ISPconfig3.</p>
<p>* Add <span class="system">Alias /Microsoft-Server-ActiveSync /var/clients/client1/web1/web/z-push/index.php</span> to your <span class="system">httpd.conf</span>:</p>
<p class="command">cd /etc/apache2/<br />
nano httpd.conf</p>
<p>At the end of <span class="system">httpd.conf</span> add:</p>
<pre>Alias /Microsoft-Server-ActiveSync /var/clients/client1/web1/web/z-push/index.php</pre>
<p>* Restart Apache:</p>
<p class="command">/etc/init.d/apache2 restart</p>
<p>* Set website PHP mode to: Mod-PHP</p>
<p>Log in to ISPconfig3 and go the the tab <span class="system">Sites &gt; Domain</span>. Now select the website that you are installing z-push to, and set PHP to <span class="system">Mod-PHP</span>. When done click <span class="system">Save</span>.</p>
<p>Now go to <span class="system">www.your-website.com/Microsoft-Server-ActiveSync</span>, and with a bit of luck you will get a login popup screen. Use the email address and password from an IMAP user account. After this you will get an error:</p>
<p class="system">GET not supported<br />
This is the z-push location and can only be accessed by Microsoft ActiveSync-capable devices.</p>
<p>This error is correct, as you are accessing the z-push by web browser. All you need to do now is set up your mobile phone, and you&#8217;ve got push working!<br />
  The URL of the server to use in your mobile phone will be <span class="system">www.your-website.com</span>. You do not need to add <span class="system">z-push</span> or <span class="system">Microsoft-Server-ActiveSync</span>.</p>
<p>If you are having problems, than you can create a <span class="system">debug.txt</span> in the root directory of z-push. The <span class="system">debug.txt</span> will log all activity, and give you a lot of extra info to find the problem(s).</p>
<p class="command">touch /var/clients/client1/web1/web/z-push/debug.txt<br />
chmod 777 /var/clients/client1/web1/web/z-push/debug.txt</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://cum-sa.com/articole/vboxheadless-running-virtual-machines-with-virtualbox-3-1-x-on-a-headless-debian-lenny-server/" rel="bookmark" class="crp_title">VBoxHeadless &#8211; Running Virtual Machines With VirtualBox 3.1.x On A Headless Debian Lenny Server</a></li><li><a href="http://cum-sa.com/articole/how-to-set-up-apache2-with-mod_fcgid-and-php5-on-ubuntu-8-10/" rel="bookmark" class="crp_title">How To Set Up Apache2 With mod_fcgid And PHP5 On Ubuntu 8.10</a></li><li><a href="http://cum-sa.com/articole/installing-php-5-3-nginx-and-php-fpm-on-ubuntudebian/" rel="bookmark" class="crp_title">Installing PHP 5.3, Nginx And PHP-fpm On Ubuntu/Debian</a></li><li><a href="http://cum-sa.com/articole/server-monitoring-with-munin-and-monit-on-debian-lenny/" rel="bookmark" class="crp_title">Server Monitoring With munin And monit On Debian Lenny</a></li><li><a href="http://cum-sa.com/articole/project-natal-for-xbox-360/" rel="bookmark" class="crp_title">Project Natal for XBOX 360</a></li></ul></div>1000 Vizualizari.]]></content:encoded>
			<wfw:commentRss>http://cum-sa.com/articole/how-to-install-z-push-on-an-ispconfig-3-server-debian-lenny/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How To Set Up Apache2 With mod_fcgid And PHP5 On Ubuntu 8.10</title>
		<link>http://cum-sa.com/articole/how-to-set-up-apache2-with-mod_fcgid-and-php5-on-ubuntu-8-10/</link>
		<comments>http://cum-sa.com/articole/how-to-set-up-apache2-with-mod_fcgid-and-php5-on-ubuntu-8-10/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 21:59:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[English tutorials]]></category>
		<category><![CDATA[apache with fast cgi]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://cum-sa.com/?p=440</guid>
		<description><![CDATA[This tutorial describes how you can install Apache2 with mod_fcgid and PHP5 on Ubuntu 8.10. mod_fcgid is a compatible alternative to the older mod_fastcgi. It lets you execute PHP scripts with the permissions of their owners instead of the Apache user. I do not issue any guarantee that this will work for you! &#160; 1 [...]]]></description>
			<content:encoded><![CDATA[<p>This tutorial describes how you can install Apache2 with mod_fcgid and PHP5 on Ubuntu 8.10. mod_fcgid is a compatible alternative to the older mod_fastcgi. </p>
<p> It lets you execute PHP scripts with the permissions of their owners instead of the Apache user.</p>
<p>I do not issue any guarantee that this will work for you!</p>
<p>&nbsp;</p>
<h3>1 Preliminary Note </h3>
<p>I&#8217;m using an Ubuntu 8.10 server in this tutorial with the hostname <span class="system">server1.example.com</span> and the IP address <span class="system">192.168.0.100</span>.</p>
<p>I will create two Apache vhosts in this tutorial, <span class="system">www.example1.com</span> and <span class="system">www.example2.com</span>, to demonstrate the usage of mod_fcgid. </p>
<p>Make sure you&#8217;re logged in as root:</p>
<p class="command">sudo su</p>
<p><span class="system">/bin/sh</span> is a symlink to <span class="system">/bin/dash</span>, however we need <span class="system">/bin/bash</span>, not <span class="system">/bin/dash</span>. Therefore we do this: </p>
<p class="command">ln -sf /bin/bash /bin/sh </p>
<p>In addition to that, we must disable AppArmor:</p>
<p class="command">/etc/init.d/apparmor stop<br />
  update-rc.d -f apparmor remove<br />
apt-get remove apparmor apparmor-utils   </p>
<p>&nbsp;</p>
<h3>2 Installing Apache2/mod_fcgi/PHP5</h3>
<p>In order to install Apache2, mod_fcgid, and PHP5, run</p>
<p class="command">apt-get install apache2 apache2-suexec libapache2-mod-fcgid php5-cgi</p>
<p>If Apache2 was already installed with PHP5 as an Apache module, disable the PHP5 module now:</p>
<p class="command">a2dismod php5</p>
<p>Then enable the following modules&#8230;</p>
<p class="command">a2enmod rewrite<br />
  a2enmod suexec<br />
  a2enmod include<br />
a2enmod fcgid</p>
<p>&#8230; and open <span class="system">/etc/php5/cgi/php.ini</span>:</p>
<p class="command">vi /etc/php5/cgi/php.ini</p>
<p> Add the line <span class="system">cgi.fix_pathinfo = 1</span> right at the end of the file: </p>
<table class="" align="center" bgcolor="#cccccc" border="1" bordercolor="#000000" cellpadding="2" cellspacing="0" width="90%">
<tbody>
<tr>
<td class="">
<pre>[...]
cgi.fix_pathinfo = 1</pre>
</td>
</tr>
</tbody>
</table>
<p>Then reload Apache:</p>
<p class="command">/etc/init.d/apache2 force-reload</p>
<p>&nbsp;</p>
<h3>3 Creating Vhosts For www.example1.com And www.example2.com</h3>
<p>I will now create two vhosts, <span class="system">www.example1.com</span> (with the document root <span class="system">/var/www/web1/web</span>) and <span class="system">www.example2.com</span> (with the document root <span class="system">/var/www/web2/web</span>). <span class="system">www.example1.com</span> will be owned by the user and group <span class="system">web1</span>, and <span class="system">www.example2.com</span> by the user and group <span class="system">web2</span>.</p>
<p>First we create the users and groups:</p>
<p class="command">groupadd web1<br />
  groupadd web2<br />
  useradd -s /bin/false -d /var/www/web1 -m -g web1 web1<br />
useradd -s /bin/false -d /var/www/web2 -m -g web2 web2</p>
<p>Then we create the document roots and make them owned by the users/groups <span class="system">web1</span> resp. <span class="system">web2</span>:</p>
<p class="command">mkdir -p /var/www/web1/web<br />
  chown web1:web1 /var/www/web1/web<br />
  mkdir -p /var/www/web2/web<br />
chown web2:web2 /var/www/web2/web</p>
<p>We will run PHP using suExec; suExec&#8217;s document root is <span class="system">/var/www</span>, as the following command shows:</p>
<p class="command"> /usr/lib/apache2/suexec -V</p>
<p class="system">root@server1:~#&nbsp;/usr/lib/apache2/suexec&nbsp;-V<br />
&nbsp;-D&nbsp;AP_DOC_ROOT=&#8221;/var/www&#8221;<br />
&nbsp;-D&nbsp;AP_GID_MIN=100<br />
&nbsp;-D&nbsp;AP_HTTPD_USER=&#8221;www-data&#8221;<br />
&nbsp;-D&nbsp;AP_LOG_EXEC=&#8221;/var/log/apache2/suexec.log&#8221;<br />
&nbsp;-D&nbsp;AP_SAFE_PATH=&#8221;/usr/local/bin:/usr/bin:/bin&#8221;</p>
<p>&nbsp;-D&nbsp;AP_UID_MIN=100<br />
&nbsp;-D&nbsp;AP_USERDIR_SUFFIX=&#8221;public_html&#8221;<br />
root@server1:~#</p>
<p>Therefore we cannot call the PHP binary (<span class="system">/usr/lib/cgi-bin/php</span>) directly because it is located outside suExec&#8217;s document root. As suExec does not allow symlinks, the only way to solve the problem is to create a wrapper script for each web site in a subdirectory of <span class="system">/var/www</span>; the wrapper script will then call the PHP binary <span class="system">/usr/lib/cgi-bin/php</span>. The wrapper script must be owned by the user and group of each web site, therefore we need one wrapper script for each web site. I&#8217;m going to create the wrapper scripts in subdirectories of <span class="system">/var/www/php-fcgi-scripts</span>, e.g. <span class="system">/var/www/php-fcgi-scripts/web1</span> and <span class="system">/var/www/php-fcgi-scripts/web2</span>.</p>
<p class="command">mkdir -p /var/www/php-fcgi-scripts/web1<br />
mkdir -p /var/www/php-fcgi-scripts/web2</p>
<p class="command">vi /var/www/php-fcgi-scripts/web1/php-fcgi-starter</p>
<table class="" align="center" bgcolor="#cccccc" border="1" bordercolor="#000000" cellpadding="2" cellspacing="0" width="90%">
<tbody>
<tr>
<td class="">
<pre>#!/bin/sh
PHPRC=/etc/php5/cgi/
export PHPRC
export PHP_FCGI_MAX_REQUESTS=5000
export PHP_FCGI_CHILDREN=8
exec /usr/lib/cgi-bin/php</pre>
</td>
</tr>
</tbody>
</table>
<p class="command">vi /var/www/php-fcgi-scripts/web2/php-fcgi-starter</p>
<table class="" align="center" bgcolor="#cccccc" border="1" bordercolor="#000000" cellpadding="2" cellspacing="0" width="90%">
<tbody>
<tr>
<td class="">
<pre>#!/bin/sh
PHPRC=/etc/php5/cgi/
export PHPRC
export PHP_FCGI_MAX_REQUESTS=5000
export PHP_FCGI_CHILDREN=8
exec /usr/lib/cgi-bin/php</pre>
</td>
</tr>
</tbody>
</table>
<p>The <span class="system">PHPRC</span> line contains the directory where the <span class="system">php.ini</span> file is located (i.e., <span class="system">/etc/php5/cgi/</span> translates to <span class="system">/etc/php5/cgi/php.ini</span>). <span class="system">PHP_FCGI_MAX_REQUESTS</span> is the maximum number of requests before an fcgid process is stopped and a new one is launched. <span class="system">PHP_FCGI_CHILDREN</span> defines the number of PHP children that will be launched.</p>
<p>The <span class="system">php-fcgi-starter</span> scripts must be executable, and they (and the directories they are in) must be owned by the web site&#8217;s user and group:</p>
<p class="command">chmod 755 /var/www/php-fcgi-scripts/web1/php-fcgi-starter<br />
  chmod 755 /var/www/php-fcgi-scripts/web2/php-fcgi-starter<br />
  chown -R web1:web1 /var/www/php-fcgi-scripts/web1<br />
chown -R web2:web2 /var/www/php-fcgi-scripts/web2</p>
<p>Now we create the Apache vhosts for <span class="system">www.example1.com</span> and <span class="system">www.example2.com</span>:</p>
<p class="command">vi /etc/apache2/sites-available/web1</p>
<table class="" align="center" bgcolor="#cccccc" border="1" bordercolor="#000000" cellpadding="2" cellspacing="0" width="90%">
<tbody>
<tr>
<td class="">
<pre>&lt;VirtualHost *:80&gt;
  ServerName www.example1.com
  ServerAlias example1.com
  ServerAdmin webmaster@example1.com
  DocumentRoot /var/www/web1/web/

  &lt;IfModule mod_fcgid.c&gt;
    SuexecUserGroup web1 web1
    PHP_Fix_Pathinfo_Enable 1
    &lt;Directory /var/www/web1/web/&gt;

      Options +ExecCGI
      AllowOverride All
      AddHandler fcgid-script .php
      FCGIWrapper /var/www/php-fcgi-scripts/web1/php-fcgi-starter .php
      Order allow,deny
      Allow from all
    &lt;/Directory&gt;
  &lt;/IfModule&gt;

  # ErrorLog /var/log/apache2/error.log
  # CustomLog /var/log/apache2/access.log combined
  ServerSignature Off

&lt;/VirtualHost&gt;</pre>
</td>
</tr>
</tbody>
</table>
<p class="command">a2ensite web1</p>
<p class="command">vi /etc/apache2/sites-available/web2</p>
<table class="" align="center" bgcolor="#cccccc" border="1" bordercolor="#000000" cellpadding="2" cellspacing="0" width="90%">
<tbody>
<tr>
<td class="">
<pre>&lt;VirtualHost *:80&gt;
  ServerName www.example2.com
  ServerAlias example2.com
  ServerAdmin webmaster@example2.com
  DocumentRoot /var/www/web2/web/

  &lt;IfModule mod_fcgid.c&gt;
    SuexecUserGroup web2 web2
    PHP_Fix_Pathinfo_Enable 1
    &lt;Directory /var/www/web2/web/&gt;

      Options +ExecCGI
      AllowOverride All
      AddHandler fcgid-script .php
      FCGIWrapper /var/www/php-fcgi-scripts/web2/php-fcgi-starter .php
      Order allow,deny
      Allow from all
    &lt;/Directory&gt;
  &lt;/IfModule&gt;

  # ErrorLog /var/log/apache2/error.log
  # CustomLog /var/log/apache2/access.log combined
  ServerSignature Off

&lt;/VirtualHost&gt;</pre>
</td>
</tr>
</tbody>
</table>
<p class="command">a2ensite web2</p>
<p>Make sure you fill in the right paths (and the correct user and group in the <span class="system">SuexecUserGroup</span> line).  </p>
<p>Reload Apache afterwards:</p>
<p class="command">/etc/init.d/apache2 reload</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://cum-sa.com/articole/how-to-install-z-push-on-an-ispconfig-3-server-debian-lenny/" rel="bookmark" class="crp_title">How To Install Z-Push On An ISPConfig 3 Server (Debian Lenny)</a></li><li><a href="http://cum-sa.com/articole/server-monitoring-with-munin-and-monit-on-debian-lenny/" rel="bookmark" class="crp_title">Server Monitoring With munin And monit On Debian Lenny</a></li><li><a href="http://cum-sa.com/articole/installing-php-5-3-nginx-and-php-fpm-on-ubuntudebian/" rel="bookmark" class="crp_title">Installing PHP 5.3, Nginx And PHP-fpm On Ubuntu/Debian</a></li><li><a href="http://cum-sa.com/articole/vboxheadless-running-virtual-machines-with-virtualbox-3-1-x-on-a-headless-debian-lenny-server/" rel="bookmark" class="crp_title">VBoxHeadless &#8211; Running Virtual Machines With VirtualBox 3.1.x On A Headless Debian Lenny Server</a></li><li><a href="http://cum-sa.com/articole/project-natal-for-xbox-360/" rel="bookmark" class="crp_title">Project Natal for XBOX 360</a></li></ul></div>858 Vizualizari.]]></content:encoded>
			<wfw:commentRss>http://cum-sa.com/articole/how-to-set-up-apache2-with-mod_fcgid-and-php5-on-ubuntu-8-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Instalare ProFTP cu suport MySQL pe *.deb</title>
		<link>http://cum-sa.com/articole/instalare-proftp-cu-suport-mysql-pe-deb/</link>
		<comments>http://cum-sa.com/articole/instalare-proftp-cu-suport-mysql-pe-deb/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 21:40:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutoriale]]></category>
		<category><![CDATA[install proftp]]></category>
		<category><![CDATA[php-mysql]]></category>
		<category><![CDATA[proftp mysql]]></category>

		<guid isPermaLink="false">http://cum-sa.com/?p=431</guid>
		<description><![CDATA[Presupunand ca avem deja instalat PHP5 cu suport pentru MySQL (Gasiti tutorialul de instalare pe situl http://auto-scripts.com) putem incepe procedura de instalare a clientului FTP (in acest caz ProFTP) cu suport MySQL. 1. De ce instalam cu suport MySQL? Deoarece in acest fel putem realiza un numar infinit de conturi FTP virtuale, putem schimba parolele [...]]]></description>
			<content:encoded><![CDATA[<p>Presupunand ca avem deja instalat PHP5 cu suport pentru MySQL (Gasiti tutorialul de instalare pe situl http://auto-scripts.com) putem incepe procedura de instalare a clientului FTP (in acest caz ProFTP) cu suport MySQL.</p>
<p><em><strong>1. De ce instalam cu suport MySQL? </strong></em><br />
Deoarece in acest fel putem realiza un numar infinit de conturi FTP virtuale, putem schimba parolele extrem de simplu, putem crea limita de trafic (Trafic Quota) sau limita de spatiu pe disk (Disk Quota), practic nu exista limita de extensibilitate.</p>
<p><strong>2. De ce am nevoie pentru a putea configura ProFTP cu conturi virtuale?</strong><br />
ProFTP-ul implicit (instalat cu comand <strong>apt-get install proftpd</strong>) nu contine si modulul pentru Virtual FTP, acesta trebuind instalat cu comanda:<br />
<code>apt-get install proftpd-mysql</code><br />
Sau<br />
<code>apt-get install proftpd-mod-mysql</code><br />
La instalare ne va aparea o intrebare de genul:<br />
<code>Run proftpd from inetd or standalone?</code><br />
Selectam <em>standalone </em>.</p>
<p><strong>3. Ok, am instalat programul, si acum?</strong><br />
Dupa instalarea propriu-zisa, urmeaza configurarea ProFTP.<br />
Avem nevoie de un utilizator si un grup pe care va rula daemon-ul ProFTP:<br />
<code>groupadd -g 5500 ftpgroup<br />
useradd -u 5500 -s /bin/false -d /bin/null -c "proftpd user" -g ftpgroup ftpuser</code><br />
Urmeaza sa cream baza de date <strong>ftp</strong> cu numele de utilizator <strong>proftp</strong> si parola <strong>PAROLA</strong> (Aici modificati dupa bunul plac) unde vor fi stocate numele de utilizatori si parolele:<br />
<code><br />
mysql -u root -p<br />
create database ftp;<br />
GRANT SELECT, INSERT, UPDATE, DELETE ON ftp.* TO 'proftpd'@'localhost' IDENTIFIED BY 'PAROLA';<br />
GRANT SELECT, INSERT, UPDATE, DELETE ON ftp.* TO 'proftpd'@'localhost.localdomain' IDENTIFIED BY 'PAROLA';<br />
FLUSH PRIVILEGES;<br />
</code><br />
Dupa crearea bazei de date, trecem la adaugarea tabelelor in care vor fi stocate informatiile:<br />
<code>USE ftp;</p>
<p>CREATE TABLE ftpgroup (<br />
groupname varchar(16) NOT NULL default '',<br />
gid smallint(6) NOT NULL default '5500',<br />
members varchar(16) NOT NULL default '',<br />
KEY groupname (groupname)<br />
) TYPE=MyISAM COMMENT='ProFTP group table';</p>
<p>CREATE TABLE ftpquotalimits (<br />
name varchar(30) default NULL,<br />
quota_type enum('user','group','class','all') NOT NULL default 'user',<br />
per_session enum('false','true') NOT NULL default 'false',<br />
limit_type enum('soft','hard') NOT NULL default 'soft',<br />
bytes_in_avail int(10) unsigned NOT NULL default '0',<br />
bytes_out_avail int(10) unsigned NOT NULL default '0',<br />
bytes_xfer_avail int(10) unsigned NOT NULL default '0',<br />
files_in_avail int(10) unsigned NOT NULL default '0',<br />
files_out_avail int(10) unsigned NOT NULL default '0',<br />
files_xfer_avail int(10) unsigned NOT NULL default '0'<br />
) TYPE=MyISAM;</p>
<p>CREATE TABLE ftpquotatallies (<br />
name varchar(30) NOT NULL default '',<br />
quota_type enum('user','group','class','all') NOT NULL default 'user',<br />
bytes_in_used int(10) unsigned NOT NULL default '0',<br />
bytes_out_used int(10) unsigned NOT NULL default '0',<br />
bytes_xfer_used int(10) unsigned NOT NULL default '0',<br />
files_in_used int(10) unsigned NOT NULL default '0',<br />
files_out_used int(10) unsigned NOT NULL default '0',<br />
files_xfer_used int(10) unsigned NOT NULL default '0'<br />
) TYPE=MyISAM;</p>
<p>CREATE TABLE ftpuser (<br />
id int(10) unsigned NOT NULL auto_increment,<br />
userid varchar(32) NOT NULL default '',<br />
passwd varchar(32) NOT NULL default '',<br />
uid smallint(6) NOT NULL default '5500',<br />
gid smallint(6) NOT NULL default '5500',<br />
homedir varchar(255) NOT NULL default '',<br />
shell varchar(16) NOT NULL default '/sbin/nologin',<br />
count int(11) NOT NULL default '0',<br />
accessed datetime NOT NULL default '0000-00-00 00:00:00',<br />
modified datetime NOT NULL default '0000-00-00 00:00:00',<br />
PRIMARY KEY (id),<br />
UNIQUE KEY userid (userid)<br />
) TYPE=MyISAM COMMENT='ProFTP user table';</p>
<p>quit;</code><br />
Dupa crearea bazei de date urmeaza sa configuram ProFTP sa foloseasca aceasta baza de date:<br />
<code><br />
DefaultRoot ~</p>
<p># The passwords in MySQL are encrypted using CRYPT<br />
SQLAuthTypes            Plaintext Crypt<br />
SQLAuthenticate         users* groups*</p>
<p># used to connect to the database<br />
# databasename@host database_user user_password<br />
SQLConnectInfo  ftp@localhost proftpd PAROLA</p>
<p># Here we tell ProFTPd the names of the database columns in the "usertable"<br />
# we want it to interact with. Match the names with those in the db<br />
SQLUserInfo     ftpuser userid passwd uid gid homedir shell</p>
<p># Here we tell ProFTPd the names of the database columns in the "grouptable"<br />
# we want it to interact with. Again the names match with those in the db<br />
SQLGroupInfo    ftpgroup groupname gid members</p>
<p># set min UID and GID - otherwise these are 999 each<br />
SQLMinID        500</p>
<p># create a user's home directory on demand if it doesn't exist<br />
SQLHomedirOnDemand on</p>
<p># Update count every time user logs in<br />
SQLLog PASS updatecount<br />
SQLNamedQuery updatecount UPDATE "count=count+1, accessed=now() WHERE userid='%u'" ftpuser</p>
<p># Update modified everytime user uploads or deletes a file<br />
SQLLog  STOR,DELE modified<br />
SQLNamedQuery modified UPDATE "modified=now() WHERE userid='%u'" ftpuser</p>
<p># User quotas<br />
# ===========<br />
QuotaEngine on<br />
QuotaDirectoryTally on<br />
QuotaDisplayUnits Mb<br />
QuotaShowQuotas on</p>
<p>SQLNamedQuery get-quota-limit SELECT "name, quota_type, per_session, limit_type, bytes_in_avail, bytes_out_avail, bytes_xfer_avail, files_in_avail, files_out_avail, files_xfer_avail FROM ftpquotalimits WHERE name = '%{0}' AND quota_type = '%{1}'"</p>
<p>SQLNamedQuery get-quota-tally SELECT "name, quota_type, bytes_in_used, bytes_out_used, bytes_xfer_used, files_in_used, files_out_used, files_xfer_used FROM ftpquotatallies WHERE name = '%{0}' AND quota_type = '%{1}'"</p>
<p>SQLNamedQuery update-quota-tally UPDATE "bytes_in_used = bytes_in_used + %{0}, bytes_out_used = bytes_out_used + %{1}, bytes_xfer_used = bytes_xfer_used + %{2}, files_in_used = files_in_used + %{3}, files_out_used = files_out_used + %{4}, files_xfer_used = files_xfer_used + %{5} WHERE name = '%{6}' AND quota_type = '%{7}'" ftpquotatallies</p>
<p>SQLNamedQuery insert-quota-tally INSERT "%{0}, %{1}, %{2}, %{3}, %{4}, %{5}, %{6}, %{7}" ftpquotatallies</p>
<p>QuotaLimitTable sql:/get-quota-limit<br />
QuotaTallyTable sql:/get-quota-tally/update-quota-tally/insert-quota-tally</p>
<p>RootLogin off<br />
RequireValidShell off</code></p>
<p>Nu uitati sa inlocuiti <strong>PAROLA</strong> cu adevarata parola.</p>
<p>Daca doriti sa se primeasca un banner de forma:<br />
<code>Folosesti 20MB din 100MB. Ai 80MB spatiu disponibil</code><br />
adaugati la sfarsitul fisierului <strong>/etc/proftpd.conf</strong><br />
<code>SQLNamedQuery gettally  SELECT "ROUND((bytes_in_used/1048576),2) FROM ftpquotatallies WHERE name='%u'"<br />
SQLNamedQuery getlimit  SELECT "ROUND((bytes_in_avail/1048576),2) FROM ftpquotalimits WHERE name='%u'"<br />
SQLNamedQuery getfree   SELECT "ROUND(((ftpquotalimits.bytes_in_avail-ftpquotatallies.bytes_in_used)/1048576),2) FROM ftpquotalimits,ftpquotatallies WHERE ftpquotalimits.name = '%u' AND ftpquotatallies.name = '%u'"</p>
<p>SQLShowInfo   LIST    "226" "Folosesti %{gettally}MB din %{getlimit}MB. Ai %{getfree}MB spatiu disponibil."</code></p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://cum-sa.com/articole/server-monitoring-with-munin-and-monit-on-debian-lenny/" rel="bookmark" class="crp_title">Server Monitoring With munin And monit On Debian Lenny</a></li><li><a href="http://cum-sa.com/articole/invata-sa-creezi-php/" rel="bookmark" class="crp_title">Invata sa creezi PHP</a></li><li><a href="http://cum-sa.com/articole/coduri-gsm-folosite-in-general-pentru-devierea-apelulilor-si-alte-coduri/" rel="bookmark" class="crp_title">Coduri GSM folosite in general pentru devierea apelulilor si alte coduri</a></li><li><a href="http://cum-sa.com/articole/installing-php-5-3-nginx-and-php-fpm-on-ubuntudebian/" rel="bookmark" class="crp_title">Installing PHP 5.3, Nginx And PHP-fpm On Ubuntu/Debian</a></li><li><a href="http://cum-sa.com/articole/coduri-secrete-motorola/" rel="bookmark" class="crp_title">Coduri secrete Motorola</a></li></ul></div>559 Vizualizari.]]></content:encoded>
			<wfw:commentRss>http://cum-sa.com/articole/instalare-proftp-cu-suport-mysql-pe-deb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cum sa repari/citesti un CD sau DVD zgariat sau ars</title>
		<link>http://cum-sa.com/articole/cum_sa_faci_repari_citesti_un_cd_sau_dvd_zgariat_sau_ars/</link>
		<comments>http://cum-sa.com/articole/cum_sa_faci_repari_citesti_un_cd_sau_dvd_zgariat_sau_ars/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 05:33:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutoriale]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Related Posts:Cum sa te uiti la TV de pe calculatorCum sa pui 500 de teme pe un PSP sonyCum sa iti schimbi desktop-ul intr-o pagina web!Cum sa scoti un text dintr-o pozaCum sa scapi de ban-ul de pe steam, steam unban860 Vizualizari.]]></description>
			<content:encoded><![CDATA[<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="425" height="350"><param name="width" value="425" /><param name="height" value="350" /><param name="src" value="http://www.youtube.com/v/KzmfgY6ZFBA" /><embed type="application/x-shockwave-flash" width="425" height="350" src="http://www.youtube.com/v/KzmfgY6ZFBA"></embed></object></p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://cum-sa.com/articole/cum-sa-te-uiti-la-tv-de-pe-calculator/" rel="bookmark" class="crp_title">Cum sa te uiti la TV de pe calculator</a></li><li><a href="http://cum-sa.com/articole/cum-sa-pui-500-de-teme-pe-un-psp-sony/" rel="bookmark" class="crp_title">Cum sa pui 500 de teme pe un PSP sony</a></li><li><a href="http://cum-sa.com/articole/cum-sa-iti-schimbi-desktop-ul-intr-o-pagina-web/" rel="bookmark" class="crp_title">Cum sa iti schimbi desktop-ul intr-o pagina web!</a></li><li><a href="http://cum-sa.com/articole/cum-sa-scoti-un-text-dintr-o-poza/" rel="bookmark" class="crp_title">Cum sa scoti un text dintr-o poza</a></li><li><a href="http://cum-sa.com/articole/cum-sa-scapi-de-ban-ul-de-pe-steam-steam-unban/" rel="bookmark" class="crp_title">Cum sa scapi de ban-ul de pe steam, steam unban</a></li></ul></div>860 Vizualizari.]]></content:encoded>
			<wfw:commentRss>http://cum-sa.com/articole/cum_sa_faci_repari_citesti_un_cd_sau_dvd_zgariat_sau_ars/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Battlefield: Bad Company 2, superior pe PC</title>
		<link>http://cum-sa.com/articole/Battlefield-Bad-Company-2-superior-pe-PC/</link>
		<comments>http://cum-sa.com/articole/Battlefield-Bad-Company-2-superior-pe-PC/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 03:03:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<guid isPermaLink="false"></guid>
		<description><![CDATA[&#160; &#160; &#160;Battlefield Bad Company 2 &#160;Intr-o era in care jocurile pe PC au inceput sa devina niste simple portari ale versiunilor de consola (de multe ori neadaptate asa cum ar trebui posibilitatilor oferite de un computer), Battlefield: Bad Company 2 pare a fi o exceptie de la aceasta nefericita regula. Din trailerul de mai [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<p>&nbsp;</p>
<p><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 12px"><br />
<h3 style="font-size: 2em; text-decoration: none; font-family: Tahoma, Arial, Helvetica, Verdana, sans-serif; letter-spacing: -1px; line-height: 1em; font-weight: normal; padding-top: 10px; padding-right: 0px; padding-bottom: 10px; padding-left: 0px; color: #e27500; margin: 0px">&nbsp;Battlefield Bad Company 2</h3>
<p></span>
<p>&nbsp;<span class="Apple-style-span" style="font-size: large">In</span><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif"><span class="Apple-style-span" style="line-height: 19px"><span class="Apple-style-span" style="font-size: large">tr-o era in care jocurile pe PC au inceput sa devina niste simple portari ale versiunilor de consola (de multe ori neadaptate asa cum ar trebui posibilitatilor oferite de un computer), Battlefield: Bad Company 2 pare a fi o exceptie de la aceasta nefericita regula.</span></span></span></p>
<p style="margin-top: 7px; margin-bottom: 8px; line-height: 1.5em"><span class="Apple-style-span" style="font-size: large">Din trailerul de mai jos puteti afla ce avantaje va prezenta versiunea de PC a lui Battlefield: Bad Company 2 in fata rivalelor sale de pe console. Jocul este produs de DiCE si va fi publicat de Electronic Arts la inceputul lunii martie.</span></p>
<p style="text-align: center"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="425" height="350"><param name="src" value="http://www.youtube.com/v/XrLN_oqc8Vs" /><param name="width" value="425" /><param name="height" value="350" /><embed type="application/x-shockwave-flash" src="http://www.youtube.com/v/XrLN_oqc8Vs" width="425" height="350"></embed></object></p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://cum-sa.com/articole/project-natal-for-xbox-360/" rel="bookmark" class="crp_title">Project Natal for XBOX 360</a></li><li><a href="http://cum-sa.com/articole/cum-s-instalezi-un-antivirus-cu-liceen-gratuit/" rel="bookmark" class="crp_title">cum să instalezi un antivirus cu liceenţă gratuită</a></li><li><a href="http://cum-sa.com/articole/cum-s-instalai-modemurile-st-510-516-546-v4/" rel="bookmark" class="crp_title">Cum să instalaţi modemurile ST 510, 516/ 546 v.4</a></li><li><a href="http://cum-sa.com/articole/cum-sa-restrictionati-accesul-fisierelor-in-windows-xp/" rel="bookmark" class="crp_title">Cum sa restrictionati accesul fisierelor in windows xp</a></li><li><a href="http://cum-sa.com/articole/cum-sa-reactivam-fundalul-transparent-pentru-iconurile-de-pe-desktop-in-windows-xp/" rel="bookmark" class="crp_title">Cum sa reactivam fundalul transparent pentru iconurile de pe Desktop in Windows XP</a></li></ul></div>1005 Vizualizari.]]></content:encoded>
			<wfw:commentRss>http://cum-sa.com/articole/Battlefield-Bad-Company-2-superior-pe-PC/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Download si instalare Windows 7 in limba romana</title>
		<link>http://cum-sa.com/articole/download_si_instalare_windows_7_in_limba_romana/</link>
		<comments>http://cum-sa.com/articole/download_si_instalare_windows_7_in_limba_romana/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 20:43:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Descarcari]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Download link Pentru instalare: 1. Deschideti control panel si faceti click pe Change Display Challenge sub Clock, Language, and Region Box. Daca folositi Classic View, selectati Regional and Language Options. 2. Mergeti la &#8220;Keyboards and Languages&#8221; tab si faceti click pe Install/Uninstall Languages &#160; &#160; Navigati unde aveti salvat, si deschideti-l. Acum pachetul trebuie sa [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://download.windowsupdate.com/msdownload/update/software/updt/2009/08/windows6.1-kb972813-x86-ro-ro_e1c324236046eb608e478570cf4396776ff02a72.exe" target="_blank"><font size="2" color="#0000ff"><strong>Download link</strong></font></a></p>
<p>Pentru instalare: </p>
<p>1. Deschideti control panel si faceti click pe <em>Change Display Challenge</em> sub Clock, Language, and Region Box. Daca folositi Classic View, selectati <em>Regional and Language Options.</em></p>
<p><img src="http://img705.imageshack.us/img705/9286/controlpaneloption.jpg" border="0" alt="cum-sa.com" width="484" height="112" /> </p>
<p>2. Mergeti la &ldquo;Keyboards and Languages&rdquo; tab si faceti click pe <em>Install/Uninstall Languages</em></p>
<p>&nbsp;<img src="http://img10.imageshack.us/img10/3192/browsey.jpg" border="0" alt="cum-sa.com" width="474" height="136" /></p>
<p>&nbsp;</p>
<p>Navigati unde aveti salvat, si deschideti-l.</p>
<p>Acum pachetul trebuie sa va apare ca aici si apasati pe apply.(eu am folosit limba chineza.): </p>
<p><img src="http://img20.imageshack.us/img20/6089/select1.jpg" border="0" alt="cum-sa.com" width="451" height="521" /> </p>
<p>
<p>&nbsp;</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://cum-sa.com/articole/cum_sa_faci_o_retea_intre_2_sau_mai_multe_calculatoare_in_window/" rel="bookmark" class="crp_title">Cum sa faci o retea intre 2 sau mai multe calculatoare in Windows 7</a></li><li><a href="http://cum-sa.com/articole/cum_sa_activezi_windows_7/" rel="bookmark" class="crp_title">Cum sa activezi windows 7</a></li><li><a href="http://cum-sa.com/articole/cum-sa-setati-o-retea-mica-astfel-incat-sa-aveti-acces-la-imprimanta-si-fisiere/" rel="bookmark" class="crp_title">Cum sa Setati o retea mica, astfel incat sa aveti acces la imprimanta si fisiere</a></li><li><a href="http://cum-sa.com/articole/cum-sa-activezi-functia-hibernate-in-windows-7-si-vista/" rel="bookmark" class="crp_title">Cum sa activezi functia Hibernate in Windows 7 si Vista</a></li><li><a href="http://cum-sa.com/articole/tutorial-de-instalare-windows-xp/" rel="bookmark" class="crp_title">Tutorial de instalare windows xp</a></li></ul></div>2972 Vizualizari.]]></content:encoded>
			<wfw:commentRss>http://cum-sa.com/articole/download_si_instalare_windows_7_in_limba_romana/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

