<?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>johker's blog &#187; server</title>
	<atom:link href="http://johker.ibutho.de/tag/server/feed/" rel="self" type="application/rss+xml" />
	<link>http://johker.ibutho.de</link>
	<description>stories about me, my life, science and my trips</description>
	<lastBuildDate>Sat, 29 May 2010 10:00:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Der neue Server: Teil 8 Monitoring mit munin</title>
		<link>http://johker.ibutho.de/2009/04/04/der-neue-server-teil-8-monitoring-mit-munin/</link>
		<comments>http://johker.ibutho.de/2009/04/04/der-neue-server-teil-8-monitoring-mit-munin/#comments</comments>
		<pubDate>Sat, 04 Apr 2009 14:29:17 +0000</pubDate>
		<dc:creator>johker</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[client]]></category>
		<category><![CDATA[konfiguration]]></category>
		<category><![CDATA[mod_status]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[munin]]></category>
		<category><![CDATA[node]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[server-status]]></category>
		<category><![CDATA[system monitoring]]></category>

		<guid isPermaLink="false">http://johker.ibutho.de/?p=222</guid>
		<description><![CDATA[Munin ist ein Tool zum System-Monitoring, ist einfach in der Konfiguration, bietet eine Vielfalt an Plugins und stellt die Ergebnisse über ein Webinterface grafisch dar. Im folgenden wird die Installation und eine beispielhafte Basiskonfiguration geschildert. Munin hat die Möglichkeit Daten von mehreren Systemen zu sammeln und diese alle zentral zugänglich zu machen. Hier wird nur [...]]]></description>
			<content:encoded><![CDATA[<p><em>Munin</em> ist ein Tool zum System-Monitoring, ist einfach in der Konfiguration, bietet eine Vielfalt an Plugins und stellt die Ergebnisse über ein Webinterface grafisch dar. Im folgenden wird die Installation und eine beispielhafte Basiskonfiguration geschildert. <em>Munin</em> hat die Möglichkeit Daten von mehreren Systemen zu sammeln und diese alle zentral zugänglich zu machen. Hier wird nur darauf eingegangen Server und Client auf dem gleichen System zu installieren, doch die Erweiterung gestaltet sich sehr einfach und die Projekthomepage bietet mit ihrem Wiki eine gute Anlaufstelle für Fragen.</p>
<p>Installation:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> munin munin-node munin-plugins-extra</pre></div></div>

<p>Konfiguration:<br />
<em>/etc/munin/munin.conf</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>domain.tld<span style="color: #7a0874; font-weight: bold;">&#93;</span>
    address 127.0.0.1
    use_node_name <span style="color: #c20cb9; font-weight: bold;">yes</span></pre></div></div>

<p>Evtl. muss man auch die Variable "<em>htmldir</em>" anpassen.</p>
<p><em>/etc/munin/munin.conf</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#host *</span>
host 127.0.0.1</pre></div></div>

<p><em>Munin</em> aktualisiert die Daten in der Standardkonfiguration alle 5 Minuten, d.h. man muss evtl. etwas warten, bis die ersten Daten über die Weboberfläche verfügbar sind. Die Weboberfläche kann über die Adresse, die man in "<em>htmldir</em>" in der Datei <em>munin.conf</em> definiert hat, aufgerufen werden. Man kann/sollte dieses Verzeichnis passwortschützen, damit nicht jeder darauf zugreifen kann.</p>
<p>Falls man Ausschau nach weiteren Plugins hält, dann ist <a href="http://muninexchange.projects.linpro.no/?about" target="_blank">http://muninexchange.projects.linpro.no/?about</a> eine gute Anlaufstelle. Des Weiteren liegen unter "<em>/usr/share/munin/plugins/</em>" weitere Plugins, die man einfach nach "<em>/etc/munin/plugins</em>" linken kann und danach noch in "<em>/etc/munin/plugin-conf.d/munin-node</em>" konfigurieren kann.</p>
<h1>apache Plugin</h1>
<p>Damit das apache-Plugin funktioniert, muss <em>mod_status</em> aktiviert werden:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">a2enmod status</pre></div></div>

<p>Danach muss der Zugriff auf die Status-Seite aktiviert und geregelt werden:<br />
<em>/etc/apache2/mods-enabled/status.conf</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;</span>IfModule mod_status.c<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Allow server status reports generated by mod_status,</span>
<span style="color: #666666; font-style: italic;"># with the URL of http://servername/server-status</span>
<span style="color: #666666; font-style: italic;"># Uncomment and change the &quot;.example.com&quot; to allow</span>
<span style="color: #666666; font-style: italic;"># access from other hosts.</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #000000; font-weight: bold;">&lt;</span>Location <span style="color: #000000; font-weight: bold;">/</span>server-status<span style="color: #000000; font-weight: bold;">&gt;</span>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from localhost ip6-localhost
<span style="color: #666666; font-style: italic;">#    Allow from .example.com</span>
<span style="color: #000000; font-weight: bold;">&lt;/</span>Location<span style="color: #000000; font-weight: bold;">&gt;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;/</span>IfModule<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>Quellen:</p>
<p>http://www.debuntu.org/how-to-monitoring-a-server-with-munin</p>
<p>http://munin.projects.linpro.no/wiki/plugin-conf.d</p>
]]></content:encoded>
			<wfw:commentRss>http://johker.ibutho.de/2009/04/04/der-neue-server-teil-8-monitoring-mit-munin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Der neue Server: Teil 3 svn, mysql, postgres</title>
		<link>http://johker.ibutho.de/2009/03/20/der-neue-server-teil-3-svn-mysql-postgres/</link>
		<comments>http://johker.ibutho.de/2009/03/20/der-neue-server-teil-3-svn-mysql-postgres/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 15:29:35 +0000</pubDate>
		<dc:creator>johker</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[acid]]></category>
		<category><![CDATA[createuser]]></category>
		<category><![CDATA[dokumentation]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[konfiguration]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysql_secure_installation]]></category>
		<category><![CDATA[o'reilly]]></category>
		<category><![CDATA[pg_hba.conf]]></category>
		<category><![CDATA[phpMyAdmin]]></category>
		<category><![CDATA[phpPgAdmin]]></category>
		<category><![CDATA[postgres]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[postgresql.conf]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[rootforum]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[services]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[svnadmin]]></category>
		<category><![CDATA[telnet]]></category>
		<category><![CDATA[xinetd]]></category>

		<guid isPermaLink="false">http://johker.ibutho.de/?p=141</guid>
		<description><![CDATA[Mit diesem Beitrag beginnt nun eine kleine Reihe, wie man verschiedene Serverdienste installiert und konfiguriert. Angefangen wird mit dem Versionskontrollsystem svn (auch unter dem Namen subversion bekannt) und zwei verschiedenen Datenbanksystemen: mysql und postgreSQL.
subversion
SVN wird über den Internet-Superserver xinetd betrieben und hört standardmäßig auf Port 3690. Die Repositories samt ihrer Konfigurationsdateien werden später unter "/var/svn" [...]]]></description>
			<content:encoded><![CDATA[<p>Mit diesem Beitrag beginnt nun eine kleine Reihe, wie man verschiedene Serverdienste installiert und konfiguriert. Angefangen wird mit dem Versionskontrollsystem <em>svn</em> (auch unter dem Namen <em>subversion</em> bekannt) und zwei verschiedenen Datenbanksystemen: <em>mysql</em> und <em>postgreSQL</em>.</p>
<h1>subversion</h1>
<p>SVN wird über den Internet-Superserver <em>xinetd</em> betrieben und hört standardmäßig auf Port 3690. Die Repositories samt ihrer Konfigurationsdateien werden später unter "<em>/var/svn</em>" liegen und der Server wird unter dem Benutzer "<em>svn</em>" laufen.</p>
<p>Zunächst installieren wir xinetd und svn:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> xinetd subversion</pre></div></div>

<p>Danach erstellen wir den svn-Benutzer:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">adduser <span style="color: #660033;">--system</span> <span style="color: #660033;">--group</span> <span style="color: #660033;">--no-create-home</span> <span style="color: #c20cb9; font-weight: bold;">svn</span></pre></div></div>

<p>Jetzt registrieren wir Port 3690 für svn:</p>
<p><em>/etc/services</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Local services</span>
<span style="color: #c20cb9; font-weight: bold;">svn</span> <span style="color: #000000;">3690</span><span style="color: #000000; font-weight: bold;">/</span>tcp <span style="color: #666666; font-style: italic;"># subversion</span>
<span style="color: #c20cb9; font-weight: bold;">svn</span> <span style="color: #000000;">3690</span><span style="color: #000000; font-weight: bold;">/</span>udp <span style="color: #666666; font-style: italic;"># subversion</span></pre></div></div>

<p>... erstellen den Ordner "/var/svn":</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #c20cb9; font-weight: bold;">svn</span>: <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">755</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>... und konfigurieren xinetd, damit er auf Port 3690 Verbindungen für <em>svn</em> entgegennimmt und sie an den <em>svnserve</em>-Server weitergibt:</p>
<p><em>/etc/xinetd.d/svn</em></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># default: on</span>
<span style="color: #666666; font-style: italic;"># description: Subversion server process</span>
service <span style="color: #c20cb9; font-weight: bold;">svn</span>
<span style="color: #7a0874; font-weight: bold;">&#123;</span>
    disable             = no
    socket_type         = stream
    protocol            = tcp
    user                = <span style="color: #c20cb9; font-weight: bold;">svn</span>
    <span style="color: #7a0874; font-weight: bold;">wait</span>                = no
    port                = <span style="color: #000000;">3690</span>
    server              = <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">svnserve</span>
    server_args         = <span style="color: #660033;">-i</span> <span style="color: #660033;">-r</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

<p>Nun kann man mit dem <em>telnet</em>-Befehl von einem anderen Rechner aus testen, ob <em>svn</em> auf Port 3690 lauscht:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">telnet SERVER_IP <span style="color: #000000;">3690</span></pre></div></div>

<p>Die Ausgabe sollte dann so aussehn:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Trying SERVER_IP...
Connected to SERVER_IP.
Escape character is <span style="color: #ff0000;">'^]'</span>.
<span style="color: #7a0874; font-weight: bold;">&#40;</span> success <span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">2</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span> edit-pipeline svndiff1 absent-entries commit-revprops depth log-revprops partial-replay <span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#41;</span> Connection closed by foreign host.</pre></div></div>

<p>Mittels des <em>svnadmin</em>-Tools kann man nun Repositories anlegen, verändern, löschen, ...</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">svnadmin</span> create <span style="color: #660033;">--fs-type</span> fsfs <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span>testRepo</pre></div></div>

<p>Was man mit <em>svn</em> alles anstellen kann, wird hier sehr ausführlich beschrieben: <a href="http://svnbook.red-bean.com/" target="_blank">http://svnbook.red-bean.com/</a>. Dieses Buch ist wohl das Standardwerk, wenn es um <em>svn</em> geht und ein weiterer Stern am O'Reilly-Himmel und das Tollste ist: die Online-Version kostet nicht einmal was.</p>
<h1>mysql</h1>
<p>Man mag von <em>mysql</em> halten, was man will, doch es ist (leider) das Standard-Datenbanksystem für Web-Anwendungen (ein paar Gedanken zu <em>mysql</em> kann man <a href="http://forum.rootforum.de/viewtopic.php?f=104&#038;t=50167" target="_blank">hier</a> finden). Der Vorteil von <em>mysql</em> ist, dass es sehr einfach in der Installation und Handhabung ist, die Nachteile.... naja, findets selbst heraus.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> mysql-server</pre></div></div>

<p>Während der Installation wird man nach einem Passwort für den <em>mysql</em>-root Benutzer gefragt. Danach kann man ggf. noch die Konfiguration anpassen (liegt unter "<em>/etc/mysql/my.cnf</em>"). Ein gutes Beispiel für eine <em>mysql</em>-Konfiguration kann man hier finden: <a href="http://forum.rootforum.de/viewtopic.php?f=104&#038;t=36343" target="_blank">http://forum.rootforum.de/viewtopic.php?f=104&#038;t=36343</a>. Eine Anmerkung: wenn man die empfohlene Konfiguration auf <a href="http://forum.rootforum.de/" target="_blank">rootforum.de</a> benutzt und über phpMyAdmin auf die Datenbank zugreifen will, sollte man die Zeile "skip_show_database" auskommentieren, ansonsten sehen die Benutzer (root ausgenommen) ihre Datenbanken nicht.</p>
<p>Da wir nicht nur eine optimierte Installation, sondern auch eine sichere wollen, führen wir nun noch das "mysql_secure_installation"-Skript aus und beantworten alle Fragen, abgesehen von der über das <em>mysql</em>-root Passwort, mit der Standardantwort.</p>
<p>Quellen:</p>
<p><a href="http://forum.rootforum.de/viewtopic.php?f=104&#038;t=36343" target="_blank">http://forum.rootforum.de/viewtopic.php?f=104&#038;t=36343</a></p>
<h1>postgres</h1>
<p>Kommen wir zu einem richtigen Datenbanksystem: <em>postgres</em>. <em>postgres</em> ist ein freies, quelloffenes (open-source auf "Neudeutsch") Datenbanksystem, welches komplett ANSI-SQL92 konform ist (das kann manch kommerzielles Datenbanksystem nicht einmal von sich behaupten), unterstützt unter anderem ACID-Transaktionen und Stored Procedures und weitere fortgeschrittene Datenbank-Konzepte. Es erfreut sich einer immer größer werdenden Beliebtheit und löst <em>mysql</em> in vielen Gebieten ab. Dennoch will ich hier nicht zu viel Werbung machen. Jeder sollte sich selbst Gedanken über das Datenbanksystem machen, das er einsetzt und warum er es einsetzt. Doch wenn man ein Projekt hochziehen will, bei dem man auf fortschrittliche Datenbank-Konzepte zurückgreift, bleiben im open-source Umfeld nicht viele Lösungen übrig.<br />
Die Installation gestaltet sich ähnlich einfach wie bei <em>mysql</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> postgresql-<span style="color: #000000;">8.3</span></pre></div></div>

<p>Die Konfiguration gestaltet sich etwas anders als die von <em>mysql</em>. Sie ist im wesentlichen mehr an Oracle angelehnt. Über die Datei "pg_hba.conf" kann man Zugriffsrechte vergeben. Wenn man einen Benutzer anlegt, wird standardmäßig auch eine Datenbank mit dem selben Namen erstellt, autoincrement-Werte werden etwas anders definiert als bei <em>mysql</em>, des Weiteren heißen einige Datentypen geringfügig anders, doch die postgres-Dokumentation hilft hier weiter: <a href="http://www.postgresql.org/docs/current/static/" target="_blank">http://www.postgresql.org/docs/current/static/</a>.<br />
Beispielhaft hier noch Code, wie man einen Benutzer anlegen kann:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">su</span> - postgres
createuser <span style="color: #660033;">-P</span></pre></div></div>

<p>Danach wird man nach dem Passwort und der Benutzerrolle gefragt und man kann mit folgendem Code auf die postgres-Konsole zugreifen:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">psql <span style="color: #660033;">-W</span> <span style="color: #000000; font-weight: bold;">&lt;</span>Tabellenname<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>In einem weiteren Teil gehe ich dann darauf ein, wie man phpMyAdmin und phpPgAdmin einrichtet.</p>
]]></content:encoded>
			<wfw:commentRss>http://johker.ibutho.de/2009/03/20/der-neue-server-teil-3-svn-mysql-postgres/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Der neue Server: Teil 2 System härten</title>
		<link>http://johker.ibutho.de/2009/03/18/der-neue-server-teil-2-system-harten/</link>
		<comments>http://johker.ibutho.de/2009/03/18/der-neue-server-teil-2-system-harten/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 19:04:38 +0000</pubDate>
		<dc:creator>johker</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[absichern]]></category>
		<category><![CDATA[aide]]></category>
		<category><![CDATA[bastille]]></category>
		<category><![CDATA[benachrichtigung]]></category>
		<category><![CDATA[check]]></category>
		<category><![CDATA[chkrootkit]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[dienst]]></category>
		<category><![CDATA[DoS]]></category>
		<category><![CDATA[fail2ban]]></category>
		<category><![CDATA[fcheck]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[forkbomb]]></category>
		<category><![CDATA[freiheit]]></category>
		<category><![CDATA[gestapo]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[hacker]]></category>
		<category><![CDATA[hardening]]></category>
		<category><![CDATA[härten]]></category>
		<category><![CDATA[hash]]></category>
		<category><![CDATA[IDS]]></category>
		<category><![CDATA[innenminister]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[jail]]></category>
		<category><![CDATA[kompromiss]]></category>
		<category><![CDATA[lenny]]></category>
		<category><![CDATA[limits.conf]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[nessus]]></category>
		<category><![CDATA[netstat]]></category>
		<category><![CDATA[nmap]]></category>
		<category><![CDATA[nodev]]></category>
		<category><![CDATA[noexec]]></category>
		<category><![CDATA[nosuid]]></category>
		<category><![CDATA[overflow]]></category>
		<category><![CDATA[passwd]]></category>
		<category><![CDATA[port]]></category>
		<category><![CDATA[rkhunter]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[rootkit]]></category>
		<category><![CDATA[schäuble]]></category>
		<category><![CDATA[security by obscurity]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[service]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[sicherheit]]></category>
		<category><![CDATA[sshd]]></category>
		<category><![CDATA[sshd_config]]></category>
		<category><![CDATA[stasi]]></category>
		<category><![CDATA[test]]></category>
		<category><![CDATA[tmp]]></category>
		<category><![CDATA[tripwire]]></category>
		<category><![CDATA[whitelist]]></category>

		<guid isPermaLink="false">http://johker.ibutho.de/?p=114</guid>
		<description><![CDATA[Wenn man einen Server betreibt, dann legt man normalerweise auch Wert auf Sicherheit (wenn nicht, dann diesen Abschnitt einfach überspringen). Hier zeige ich einige Mittel und Wege auf einen Server sicherer zu machen. Die Liste ist sicherlich nicht komplett und wird es wohl auch nie werden und selbst wenn ihr alles unternehmt, was ich hier [...]]]></description>
			<content:encoded><![CDATA[<p>Wenn man einen Server betreibt, dann legt man normalerweise auch Wert auf Sicherheit (wenn nicht, dann diesen Abschnitt einfach überspringen). Hier zeige ich einige Mittel und Wege auf einen Server sicherer zu machen. Die Liste ist sicherlich nicht komplett und wird es wohl auch nie werden und selbst wenn ihr alles unternehmt, was ich hier aufführe, kann euer System immer noch gehackt werden - totale Sicherheit gibt es nicht - also schiebt die Schuld nicht auf mich, wenn euer System gehackt wurde. Und vor allem: <strong>installiert</strong> euer System komplett <strong>neu</strong>, wenn ihr <strong>gehackt</strong> wurdet!</p>
<h1>Verzeichnisse härten</h1>
<p>Das <em>/tmp</em>-Verzeichnis ist oft ein Einfalltor für Angreifer, deshalb werden wir dieses nun absichern. Zusätzlich wollen wir auch die Verzeichnisse <em>/var</em> und <em>/home</em> besser schützen, ... sowie <em>/</em> bei Fehlern read-only mounten:</p>
<p><em>/etc/fstab</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">proc <span style="color: #000000; font-weight: bold;">/</span>proc proc defaults <span style="color: #000000;">0</span> <span style="color: #000000;">0</span>
none <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>pts devpts <span style="color: #007800;">gid</span>=<span style="color: #000000;">5</span>,<span style="color: #007800;">mode</span>=<span style="color: #000000;">620</span> <span style="color: #000000;">0</span> <span style="color: #000000;">0</span>
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>md0 <span style="color: #000000; font-weight: bold;">/</span>boot ext2 defaults <span style="color: #000000;">0</span> <span style="color: #000000;">0</span>
<span style="color: #666666; font-style: italic;"># /dev/md1 belongs to LVM volume group 'vg0'</span>
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>vg0<span style="color: #000000; font-weight: bold;">/</span>root  <span style="color: #000000; font-weight: bold;">/</span>  ext3  defaults,<span style="color: #007800;">errors</span>=remount-ro <span style="color: #000000;">0</span> <span style="color: #000000;">1</span>
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>vg0<span style="color: #000000; font-weight: bold;">/</span>swap  swap  swap  defaults <span style="color: #000000;">0</span> <span style="color: #000000;">0</span>
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>vg0<span style="color: #000000; font-weight: bold;">/</span>tmp  <span style="color: #000000; font-weight: bold;">/</span>tmp  ext3  rw,noexec,nosuid,nodev <span style="color: #000000;">0</span> <span style="color: #000000;">0</span>
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>vg0<span style="color: #000000; font-weight: bold;">/</span>home  <span style="color: #000000; font-weight: bold;">/</span>home  ext3  rw,nosuid,nodev <span style="color: #000000;">0</span> <span style="color: #000000;">2</span>
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>vg0<span style="color: #000000; font-weight: bold;">/</span>var  <span style="color: #000000; font-weight: bold;">/</span>var  ext3  rw,nosuid,nodev <span style="color: #000000;">0</span> <span style="color: #000000;">2</span></pre></div></div>

<p>Quelle: <a href="http://www.cromwell-intl.com/security/linux-hardening.html" target="_blank">http://www.cromwell-intl.com/security/linux-hardening.html</a></p>
<h1>sshd absichern</h1>
<p>Voraussetzung dafür diesen Abschnitt zu implementieren ist, dass es neben root noch mindestens einen anderen Benutzer gibt, denn im folgenden wird root das direkte Anmelden über ssh verboten. Dies erschwert es einem Angreifer root-Rechte zu erlangen, da er erst das Passwort eines Benutzers knacken muss und dann zusätzlich noch das root-Passwort (oder aber er macht es sich einfach und benutzt einfach einen Exploit um sich root-Rechte zu verschaffen). Zudem kann man so immer über "<em>/var/log/auth.log</em>" herausfinden, wer sich als root angemeldet hat.</p>
<p>Als erstes erstellen wir eine Gruppe "sshusers". Nur Benutzer, die dieser Gruppe angehören, dürfen sich auch am ssh-Server anmelden:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">addgroup <span style="color: #660033;">--system</span> sshusers</pre></div></div>

<p>Danach fügen wir unseren nicht-root Benutzer dieser Gruppe hinzu:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">adduser <span style="color: #000000; font-weight: bold;">&lt;</span>Benutzername<span style="color: #000000; font-weight: bold;">&gt;</span> sshusers</pre></div></div>

<p>Nun meine <em>sshd_config</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Package generated configuration file</span>
<span style="color: #666666; font-style: italic;"># See the sshd(8) manpage for details</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># What ports, IPs and protocols we listen for</span>
Port <span style="color: #000000;">22</span>
<span style="color: #666666; font-style: italic;"># Use these options to restrict which interfaces/protocols sshd will bind to</span>
<span style="color: #666666; font-style: italic;">#ListenAddress ::</span>
<span style="color: #666666; font-style: italic;">#ListenAddress 0.0.0.0</span>
ListenAddress 78.46.92.6
Protocol <span style="color: #000000;">2</span>
<span style="color: #666666; font-style: italic;"># HostKeys for protocol version 2</span>
HostKey <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ssh<span style="color: #000000; font-weight: bold;">/</span>ssh_host_rsa_key
HostKey <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ssh<span style="color: #000000; font-weight: bold;">/</span>ssh_host_dsa_key
<span style="color: #666666; font-style: italic;">#Privilege Separation is turned on for security</span>
UsePrivilegeSeparation <span style="color: #c20cb9; font-weight: bold;">yes</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Lifetime and size of ephemeral version 1 server key</span>
KeyRegenerationInterval <span style="color: #000000;">3600</span>
ServerKeyBits <span style="color: #000000;">768</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Logging</span>
SyslogFacility AUTH
LogLevel VERBOSE
&nbsp;
<span style="color: #666666; font-style: italic;"># Authentication:</span>
LoginGraceTime <span style="color: #000000;">30</span>
AllowGroups sshusers
PermitRootLogin no
StrictModes <span style="color: #c20cb9; font-weight: bold;">yes</span>
&nbsp;
RSAAuthentication <span style="color: #c20cb9; font-weight: bold;">yes</span>
PubkeyAuthentication <span style="color: #c20cb9; font-weight: bold;">yes</span>
AuthorizedKeysFile      <span style="color: #000000; font-weight: bold;">%</span>h<span style="color: #000000; font-weight: bold;">/</span>.ssh<span style="color: #000000; font-weight: bold;">/</span>authorized_keys
&nbsp;
<span style="color: #666666; font-style: italic;"># Don't read the user's ~/.rhosts and ~/.shosts files</span>
IgnoreRhosts <span style="color: #c20cb9; font-weight: bold;">yes</span>
<span style="color: #666666; font-style: italic;"># For this to work you will also need host keys in /etc/ssh_known_hosts</span>
RhostsRSAAuthentication no
<span style="color: #666666; font-style: italic;"># similar for protocol version 2</span>
HostbasedAuthentication no
<span style="color: #666666; font-style: italic;"># Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication</span>
<span style="color: #666666; font-style: italic;">#IgnoreUserKnownHosts yes</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># To enable empty passwords, change to yes (NOT RECOMMENDED)</span>
PermitEmptyPasswords no
&nbsp;
<span style="color: #666666; font-style: italic;"># Change to yes to enable challenge-response passwords (beware issues with</span>
<span style="color: #666666; font-style: italic;"># some PAM modules and threads)</span>
ChallengeResponseAuthentication no
&nbsp;
<span style="color: #666666; font-style: italic;"># Change to no to disable tunnelled clear text passwords</span>
<span style="color: #666666; font-style: italic;">#PasswordAuthentication yes</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Kerberos options</span>
<span style="color: #666666; font-style: italic;">#KerberosAuthentication no</span>
<span style="color: #666666; font-style: italic;">#KerberosGetAFSToken no</span>
<span style="color: #666666; font-style: italic;">#KerberosOrLocalPasswd yes</span>
<span style="color: #666666; font-style: italic;">#KerberosTicketCleanup yes</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># GSSAPI options</span>
<span style="color: #666666; font-style: italic;">#GSSAPIAuthentication no</span>
<span style="color: #666666; font-style: italic;">#GSSAPICleanupCredentials yes</span>
&nbsp;
X11Forwarding no
X11DisplayOffset <span style="color: #000000;">10</span>
PrintMotd no
PrintLastLog <span style="color: #c20cb9; font-weight: bold;">yes</span>
TCPKeepAlive <span style="color: #c20cb9; font-weight: bold;">yes</span>
<span style="color: #666666; font-style: italic;">#UseLogin no</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#MaxStartups 10:30:60</span>
Banner <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>issue.net
&nbsp;
<span style="color: #666666; font-style: italic;"># Allow client to pass locale environment variables</span>
AcceptEnv LANG LC_<span style="color: #000000; font-weight: bold;">*</span>
&nbsp;
Subsystem sftp <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>openssh<span style="color: #000000; font-weight: bold;">/</span>sftp-server
&nbsp;
UsePAM <span style="color: #c20cb9; font-weight: bold;">yes</span></pre></div></div>

<p>Wer auf "security by obscurity" steht, kann auch noch den ssh-Port auf einen nicht Standardport verlegen. Im Grunde genommen bringt es nichts - außer vielleicht Verstimmungen bei den Benutzern, da die Benutzerfreundlichkeit stark leidet und die Tipparbeit steigt - da jeder Portscan, z.b. mit nmap, den ssh-Port preisgibt. Natürlich kann man auf der anderen Seite auch argumentieren, dass primitive DoS-Skripts nur den Standardport ausprobieren und das Umlegen des ssh-Ports doch einen gewissen Schutz bietet.<br />
Zusätzlich kann man noch <em>fail2ban</em> installieren, um sich vor DoS-Attacken über ssh (und auch über viele andere Dienste) zu schützen. Dies wird in einem späteren Abschnitt behandelt und stellt meiner Meinung nach die bessere Alternative zu einem nicht-Standardport dar.</p>
<p>Quellen:</p>
<p><a href="http://root-support.com/blog/?p=183" target="_blank">http://root-support.com/blog/?p=183</a><br />
<a href="http://aymanh.com/tips-to-secure-linux-workstation" target="_blank">http://aymanh.com/tips-to-secure-linux-workstation</a><br />
<a href="http://www.pro-linux.de/work/rootserver/teil2.html" target="_blank">http://www.pro-linux.de/work/rootserver/teil2.html</a></p>
<h1>forkbombs</h1>
<p>Eine <a href="http://de.wikipedia.org/wiki/Forkbomb" target="_blank">forkbomb</a> ist ein DoS-Angriff, bei dem sehr viele Prozesse gestartet werden. So viele, dass der komplette Arbeitsspeicher vollgeschrieben wird und das System somit unbenutzbar wird. Ein Beispiel für eine forkbomb wäre (<strong>ACHTUNG:</strong> Nicht auf einem Produktivsystem ausführen!):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> :<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#123;</span> :<span style="color: #000000; font-weight: bold;">|</span>:<span style="color: #000000; font-weight: bold;">&amp;</span> <span style="color: #7a0874; font-weight: bold;">&#125;</span>;:</pre></div></div>

<p>Um diese Art eines Angriffs (zumindest teilweise) zu verhindern, ändern wir die Datei "<em>/etc/security/limits.conf</em>" dahingehend ab, dass jeder Nutzer der Gruppe "users" (in denen all unsere Konsolennutzer Mitglied sind) maximal 150 Prozesse starten darf:</p>
<p><em>/etc/security/limits.conf</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">@</span><span style="color: #c20cb9; font-weight: bold;">users</span>          soft    nproc  <span style="color: #000000;">100</span>
<span style="color: #000000; font-weight: bold;">@</span><span style="color: #c20cb9; font-weight: bold;">users</span>          hard    nproc  <span style="color: #000000;">150</span></pre></div></div>

<p>Quelle:<br />
<a href="http://wiki.craz1.homelinux.com/index.php/Linux:Security:Forkbomb" target="_blank"> http://wiki.craz1.homelinux.com/index.php/Linux:Security:Forkbomb</a><br />
<a href="http://aymanh.com/tips-to-secure-linux-workstation" target="_blank"> http://aymanh.com/tips-to-secure-linux-workstation</a></p>
<h1>rkhunter</h1>
<p>Dieses Tool dient dem Aufspüren von <a href="http://de.wikipedia.org/wiki/Rootkit" target="_blank">rootkits</a>. Es hat eine Datenbank mit Signaturen, welche wöchentlich aktualisiert wird und überprüfen täglich über einen cronjob, ob das System potentiell infiziert ist. Wird eine Infizierung/Gefahr festgestellt, verschickt <em>rkhunter</em> eine E-Mail.<br />
Neben <em>rkhunter</em> gibts es auch noch <em>chkrootkit</em>, falls jemand will kann er zusätzlich auch noch dieses Tool installieren.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> rkhunter chkrootkit</pre></div></div>

<p>Editieren der Datei "<em>/etc/rkhunter.conf</em>" (hier werden nur die Zeilen angezeigt, die geändert wurden):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">DISABLE_TESTS</span>=<span style="color: #ff0000;">&quot;suspscan deleted_files packet_cap_apps&quot;</span>
<span style="color: #007800;">ALLOWHIDDENDIR</span>=<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>.java</pre></div></div>

<p><em>/etc/default/rkhunter</em>: (auch nur geänderte Zeilen):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">DB_UPDATE_EMAIL</span>=<span style="color: #ff0000;">&quot;yes&quot;</span></pre></div></div>

<p>Diese Einstellungen nehmen einen erweiterten Test für versteckte Prozesse zu den Standardtests auf und nehmen das Verzeichnis "<em>/etc/.java</em>" auf die Whitelist mit auf, damit <em>rkhunter</em> sich nicht bei jedem Scan beschwert, dass er eine verdächtige Datei gefunden hat, nur weil Java installiert ist. Darüber hinaus bekommt man wöchentlich eine E-Mail über die Ergebnisse des Datenbank-Updates.</p>
<h1>bastille</h1>
<p><em>Bastille</em> ist ein Tool, welches das Härten eines Systems drastisch vereinfacht. <em>Bastille</em> führt den Nutzer über eine Textberfläche durch verschiedene Fragen und anhand der Antworten des Benutzers wird das System am Schluss verändert. Das Besondere dabei ist, dass <em>bastille</em> alle Aktionen genau und ausführlich erklärt und man die Aktionen auch selbst ausführen kann, anstatt <em>bastille</em> die Ausführung zu überlassen. <em>Bastille</em> wird aktiv von vielen großen Firmen entwickelt und sollte eigentlich zu den Standardwerkzeugen eines jeden verantwortungsbewussten Linux-Administrators gehören, da es viel Arbeit abnimmt und auf Dinge aufmerksam macht, die man sonst evtl. übersieht.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> bastille</pre></div></div>

<p>Da das <em>bastille</em> Paket in lenny von Haus aus nicht kompatibel mit lenny ist, muss die Konfigurationsdateien von <em>bastille</em> ändern werden, um <em>bastille</em> vorzugaukeln, dass es kompatibel mit lenny wäre (siehe <a href="http://www.debianforum.de/forum/viewtopic.php?f=29&amp;t=108266" target="_blank">hier</a> und <a href="http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg610868.html" target="_blank">hier</a>):</p>
<p><em>/usr/lib/Bastille/API.pm</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">sub</span> get_supported_OS_list <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">@list</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span> <span style="color: #ff0000;">&quot;DB2.2&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;DB3.0&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;DB3.1&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;DB4.0&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;DB5.0&quot;</span><span style="color: #339933;">,</span></pre></div></div>

<p><em>/usr/lib/Bastille/IOLoader.pm</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"> <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$supported_versions</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'DB2.2 DB3.0 DB3.1      DB4.0 DB5.0'</span><span style="color: #339933;">;</span></pre></div></div>

<p>Die Fragen von <em>bastille</em> nach bestem Wissen und Gewissen beantworten und das System so seinen Wünschen nach anpassen.<br />
<em>Bastille</em> legt ein ausführliches Log über die Änderungen an und bietet die Möglichkeit die vorgenommenen Änderungen später wieder rückgängig zu machen.</p>
<p>Quelle:<br />
<a href="http://linux.com/feature/118353" target="_blank"> http://linux.com/feature/118353</a></p>
<h1>/etc/passwd</h1>
<p>In diesem Abschnitt geht es darum, die Shells von Systembenutzern auf "<em>/bin/false</em>" bzw. "<em>/bin/nologin</em>" umzustellen, denn die meisten Serverdienste brauchen keinen Konsolenzugriff und stellen in der Standardeinstellung eine gewisse Sicherheitsgefahr dar. Welche Diensten ohne Konsole zurechtkommen, muss man recherchieren oder ausprobieren. Nachdem man einen neuen Serverdienst installiert hat, bietet es sich an diese Datei erneut zu überprüfen und die Konsole der Benutzer ggf. zu ändern.</p>
<p>Beispielhaft zwei Zeilen, wie soetwas aussehen könnte:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">man</span>:x:<span style="color: #000000;">6</span>:<span style="color: #000000;">12</span>:<span style="color: #c20cb9; font-weight: bold;">man</span>:<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>cache<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">man</span>:<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">false</span>
mail:x:<span style="color: #000000;">8</span>:<span style="color: #000000;">8</span>:mail:<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>mail:<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">false</span></pre></div></div>

<h1>fail2ban</h1>
<p>Fail2ban ist eine effektive Waffe gegen DoS-Angriffe jedweder Art - und nicht nur das: man kann auch gescheiterte Authentifizierungsversuche über PAM oder Overflow-Angriffe auf Apache eindämmen. Es bringt schon viele vordefinierte Filter (jails), z.B. für ssh und apache, mit und lässt sich zusätzlich über selbstgeschriebene jails erweitern. Es ist über die Datei "<em>/etc/fail2ban/jail.local</em>" anpassbar. Man sollte die Datei "<em>/etc/fail2ban/jail.conf</em>" nicht selbst verändern. Das stellt sicher, dass bei einem Update auch immer die neuesten Regeln und Anpassungen verwendet werden. Über <em>jail.local</em> lässt sich jede Einstellung in <em>jail.conf</em> überschreiben. Bitte genau abwägen, welche jails man aktiviert und welche nicht (falls postfix nicht auf dem Server nicht installiert ist, ist es unsinnig den jail dafür zu aktivieren).</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>fail2ban<span style="color: #000000; font-weight: bold;">/</span>jail.conf <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>fail2ban<span style="color: #000000; font-weight: bold;">/</span>jail.local</pre></div></div>

<p><em>/etc/fail2ban/jail.local</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;"># Fail2Ban jail.local file</span>
<span style="color: black;">&#91;</span>DEFAULT<span style="color: black;">&#93;</span>
&nbsp;
ignoreip = 127.0.0.1
bantime  = <span style="color: #ff4500;">600</span>
maxretry = <span style="color: #ff4500;">3</span>
&nbsp;
backend = polling
destemail = root
&nbsp;
<span style="color: #808080; font-style: italic;">#</span>
<span style="color: #808080; font-style: italic;"># ACTIONS</span>
<span style="color: #808080; font-style: italic;">#</span>
&nbsp;
banaction = iptables-multiport
mta = sendmail
protocol = tcp
action = <span style="color: #66cc66;">%</span><span style="color: black;">&#40;</span>action_mwl<span style="color: black;">&#41;</span>s
&nbsp;
<span style="color: #808080; font-style: italic;">#</span>
<span style="color: #808080; font-style: italic;"># JAILS</span>
<span style="color: #808080; font-style: italic;">#</span>
&nbsp;
<span style="color: black;">&#91;</span>ssh<span style="color: black;">&#93;</span>
enabled = true
port    = ssh
<span style="color: #008000;">filter</span>  = sshd
logpath  = /var/log/auth.<span style="color: black;">log</span>
&nbsp;
<span style="color: black;">&#91;</span>ssh-ddos<span style="color: black;">&#93;</span>
enabled = true
port    = ssh
<span style="color: #008000;">filter</span>  = sshd-ddos
logpath  = /var/log/auth.<span style="color: black;">log</span>
&nbsp;
<span style="color: black;">&#91;</span>pam-generic<span style="color: black;">&#93;</span>
enabled = true
<span style="color: #008000;">filter</span>  = pam-generic
port = <span style="color: #008000;">all</span>
banaction = iptables-allports
port     = anyport
logpath  = /var/log/auth.<span style="color: black;">log</span>
&nbsp;
<span style="color: black;">&#91;</span>xinetd-fail<span style="color: black;">&#93;</span>
enabled   = false
<span style="color: #008000;">filter</span>    = xinetd-fail
port      = <span style="color: #008000;">all</span>
banaction = iptables-multiport-log
logpath   = /var/log/daemon.<span style="color: black;">log</span>
maxretry  = <span style="color: #ff4500;">2</span>
&nbsp;
<span style="color: #808080; font-style: italic;">#</span>
<span style="color: #808080; font-style: italic;"># HTTP servers</span>
<span style="color: #808080; font-style: italic;">#</span>
&nbsp;
<span style="color: black;">&#91;</span>apache<span style="color: black;">&#93;</span>
enabled = true
port    = http,https
<span style="color: #008000;">filter</span>  = apache-auth
logpath = /var/log/apache<span style="color: #66cc66;">*</span>/<span style="color: #66cc66;">*</span>error.<span style="color: black;">log</span>
&nbsp;
<span style="color: black;">&#91;</span>apache-noscript<span style="color: black;">&#93;</span>
enabled = true
port    = http,https
<span style="color: #008000;">filter</span>  = apache-noscript
logpath = /var/log/apache<span style="color: #66cc66;">*</span>/<span style="color: #66cc66;">*</span>error.<span style="color: black;">log</span>
&nbsp;
<span style="color: black;">&#91;</span>apache-overflows<span style="color: black;">&#93;</span>
enabled = true
port    = http,https
<span style="color: #008000;">filter</span>  = apache-overflows
logpath = /var/log/apache<span style="color: #66cc66;">*</span>/<span style="color: #66cc66;">*</span>error.<span style="color: black;">log</span>
maxretry = <span style="color: #ff4500;">2</span>
&nbsp;
<span style="color: #808080; font-style: italic;">#</span>
<span style="color: #808080; font-style: italic;"># Mail servers</span>
<span style="color: #808080; font-style: italic;">#</span>
&nbsp;
<span style="color: black;">&#91;</span>postfix<span style="color: black;">&#93;</span>
enabled  = true
port     = smtp,ssmtp
<span style="color: #008000;">filter</span>   = postfix
logpath  = /var/log/mail.<span style="color: black;">log</span>
&nbsp;
<span style="color: black;">&#91;</span>sasl<span style="color: black;">&#93;</span>
enabled  = true
port     = smtp,ssmtp,imap2,imap3,imaps,pop3,pop3s
<span style="color: #008000;">filter</span>   = sasl
logpath  = /var/log/mail.<span style="color: black;">log</span></pre></div></div>

<p>Quellen:<br />
<a href="http://debianclusters.cs.uni.edu/index.php/Fail2Ban:_Preventing_Brute_Force_SSH" target="_blank"> http://debianclusters.cs.uni.edu/index.php/Fail2Ban:_Preventing_Brute_Force_SSH</a><br />
<a href="http://debaday.debian.net/2007/04/29/fail2ban-an-enemy-of-script-kiddies/" target="_blank"> http://debaday.debian.net/2007/04/29/fail2ban-an-enemy-of-script-kiddies/</a></p>
<h1>Intrusion Detection System</h1>
<p>IDS-Systeme wie <em>tripwire</em>, <em>aide</em> oder <em>fcheck</em> helfen Manipulationen an Dateien festzustellen. Um das bewerkstelligen zu können, wird anfänglich eine Datenbank erstellt mit Hash-Werten der zu überwachenden Ordner und dann werden die Werte regelmäßig überprüft. Stimmen die Hash-Werte nicht mehr überein, wird man per E-Mail benachrichtigt. Der große Nachteil ist natürlich, dass man die Datenbank immer aktuell halten muss und z.B. nach jeden "<em>aptitude update/install/purge/...</em>" ist dies der Fall. Die große Frage ist: Zu welchem Zeitpunkt es interessant ist ein IDS aufzusetzen. Wenn man einen Server ganz neu hat, ändern sich fast täglich Konfigurationsdateien oder es werden neue Pakete installiert, zu einem späteren Zeitpunkt läuft man Gefahr, dass ein Angreifer schon Programme/Konfigurationsdateien ausgetauscht hat und dann ist das IDS bereits nutzlos.<br />
Dieser Abschnitt wird zu einem späteren Zeitpunkt mit Inhalt gefüllt.</p>
<h1>iptables</h1>
<p>Früher oder später sollte man sich darüber Gedanken machen, ob man eine Firewall/Paketfilter einsetzen will oder nicht, bzw. ob es überhaupt Sinn macht.<br />
Diese Sektion wird zu einem späteren Zeitpunk um Vorschläge für eine kleine Firewall-Konfiguration, bzw. über den Aufbau von <em>iptables</em>-Regeln erweitert.</p>
<h1>Netzwerkscanner</h1>
<p>Um von außen zu überprüfen, ob der Server sicher ist, kann man Tools wie <em>nmap</em> oder <em>nessus</em> einsetzen. <em>nmap</em> dient dabei dazu offene Ports aufzuspüren, damit man diese ggf. schließen kann. <em>nessus</em> hingegen überprüft, ob der Server anfällig für bestimmte Exploits ist, z.B. anhand der Versionsnummer eines Dienstes. Um es allgemeiner auszudrücken: <em>nessus</em> ist ein Vulnerability (Schwachstellen)-Scanner.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">nmap</span> <span style="color: #660033;">-A</span> <span style="color: #660033;">-T4</span> <span style="color: #000000; font-weight: bold;">&lt;</span>Serveradresse<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>Die Bedienung von nessus ist etwas umfangreicher und an dieser Stelle sei deshalb auf <a href="http://www.google.com/" target="_blank">google</a> verwiesen und es wird zum Ausprobieren ermuntert.<br />
Des Weiteren sollte man einen Blick auf <em>netstat</em> werfen. Mit diesem Tool kann man lokal auf dem Server herausfinden, welche Ports geöffnet sind und welcher Dienst sich hinter welchem Port versteckt.<br />
Beispielhafter Aufruf:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">netstat</span> <span style="color: #660033;">-tulpen</span></pre></div></div>

<h1>Weitere Möglichkeiten sich zu schützen</h1>
<p>Dies sind nur einige grundlegende Schritte, die man unternehmen kann, um einen Server abzusichern. Die Liste ist keineswegs vollständig und erhebt auch nicht den Anspruch darauf. Falls jemand weitere Wege kennt, einen Server abzusichern, dann bitte ich um einen Kommentar, bzw. um eine E-Mail und ich werde dieses Howto erweitern.<br />
Empfehlenswert ist natürlich auch das Eintragen in Mailinglisten zum Thema Sicherheit und sich allgemein über sicherheitsrelevante Themen auf dem Laufenden zu halten. Ein weiterer Schritt, um Schwachstellen zu vermeiden ist es, das System immer aktuell zu halten. Das Paketmanagement macht es einem unter Linux sehr einfach und deshalb empfehle ich es aktiv zu nutzen, anstatt Programme selbst zu kompilieren. Normalerweise ist jedes Programm, das man auf einem Server brauchen könnte in den <em>Debian</em>-Repositories enthalten (dass man auf einem Server nur mit den <em>stable</em>-Repositories arbeiten sollte und von <em>testing</em> tunlichst die Finger lassen sollte, brauche ich hier wohl kaum zu erwähnen).<br />
Abschließend bleibt nur noch einmal zu wiederholen, dass es keine absolute Sicherheit gibt und dass man einen guten Kompromiss zwischen Sicherheit und Freiheit (der Nutzer) finden sollte (Hallo, Herr Innenminister).</p>
]]></content:encoded>
			<wfw:commentRss>http://johker.ibutho.de/2009/03/18/der-neue-server-teil-2-system-harten/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Der neue Server: Teil 1 Installation und Basiskonfiguration</title>
		<link>http://johker.ibutho.de/2009/03/17/der-neue-server-teil-1-installation-und-basiskonfiguration/</link>
		<comments>http://johker.ibutho.de/2009/03/17/der-neue-server-teil-1-installation-und-basiskonfiguration/#comments</comments>
		<pubDate>Tue, 17 Mar 2009 19:32:06 +0000</pubDate>
		<dc:creator>johker</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[adduser]]></category>
		<category><![CDATA[apt]]></category>
		<category><![CDATA[apticron]]></category>
		<category><![CDATA[aptitude]]></category>
		<category><![CDATA[bashrc]]></category>
		<category><![CDATA[bash_aliases]]></category>
		<category><![CDATA[benachrichtigung]]></category>
		<category><![CDATA[completion]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[dateizugriff]]></category>
		<category><![CDATA[dist-upgrade]]></category>
		<category><![CDATA[DoS]]></category>
		<category><![CDATA[dpkg-reconfigure]]></category>
		<category><![CDATA[dropbox]]></category>
		<category><![CDATA[findutils]]></category>
		<category><![CDATA[hetzner]]></category>
		<category><![CDATA[htop]]></category>
		<category><![CDATA[index]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[locate]]></category>
		<category><![CDATA[lsof]]></category>
		<category><![CDATA[lvm]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[mc]]></category>
		<category><![CDATA[mdadm]]></category>
		<category><![CDATA[midnight commander]]></category>
		<category><![CDATA[ncurses]]></category>
		<category><![CDATA[partitionierung]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[public]]></category>
		<category><![CDATA[raid]]></category>
		<category><![CDATA[rescue-system]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[smart]]></category>
		<category><![CDATA[smartmontools]]></category>
		<category><![CDATA[traffic]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[updatedb]]></category>
		<category><![CDATA[useradd]]></category>
		<category><![CDATA[vimrc]]></category>

		<guid isPermaLink="false">http://johker.ibutho.de/?p=102</guid>
		<description><![CDATA[Seit ca. November letzten Jahres war klar, dass ein neuer Server her muss - nicht zuletzt, weil einige Leute bei ibutho ausgestiegen sind und ibutho doch etwas zu schwach ist für unsere Ansprüche. Die Planungen liefen auch schon seit Ende letzten Jahres und nun haben sie alle Gestalt angenommen. Die Domains werden alle zentral über [...]]]></description>
			<content:encoded><![CDATA[<p>Seit ca. November letzten Jahres war klar, dass ein neuer Server her muss - nicht zuletzt, weil einige Leute bei ibutho ausgestiegen sind und ibutho doch etwas zu schwach ist für unsere Ansprüche. Die Planungen liefen auch schon seit Ende letzten Jahres und nun haben sie alle Gestalt angenommen. Die Domains werden alle zentral über <a href="http://www.inwx.de/" target="_blank">inwx.de</a> verwaltet. Dies hat den Vorteil, dass wir unabhängig vom Provider des Root-Servers sind und später ohne Probleme wechseln können. Beim Server haben wir uns für einen <a href="http://www.hetzner.de/hosting/produkte_rootserver/ds3000/" target="_blank">DS3000</a> von <a href="http://hetzner.de" target="_blank">Hetzner</a> entschieden. Dieser sagte uns sowohl von den Hardware-Daten als auch vom Preis-/Leistungsverhältnis zu (AMD Athlon 64 X2 5600+, 2GB RAM, 2 x 400GB Festplatte, 100MBit Anbindung ans Internet, 7 IP-Adressen, unbegrenzter Traffic).</p>
<p>Im Weiteren will ich auf die Grundinstallation eingehen und in den folgenden Teilen auf die beispielhafte Installation und Konfiguration verschiedenster Server-Dienste. Ich hoffe, dass diese Beiträge für den ein oder anderen nützlich sind, wenn sie ihren eigenen Server konfigurieren und absichern wollen. Ich bitte um rege Diskussionen, damit die Beiträge sinnvoll erweitert und Fehler beseitigt werden können.</p>
<h1>Installation des Systems</h1>
<p>Hetzner vereinfacht dem Administrator die Installation eines eigenen Betriebssystems über das Rescue-System sehr. Es wir ein Skript installimage angeboten, über welches man z.B. die Festplatte partitionieren kann, ein LVM einrichten kann oder einen Software-RAID konfigurieren kann.</p>
<p>Bei meiner Installation entschied ich mich für ein RAID1-System mit LVM. Für RAID1 entschied ich mich aufgrund der gesteigerten Ausfallsicherheit und der gesteigerten Lese-Performance. Für LVM entschied ich mich, da dies mehr Flexibilität mit sich bringt als ein starres Partitionsschema. Sollte man später bemerken, dass eine Volume zu groß oder zu klein ist, kann man es einfach verkleinern/vergrößern. Versierte Leser mögen sich hier fragen, warum ich nicht komplett auf ein LVM-Setup setze und dem LVM auch das Mirroring überlasse. Der Grund ist einfach: über ein Software-RAID erhalte ich höhere Leseraten (siehe auch: <a href="http://www.joshbryan.com/blog/2008/01/02/lvm2-mirrors-vs-md-raid-1/" target="_blank">http://www.joshbryan.com/blog/2008/01/02/lvm2-mirrors-vs-md-raid-1/</a>, insbesondere auch die Kommentare). Beim Dateisystem setze ich auf ext3 bzw. ext2 für "/boot", da sich ext3 im LVM problemlos im laufenden Betrieb vergrößern bzw. verkleinern lässt.</p>
<p>Hier mein Partitionslayout:</p>
<table border="1" cellspacing="0" cellpadding="4" width="100%" bordercolor="#000000">
<col width="55"></col>
<col width="55"></col>
<col width="71"></col>
<col width="75"></col>
<tbody>
<tr valign="top">
<td colspan="2" width="43%" height="17" bgcolor="#e6e6e6">Mountpunkt</td>
<td width="28%" bgcolor="#e6e6e6">Dateisystem</td>
<td width="29%" bgcolor="#e6e6e6">Größe</td>
</tr>
<tr valign="top">
<td colspan="2" width="43%" height="18">/boot</td>
<td width="28%">ext2</td>
<td width="29%">256M</td>
</tr>
<tr valign="top">
<td colspan="2" width="43%" height="18">vg0</td>
<td width="28%">lvm</td>
<td width="29%">all</td>
</tr>
<tr valign="top">
<td width="21%" height="18"></td>
<td width="21%">swap</td>
<td width="28%">swap</td>
<td width="29%">2G</td>
</tr>
<tr valign="top">
<td width="21%" height="18"></td>
<td width="21%">/</td>
<td width="28%">ext3</td>
<td width="29%">5G</td>
</tr>
<tr valign="top">
<td width="21%" height="18"></td>
<td width="21%">/home</td>
<td width="28%">ext3</td>
<td width="29%">15G</td>
</tr>
<tr valign="top">
<td width="21%" height="18"></td>
<td width="21%">/tmp</td>
<td width="28%">ext3</td>
<td width="29%">4G</td>
</tr>
<tr valign="top">
<td width="21%" height="17"></td>
<td width="21%">/var</td>
<td width="28%">ext3</td>
<td width="29%">50G</td>
</tr>
</tbody>
</table>
<p>Sowohl "/boot", als auch "vg0" sind jeweils eine RAID1-Partition. Die ganze Arbeit das RAID einzurichten und danach das LVM hat mir das hetzner-Skript abgenommen.</p>
<h1>Erste Schritte</h1>
<h2>aptitude-Mirror konfigurieren</h2>
<p>Hetzner stellt einen eigenen aptitude-/apt-Mirror und diesen werden wir als allererstes ändern. Die Vorteile liegen auf der Hand: hohe Übertragungsraten und es handelt sich um internen Traffic, wird als nicht berechnet.</p>
<p>/etc/apt/sources.list:</p>

<div class="wp_syntax"><div class="code"><pre class="apt_sources" style="font-family:monospace;"><span style="color: #adadad; font-style: italic;"># Packages and Security Updates from the Hetzner Debian Mirror</span>
<span style="color: #00007f;">deb</span> <span style="color: #009900;">ftp://mirror.hetzner.de/debian/packages</span>  <span style="color: #b1b100;">lenny</span>          <span style="color: #b16000;">main</span> <span style="color: #b16000;">contrib</span> <span style="color: #b16000;">non-free</span>
<span style="color: #00007f;">deb</span> <span style="color: #009900;">ftp://mirror.hetzner.de/debian/security</span>  <span style="color: #b1b100;">lenny</span>/updates  <span style="color: #b16000;">main</span> <span style="color: #b16000;">contrib</span> <span style="color: #b16000;">non-free</span></pre></div></div>

<p>Und nun ein erstes Update&amp;Upgrade:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">aptitude</span> update <span style="color: #000000; font-weight: bold;">&amp;</span>amp;<span style="color: #000000; font-weight: bold;">&amp;</span>amp; <span style="color: #c20cb9; font-weight: bold;">aptitude</span> dist-upgrade</pre></div></div>

<h2>postfix Installation</h2>
<p>Da <em>postfix</em> der Mailserver meiner Wahl ist und ich nicht will, dass irgend ein Programm <em>exim</em> oder ähnliches installiert, werden wir jetzt gleich postfix installieren, jedoch noch nicht konfigurieren. Die Konfiguration folgt ausführlich in einem weiteren Teil.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> postfix</pre></div></div>

<h2>Systemtools</h2>
<h3>apticron</h3>
<p>apticron ist ein Tool, welches einen per Mail informiert, wenn es Updates gibt. Dies ist besonders hilfreich, da das Tool die Paketquellen im Hintergrund updated, aber die Updates nicht einspielt; so bleibt es dem Administrator immer selbst überlassen, welche Pakete er einspielt und welche nicht, bzw. welche er erst ausführlicher testen will, da die Funktionalität des Systems evtl. erheblich beeinträchtigt werden könnte.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> apticron</pre></div></div>

<h3>mdadm</h3>
<p>Mit <em>mdadm</em> wurde bereits das Software-RAID erstellt. Doch <em>mdadm</em> kann mehr: es kann den Benutzer auch per E-Mail informieren, wenn es Probleme mit dem RAID gibt. Dies wollen wir hier einstellen:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">dpkg-reconfigure mdadm</pre></div></div>

<h3>smartmontools</h3>
<p>Mit den <em>smartmontools</em> kann man den Status des Festplatten abfragen und bekommt E-Mails, wenn die Festplatte kurz vor ihrem Lebensende ist.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> smartmontools</pre></div></div>

<p><em>/etc/default/smartmontools</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># uncomment to start smartd on system startup</span>
<span style="color: #007800;">start_smartd</span>=<span style="color: #c20cb9; font-weight: bold;">yes</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># uncomment to pass additional options to smartd on startup</span>
<span style="color: #007800;">smartd_opts</span>=<span style="color: #ff0000;">&quot;--interval=1800&quot;</span></pre></div></div>

<p><em>/etc/smartd.conf</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">DEVICESCAN <span style="color: #660033;">-m</span> root <span style="color: #660033;">-M</span> <span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>smartmontools<span style="color: #000000; font-weight: bold;">/</span>smartd-runner</pre></div></div>

<h3>htop</h3>
<p><em>htop</em> ist eine erweiterte Version von <em>top</em> und bietet eine ncurses-Oberfläche, sowie Farben und "grafische" Anzeigen.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> htop</pre></div></div>

<h3>lsof</h3>
<p><em>lsof</em> kann anzeigen, wer gerade auf einen Ordner/Gerät zugreift. Das Tool kann nützlich sein, wenn man einen Ordner unmounten will, aber noch jemand/etwas darauf zugreift.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> lsof</pre></div></div>

<h3>mc</h3>
<p>Wer DOS noch kennt, kennt auch den <em>Norton Commander</em>. <em>mc</em> (ausgeschrieben: midnight commander) ist ein <em>Norton Commander</em>-Klon und vereinfacht einem das Leben in vielen Situationen. Einfach mal ausprobieren:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> mc</pre></div></div>

<h3>locate</h3>
<p>Mit <em>locate</em> kann man schnell nach Dateien suchen. Es baut einen Index über Dateien und Ordner des Dateisystems auf und aktualisiert diesen mittels eines Cronjobs regelmäßig. Sucht man eine Datei, so gibt man einfach folgendes ein:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">locate</span> <span style="color: #000000; font-weight: bold;">&lt;</span>Dateiname<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>Das Paket kann mit folgendem Befehl installiert werden:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #c20cb9; font-weight: bold;">locate</span></pre></div></div>

<p>Nach der Installation sollte als Erstes der Index aufgebaut werden (dies wird später automatisch gemacht):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">updatedb</span></pre></div></div>

<h2>Benutzer anlegen</h2>
<p>Meine Anforderung an die Home-Laufwerke der einzelnen Benutzer ist, dass sie nicht von jedem gelesen werden können, aber dass man trotzdem Ordner/Dateien unterhalb des eigenen Home-Laufwerks für andere zugänglich machen kann, um z.B. einen "Briefkasten" zu implementieren, wo andere Benutzer Dateien für einen ablegen können, aber nicht sehen können, was sich sonst noch darin befindet. Deshalb wird mit folgenden Befehl die Sichtbarkeit der Home-Verzeichnisse geändert:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">dpkg-reconfigure adduser</pre></div></div>

<p>Außerdem hätte ich gerne, dass jeder Benutzer standardmäßig in der Gruppe "users" ist (man weiß ja nie, wozu das noch gut sein könnte). Dazu fügen wir an die Datei "<em>/etc/default/useradd</em>" am Ende folgendes an - bzw. an die Datei "<em>/etc/adduser.conf</em>" (je nachdem, ob man <em>adduser</em> oder <em>useradd</em> zum Hinzufügen von Benutzern verwendet):<br />
<em>/etc/default/useradd</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">GROUPS</span>=<span style="color: #c20cb9; font-weight: bold;">users</span></pre></div></div>

<p><em>/etc/adduser.conf</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">EXTRA_GROUPS</span>=<span style="color: #ff0000;">&quot;users&quot;</span>
<span style="color: #007800;">ADD_EXTRA_GROUPS</span>=<span style="color: #000000;">1</span></pre></div></div>

<p>Die "Briefkasten"-Erweiterung:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>skel<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> public
<span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">755</span> public<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> public<span style="color: #000000; font-weight: bold;">/</span>dropbox
<span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">753</span> public<span style="color: #000000; font-weight: bold;">/</span>dropbox<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">chown</span> root: public<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">-R</span></pre></div></div>

<p>Nun legen wir noch eigene Versionen der Dateien .vimrc, .bashrc, .bash_aliases in "<em>/etc/skel/</em>":<br />
<em>.vimrc</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="vim" style="font-family:monospace;">sy on
se nu
set incsearch
set hlsearch
colorscheme slate</pre></div></div>

<p><em>.bashrc</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># ~/.bashrc: executed by bash(1) for non-login shells.</span>
<span style="color: #666666; font-style: italic;"># see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)</span>
<span style="color: #666666; font-style: italic;"># for examples</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PS1</span>=<span style="color: #ff0000;">'\h:\w\$ '</span>
<span style="color: #7a0874; font-weight: bold;">umask</span> 022
&nbsp;
<span style="color: #666666; font-style: italic;"># If not running interactively, don't do anything</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-z</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$PS1</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;</span>amp;<span style="color: #000000; font-weight: bold;">&amp;</span>amp; <span style="color: #7a0874; font-weight: bold;">return</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># don't put duplicate lines in the history. See bash(1) for more options</span>
<span style="color: #666666; font-style: italic;"># don't overwrite GNU Midnight Commander's setting of `ignorespace'.</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">HISTCONTROL</span>=<span style="color: #007800;">$HISTCONTROL</span><span style="color: #800000;">${HISTCONTROL+,}</span>ignoredups
<span style="color: #666666; font-style: italic;"># ... or force ignoredups and ignorespace</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">HISTCONTROL</span>=ignoreboth
&nbsp;
<span style="color: #666666; font-style: italic;"># append to the history file, don't overwrite it</span>
<span style="color: #7a0874; font-weight: bold;">shopt</span> <span style="color: #660033;">-s</span> histappend
&nbsp;
<span style="color: #666666; font-style: italic;"># for setting history length see HISTSIZE and HISTFILESIZE in bash(1)</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># check the window size after each command and, if necessary,</span>
<span style="color: #666666; font-style: italic;"># update the values of LINES and COLUMNS.</span>
<span style="color: #7a0874; font-weight: bold;">shopt</span> <span style="color: #660033;">-s</span> checkwinsize
&nbsp;
<span style="color: #666666; font-style: italic;"># make less more friendly for non-text input files, see lesspipe(1)</span>
<span style="color: #666666; font-style: italic;">#[ -x /usr/bin/lesspipe ] &amp;amp;&amp;amp; eval &quot;$(SHELL=/bin/sh lesspipe)&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># set variable identifying the chroot you work in (used in the prompt below)</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-z</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$debian_chroot</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;</span>amp;<span style="color: #000000; font-weight: bold;">&amp;</span>amp; <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-r</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>debian_chroot <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
    <span style="color: #007800;">debian_chroot</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>debian_chroot<span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># set a fancy prompt (non-color, unless we know we &quot;want&quot; color)</span>
<span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$TERM</span>&quot;</span> <span style="color: #000000; font-weight: bold;">in</span>
    xterm-color<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #007800;">color_prompt</span>=<span style="color: #c20cb9; font-weight: bold;">yes</span><span style="color: #000000; font-weight: bold;">;;</span>
<span style="color: #000000; font-weight: bold;">esac</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># uncomment for a colored prompt, if the terminal has the capability; turned</span>
<span style="color: #666666; font-style: italic;"># off by default to not distract the user: the focus in a terminal window</span>
<span style="color: #666666; font-style: italic;"># should be on the output of commands, not on the prompt</span>
<span style="color: #666666; font-style: italic;">#force_color_prompt=yes</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$force_color_prompt</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
    <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-x</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>tput <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;</span>amp;<span style="color: #000000; font-weight: bold;">&amp;</span>amp; tput setaf <span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">&amp;</span>gt;<span style="color: #000000; font-weight: bold;">&amp;</span>amp;<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null; <span style="color: #000000; font-weight: bold;">then</span>
        <span style="color: #666666; font-style: italic;"># We have color support; assume it's compliant with Ecma-48</span>
        <span style="color: #666666; font-style: italic;"># (ISO/IEC-6429). (Lack of such support is extremely rare, and such</span>
        <span style="color: #666666; font-style: italic;"># a case would tend to support setf rather than setaf.)</span>
        <span style="color: #007800;">color_prompt</span>=<span style="color: #c20cb9; font-weight: bold;">yes</span>
    <span style="color: #000000; font-weight: bold;">else</span>
        <span style="color: #007800;">color_prompt</span>=
    <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$color_prompt</span>&quot;</span> = <span style="color: #c20cb9; font-weight: bold;">yes</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
    <span style="color: #007800;">PS1</span>=<span style="color: #ff0000;">'${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '</span>
<span style="color: #000000; font-weight: bold;">else</span>
    <span style="color: #007800;">PS1</span>=<span style="color: #ff0000;">'${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '</span>
<span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #7a0874; font-weight: bold;">unset</span> color_prompt force_color_prompt
&nbsp;
<span style="color: #666666; font-style: italic;"># If this is an xterm set the title to user@host:dir</span>
<span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$TERM</span>&quot;</span> <span style="color: #000000; font-weight: bold;">in</span>
xterm<span style="color: #000000; font-weight: bold;">*|</span>rxvt<span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
    <span style="color: #007800;">PS1</span>=<span style="color: #ff0000;">&quot;\[\e]0;<span style="color: #007800;">${debian_chroot:+($debian_chroot)}</span>\u@\h: \w\a\]<span style="color: #007800;">$PS1</span>&quot;</span>
    <span style="color: #000000; font-weight: bold;">;;</span>
<span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
    <span style="color: #000000; font-weight: bold;">;;</span>
<span style="color: #000000; font-weight: bold;">esac</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Alias definitions.</span>
<span style="color: #666666; font-style: italic;"># You may want to put all your additions into a separate file like</span>
<span style="color: #666666; font-style: italic;"># ~/.bash_aliases, instead of adding them here directly.</span>
<span style="color: #666666; font-style: italic;"># See /usr/share/doc/bash-doc/examples in the bash-doc package.</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-f</span> ~<span style="color: #000000; font-weight: bold;">/</span>.bash_aliases <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
    . ~<span style="color: #000000; font-weight: bold;">/</span>.bash_aliases
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># enable color support of ls and also add handy aliases</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-x</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">dircolors</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
    <span style="color: #7a0874; font-weight: bold;">eval</span> <span style="color: #ff0000;">&quot;<span style="color: #780078;">`dircolors -b`</span>&quot;</span>
    <span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;"><span style="color: #c20cb9; font-weight: bold;">ls</span></span>=<span style="color: #ff0000;">'ls --color=auto'</span>
    <span style="color: #666666; font-style: italic;">#alias dir='dir --color=auto'</span>
    <span style="color: #666666; font-style: italic;">#alias vdir='vdir --color=auto'</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">#alias grep='grep --color=auto'</span>
    <span style="color: #666666; font-style: italic;">#alias fgrep='fgrep --color=auto'</span>
    <span style="color: #666666; font-style: italic;">#alias egrep='egrep --color=auto'</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># some more ls aliases</span>
<span style="color: #666666; font-style: italic;">#alias ll='ls -l'</span>
<span style="color: #666666; font-style: italic;">#alias la='ls -A'</span>
<span style="color: #666666; font-style: italic;">#alias l='ls -CF'</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># enable programmable completion features (you don't need to enable</span>
<span style="color: #666666; font-style: italic;"># this, if it's already enabled in /etc/bash.bashrc and /etc/profile</span>
<span style="color: #666666; font-style: italic;"># sources /etc/bash.bashrc).</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>bash_completion <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
    . <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>bash_completion
<span style="color: #000000; font-weight: bold;">fi</span></pre></div></div>

<p><em>.bash_aliases</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">l</span>=<span style="color: #ff0000;">'ls -lA'</span>
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">ll</span>=<span style="color: #ff0000;">'ls -l'</span>
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">la</span>=<span style="color: #ff0000;">'ls -a'</span>
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">lla</span>=<span style="color: #ff0000;">'ls -la'</span>
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">lal</span>=<span style="color: #ff0000;">'ls -la'</span></pre></div></div>

<p>Zusätzlich installieren wir noch das Paket "bash-completion", um eine komplexere Code- und Befehlsvervollständigung zu bekommen (wird erst nach erneutem Anmelden an der Konsole aktiv):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> bash-completion</pre></div></div>

<p>Nun können wir mittels adduser einen Benutzer anlegen:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">adduser <span style="color: #000000; font-weight: bold;">&lt;</span>Benutzername<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://johker.ibutho.de/2009/03/17/der-neue-server-teil-1-installation-und-basiskonfiguration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java auf einem Virtuozzo Virtual Server installieren</title>
		<link>http://johker.ibutho.de/2008/10/21/java-auf-einem-virtual-server-installieren/</link>
		<comments>http://johker.ibutho.de/2008/10/21/java-auf-einem-virtual-server-installieren/#comments</comments>
		<pubDate>Tue, 21 Oct 2008 13:27:20 +0000</pubDate>
		<dc:creator>johker</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Tipps und Tricks]]></category>
		<category><![CDATA[apt-get]]></category>
		<category><![CDATA[aptitude]]></category>
		<category><![CDATA[deb]]></category>
		<category><![CDATA[dpkg-deb]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[sun-java5-bin]]></category>
		<category><![CDATA[sun-java6-bin]]></category>
		<category><![CDATA[virtual server]]></category>
		<category><![CDATA[virtuozzo]]></category>

		<guid isPermaLink="false">http://johker.ibutho.de/?p=62</guid>
		<description><![CDATA[Wie vielleicht einige wissen, administriere ich in meiner Freizeit einen virtuellen Server auf Virtuozzo Basis. Schon seit längerem ist es mir ein Dorn im Auge, dass sich Java darauf nicht installieren lässt lies. Seit heute ist das vorbei. Ich habe endlich eine Anleitung gefunden, wie man das Problem umgehen kann.
Zuerst vielleicht einmal, wie sich das [...]]]></description>
			<content:encoded><![CDATA[<p>Wie vielleicht einige wissen, administriere ich in meiner Freizeit einen virtuellen Server auf Virtuozzo Basis. Schon seit längerem ist es mir ein Dorn im Auge, dass sich Java darauf nicht installieren <span style="text-decoration: line-through;">lässt</span> lies. Seit heute ist das vorbei. Ich habe endlich eine Anleitung gefunden, wie man das Problem umgehen kann.</p>
<p>Zuerst vielleicht einmal, wie sich das Problem geäußert hat: Während des Installationsprozesses mit <em>aptitude</em> gab es einen Fehler beim Ausführen der <em>postinst</em>-Skripts von <strong>sun-java6-bin</strong>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Setting up sun-java5-bin <span style="color: #7a0874; font-weight: bold;">&#40;</span>1.5.0-<span style="color: #000000;">10</span>-<span style="color: #000000;">3</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> ...
Could not create the Java virtual machine.
<span style="color: #c20cb9; font-weight: bold;">dpkg</span>: error processing sun-java5-bin <span style="color: #7a0874; font-weight: bold;">&#40;</span>--configure<span style="color: #7a0874; font-weight: bold;">&#41;</span>:
 subprocess post-installation script returned error <span style="color: #7a0874; font-weight: bold;">exit</span> status <span style="color: #000000;">1</span></pre></div></div>

<p>Um dieses Problem zu lösen, muss das Skript <em>postinst</em> im deb-Paket geändert werden und folgende Zeile auskommentiert werden:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">$basedir</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>java <span style="color: #660033;">-client</span> -Xshare:dump <span style="color: #000000; font-weight: bold;">&amp;</span>gt; <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null</pre></div></div>

<p>Wie man ein deb-Paket entpackt und nach dem Modifizieren wieder ein deb-Paket erstellt, wird hier sehr ausführlich und gut beschrieben:</p>
<p><a title="http://thedarkmaster.wordpress.com/2008/05/24/how-to-create-manipulate-a-deb-file-of-a-compiled-application/" href="http://thedarkmaster.wordpress.com/2008/05/24/how-to-create-manipulate-a-deb-file-of-a-compiled-application/" target="_blank">http://thedarkmaster.wordpress.com/2008/05/24/how-to-create-manipulate-a-deb-file-of-a-compiled-application/</a></p>
<p>Zusammenfassend legt man einen Ordner "AAA" an, entpackt das deb-Paket mit tar in diesen Ordner, entpackt die darin enthaltene Datei <em>control.tar.gz</em> in ein Verzeichnis "DEBIAN" (muss in "AAA" erstellt werden) und entpackt die Datei <em>data.tar.gz</em> in den Ordner "AAA". Jetzt kann bearbeitet werden, was das Zeug hält. Ist man damit fertig, baut man das deb-Paket mit (man muss im Überordner von "AAA" sein):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">dpkg-deb <span style="color: #660033;">--build</span> AAA</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://johker.ibutho.de/2008/10/21/java-auf-einem-virtual-server-installieren/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
