<?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>Alonso.ch &#187; Debian</title>
	<atom:link href="http://blog.alonso.ch/tag/debian/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.alonso.ch</link>
	<description>Nonsport Blog</description>
	<lastBuildDate>Wed, 01 Feb 2012 08:33:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>mySQL Server 5.5 auf Debian Squeeze</title>
		<link>http://blog.alonso.ch/tech/linux/debian-linux-tech/mysql-server-5-5-auf-debian-squeeze/</link>
		<comments>http://blog.alonso.ch/tech/linux/debian-linux-tech/mysql-server-5-5-auf-debian-squeeze/#comments</comments>
		<pubDate>Thu, 11 Aug 2011 21:25:44 +0000</pubDate>
		<dc:creator>Alonso</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[mySQL]]></category>
		<category><![CDATA[InnoDB]]></category>
		<category><![CDATA[Squeeze]]></category>

		<guid isPermaLink="false">http://blog.alonso.ch/?p=151</guid>
		<description><![CDATA[Wer einen performanten mySQL Server 5.5 unter Debian Squeeze betreiben will &#8211; muss auf das normale Debian Packet verzichten und manuell installieren, da die &#8220;offizielle&#8221; Variante aus dem Repositry leider etwas stark veraltet ist. Ist aber grundsätzlich kein Hexenwerk &#8211; so gehts: Sofern bestehende Datenbanken vorhanden sind &#8211; Backup erstellen! Ich gehe davon aus dass [...]]]></description>
			<content:encoded><![CDATA[<p>Wer einen performanten mySQL Server 5.5 unter Debian Squeeze betreiben will &#8211; muss auf das normale Debian Packet verzichten und manuell installieren, da die &#8220;offizielle&#8221; Variante aus dem Repositry leider etwas stark veraltet ist.</p>
<p>Ist aber grundsätzlich kein Hexenwerk &#8211; so gehts:</p>
<p>Sofern bestehende Datenbanken vorhanden sind &#8211; Backup erstellen! Ich gehe davon aus dass es hierzu kein HowTo braucht <img src='http://blog.alonso.ch/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Alte Installation bereinigen, sofern vorhanden:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> remove mysql-server mysql-common <span style="color: #660033;">--purge</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> autoremove</pre></div></div>

<p><span id="more-151"></span><br />
Danach sollte die &#8220;asynchronous I/O library&#8221;, kurz AIO aus dem Repository installiert werden &#8211; damit kann die spätere Performance von InnoDB massiv verbessert werden.</p>

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

<p>Analog zu Debian, sollte mySQL auch weiterhin unter einem eigenen Benutzer laufen, dazu legen wir diesen mit entsprechender Gruppe an, sofern notwendig.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">useradd mysql
groupadd mysql</pre></div></div>

<p>Danach werden die benötigten Ordner auf dem Filesystem angelegt und mit den nötigen Rechten versehen. In diesem Beispiel wird die Struktur analog zur normalen Packetinstallation aufgebaut. Diese sollte aber wenn möglich weiter optimiert werden. Ein paar Gedanken dazu sind in einem anderen <a href="http://blog.alonso.ch/tech/database/mysql/ideales-mysql-server-setup/" title="mySQL Infrastruktur Setup">Artikel</a> zu finden.</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>log<span style="color: #000000; font-weight: bold;">/</span>mysql <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> mysql:mysql <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>mysql
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>run<span style="color: #000000; font-weight: bold;">/</span>mysqld <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> mysql:root <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>run<span style="color: #000000; font-weight: bold;">/</span>mysqld <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #660033;">-R</span> <span style="color: #000000;">755</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>run<span style="color: #000000; font-weight: bold;">/</span>mysqld
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>mysql <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> mysql:mysql <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>mysql <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #660033;">-R</span> <span style="color: #000000;">700</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>mysql</pre></div></div>

<p>Als nächstes brauchen wir nun das aktuellste &#8220;Linux Generic Tar Archive&#8221; von mySQL:<br />
<a href="http://www.mysql.com/downloads/mysql/#downloads" title="mySQL Community Server Download" target="_blank">http://www.mysql.com/downloads/mysql/#downloads</a></p>
<p>Wählen sie unbedingt das korrekte Packet. Sollten sie unsicher sein bezüglich 32 oder 64 Bit &#8211; Fragen sie doch mal ihr System dazu <img src='http://blog.alonso.ch/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>

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

<p>In meinem Fall wurde die Version 5.5.15 (64 Bit) von <a href="http://www.switch.ch" title="Switch mySQL Mirror" target="_blank">Switch.ch</a> heruntergeladen und entpackt:</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>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">mkdir</span> mysql5.5 <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">cd</span> mysql5.5
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>dev.mysql.com<span style="color: #000000; font-weight: bold;">/</span>get<span style="color: #000000; font-weight: bold;">/</span>Downloads<span style="color: #000000; font-weight: bold;">/</span>MySQL-<span style="color: #000000;">5.5</span><span style="color: #000000; font-weight: bold;">/</span>mysql-5.5.15-linux2.6-x86_64.tar.gz<span style="color: #000000; font-weight: bold;">/</span>from<span style="color: #000000; font-weight: bold;">/</span>http:<span style="color: #000000; font-weight: bold;">//</span>mirror.switch.ch<span style="color: #000000; font-weight: bold;">/</span>ftp<span style="color: #000000; font-weight: bold;">/</span>mirror<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">-O</span> mysql-5.5.15-linux2.6-x86_64.tar.gz
<span style="color: #c20cb9; font-weight: bold;">tar</span> xzvf mysql-5.5.15-linux2.6-x86_64.tar.gz</pre></div></div>

<p>In meinem Setup werden die Dateien anschliessen nach <em>/usr/share/mysql</em> verschoben und an den User <em>mysql</em> zugewiesen:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mv</span> mysql-5.5.15-linux2.6-x86_64 <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>mysql
<span style="color: #c20cb9; font-weight: bold;">chown</span> mysql:mysql <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">-R</span></pre></div></div>

<p>Als nächstes muss das mySQL-Bin Verzeichniss noch in den Path aufgenommen werden:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PATH</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #007800;">$PATH</span></pre></div></div>

<p>Wenn alles klappt &#8211; sollte mySQL nun startklar sein. Ein kleiner Test schaded aber sicherlich nicht:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mysql <span style="color: #660033;">-V</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> mysqld <span style="color: #660033;">-V</span></pre></div></div>

<p>Sollte folgendes ans Licht bringen:</p>
<pre>
mysql  Ver 14.14 Distrib 5.5.15, for linux2.6 (x86_64) using readline 5.1
mysqld  Ver 5.5.15 for linux2.6 on x86_64 (MySQL Community Server (GPL))
</pre>
<p>Wenn alles geklappt hat, sollte noch die <em>/etc/profile</em> mit dem neuen Pfad ergänz werden damit diese Änderung permant wird. Auszug:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">...
<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: #780078;">`id -u`</span>&quot;</span> <span style="color: #660033;">-eq</span> <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
  <span style="color: #007800;">PATH</span>=<span style="color: #ff0000;">&quot;/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/mysql/bin&quot;</span>
<span style="color: #000000; font-weight: bold;">else</span>
  <span style="color: #007800;">PATH</span>=<span style="color: #ff0000;">&quot;/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/local/mysql/bin&quot;</span>
<span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #7a0874; font-weight: bold;">export</span> PATH
...</pre></div></div>

<p>Nun brauchen wir noch die Konfiguration als /etc/mysql/my.cnf. Hierzu gibt es gute Templates welche übernommen werden können. In meinem Beispiel wurde die my-innodb-heavy-4G.cnf gewählt &#8211; es gäbe aber noch diverse Alternativen &#8211; am identischen Ort.</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>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>support-files<span style="color: #000000; font-weight: bold;">/</span>my-innodb-heavy-4G.cnf <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>my.cnf</pre></div></div>

<p>Folgende Anpassungen sind hier notwendig (anpassen/ergänzen):</p>
<pre>
[client]
socket          = /var/run/mysqld/mysqld.sock

[mysqld]
socket          = /var/run/mysqld/mysqld.sock
basedir         = /usr/local/mysql
datadir         = /usr/local/mysql/data
tmpdir          = /tmp
log_error       = /var/log/mysql/error.log
</pre>
<p>init.d Script erstellen:</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>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>support-files<span style="color: #000000; font-weight: bold;">/</span>mysql.server <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>mysql <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> +x <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>mysql</pre></div></div>

<p>Hier sind nun noch 2 weitere Anpassungen notwendig:</p>
<pre>
basedir=/usr/local/mysql
datadir=/var/lib/mysql/data
</pre>
<p>Basisdatenbanken anlegen:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>scripts<span style="color: #000000; font-weight: bold;">/</span>mysql_install_db <span style="color: #660033;">--user</span>=mysql <span style="color: #660033;">--basedir</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>mysql</pre></div></div>

<p>Fertig &#8211; ein erster Startversuch:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>mysql start</pre></div></div>

<p>Sicherheits-Konfiguration setzten, dafür braucht es allerdings noch einen Symlink für den Socken:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>run<span style="color: #000000; font-weight: bold;">/</span>mysqld<span style="color: #000000; font-weight: bold;">/</span>mysqld.sock <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>mysql.sock
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mysql_secure_installation</pre></div></div>

<p>Wird AIO auch wirklich angewendet? Ein Blick ins Log hilft weiter, folgender Eintrag muss erscheinen:</p>
<pre>
****** **:**:** InnoDB: Using Linux native AIO
</pre>
<p>Wenn alls OK ist &#8211; Server automatisch mit Bootprozess starten:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">update-rc.d mysql defaults</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.alonso.ch/tech/linux/debian-linux-tech/mysql-server-5-5-auf-debian-squeeze/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Howto: SNMP(D) unter Debian Squeeze</title>
		<link>http://blog.alonso.ch/paste-bin/howto-snmpd-unter-debian-squeeze/</link>
		<comments>http://blog.alonso.ch/paste-bin/howto-snmpd-unter-debian-squeeze/#comments</comments>
		<pubDate>Wed, 23 Mar 2011 00:06:45 +0000</pubDate>
		<dc:creator>Alonso</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[paste.bin]]></category>
		<category><![CDATA[Cacti]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[snmp]]></category>
		<category><![CDATA[Squeeze]]></category>

		<guid isPermaLink="false">http://blog.alonso.ch/?p=141</guid>
		<description><![CDATA[Dieses Howto soll ein kleiner Quickstart in den &#8220;neuen&#8221; SNMPD-Deamon unter Debian Squeeze sein. In diesem Fall soll der Dienst so konfiguriert werden, dass Systeminformationen über SNMP (z.B. Nagios,Cacti) abgefragt werden können. Installation der Pakete: apt-get install snmp Wer auch zukünftig seine OID&#8217;s auflösen möchte, muss sich nun neu im Non-Free Repository bedienen. Dort steht [...]]]></description>
			<content:encoded><![CDATA[<p>Dieses Howto soll ein kleiner Quickstart in den &#8220;neuen&#8221; SNMPD-Deamon unter Debian Squeeze sein. In diesem Fall soll der Dienst so konfiguriert werden, dass Systeminformationen über SNMP (z.B. <a href="http://blog.alonso.ch/tag/nagios/">Nagios</a>,<a href="http://blog.alonso.ch/tag/cacti/">Cacti</a>) abgefragt werden können.</p>
<p>Installation der Pakete:</p>

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

<p>Wer auch zukünftig seine OID&#8217;s auflösen möchte, muss sich nun neu im Non-Free Repository bedienen. Dort steht das entsprechende Paket &#8220;<em>snmp-mibs-downloader</em>&#8221; bereit.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> snmp-mibs-downloader</pre></div></div>

<p>Das wars, der SNMPD-Deamon müsste mal &#8220;laufen&#8221;. Test mittels dem entsprechenden init.d Script möglich</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>snmpd status</pre></div></div>

<p>Dort müsste man den Erfolg der bisher äussert komplexen Installation nun mittels &#8220;<em>snmpd is running</em>&#8221; bestätigt kriegen.</p>
<p><strong>Weiter gehts mit der Konfiguration:</strong><br />
<span id="more-141"></span></p>
<p>Offiziell steht das Tool <em>snmpconf</em> bereit, mit welchem man per Wizzard den Dienst konfigurieren kann. Ich pers. finde dieses Tool allerdings eher verwirrend und ineffizient. In diesem Beispiel sollen lediglich die Systeminformationen plus ein paar &#8220;externe&#8221; Scripts auf Distanz mittes SNMP v1/v2 abgefragt werden können, daher reicht eine recht magere Konfiguration. </p>
<p>/etc/snmp/snmpd.conf</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># Netzwerk
agentAddress  udp:161
&nbsp;
#Zugriffsteuerung
rocommunity public nagioshost.hallo.welt
&nbsp;
# Kontaktinformationen
syslocation Ich bin hier
syscontact ich@hallo.welt
&nbsp;
# Systemchecks
includeAllDisks  10%
load   12 10 5
&nbsp;
#Erweiterungen
exec meintest   /usr/local/bin/meintest.sh</pre></div></div>

<p>Erwähnenswert ist hier der &#8220;neue&#8221; Parameter <em>agentAddress</em> , welcher den Deamon standartmässig nur auf localhost (udp:127.0.0.1:161) bindet. Hier wahlweise die gewünschte Interface-Adresse verwenden, oder wie in meinem Beispiel auf allen IP&#8217;s des Systems horchen lassen. Alle übrigen Parameter haben sich bei Squeeze wenig verändert. Die Zugriffsteuerung wurde sogar wesentlich vereinfacht über ein view konzept &#8211; welches im aufgezeigten Beispiel allerdings komplett weggelassen wurde. Die definierte Host/Community Kombination hat so einen kompletten Lesezugriff.</p>
<p>Den Deamon neu starten &#8211; fertig:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>snmpd restart</pre></div></div>

<p>Auch hier lohnt es sich danach ein weiteres mal den &#8220;status&#8221; abzufragen:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>snmpd status</pre></div></div>

<p>Sofern vorhanden, müssen nun noch die entsprechenden Regeln in der Firewall ergänzt werden (TCP/UDP Port 161), damit der Zugriff auf Distanz auch wirklich klappt.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.alonso.ch/paste-bin/howto-snmpd-unter-debian-squeeze/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Courier SSL Zertifikate erneuern (Debian)</title>
		<link>http://blog.alonso.ch/paste-bin/courier-ssl-zertifikate-erneuern-debian/</link>
		<comments>http://blog.alonso.ch/paste-bin/courier-ssl-zertifikate-erneuern-debian/#comments</comments>
		<pubDate>Thu, 17 Mar 2011 23:58:59 +0000</pubDate>
		<dc:creator>Alonso</dc:creator>
				<category><![CDATA[Courier]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[paste.bin]]></category>
		<category><![CDATA[SSL]]></category>

		<guid isPermaLink="false">http://blog.alonso.ch/?p=136</guid>
		<description><![CDATA[Wenn der Courier IMAP und/oder POP3 Server unter Debian als Paket installiert wird, erstellt selbiges automatisch die selbstsignierten SSL-Zertifikate. Diese haben per default eine Laufzeit von 1 Jahr und müssen entsprechend erneuert werden. Unter Debian gibts dazu direkt passende Werkzeuge.. Alte Zertifikate sichern: cd /etc/courier/ mv imapd.pem imapd.pem.old mv pop3d.pem pop3d.pem.old Neue Zertifikate erstellen: mkimapdcert [...]]]></description>
			<content:encoded><![CDATA[<p>Wenn der Courier IMAP und/oder POP3 Server unter Debian als Paket installiert wird, erstellt selbiges automatisch die selbstsignierten SSL-Zertifikate. Diese haben per default eine Laufzeit von 1 Jahr und müssen entsprechend erneuert werden. Unter Debian gibts dazu direkt passende Werkzeuge..</p>
<p>Alte Zertifikate sichern:</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>courier<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">mv</span> imapd.pem imapd.pem.old
<span style="color: #c20cb9; font-weight: bold;">mv</span> pop3d.pem pop3d.pem.old</pre></div></div>

<p><span id="more-136"></span><br />
Neue Zertifikate erstellen:</p>

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

<p>Courier-SSL Dienste neu starten:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>courier-pop-ssl restart <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>courier-imap-ssl restart</pre></div></div>

<p>So &#8211; schon hat man wieder 1 Jahr lang Ruhe.. <img src='http://blog.alonso.ch/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.alonso.ch/paste-bin/courier-ssl-zertifikate-erneuern-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cowsay &#8211; Ascii Spass für die Konsole</title>
		<link>http://blog.alonso.ch/paste-bin/cowsay-ascii-spass-fur-die-konsole/</link>
		<comments>http://blog.alonso.ch/paste-bin/cowsay-ascii-spass-fur-die-konsole/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 00:55:56 +0000</pubDate>
		<dc:creator>Alonso</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[paste.bin]]></category>
		<category><![CDATA[ASCII]]></category>
		<category><![CDATA[Lenny]]></category>

		<guid isPermaLink="false">http://blog.alonso.ch/?p=57</guid>
		<description><![CDATA[Cowsay (bzw. Cowthink) erstellt ein paar simple ASCII-Grafiken auf der Konsole mit einem beliebigen Textinhalt. Könnte man z.B. benutzen um MOTD-Banner zu erstellen, oder die Benutzer über die .bashrc auf eine spezielle Art und Weise zu begrüssen. Installation unter Debian Lenny: apt-get install cowsay ln -s /usr/games/cowsay /usr/bin/cowsay Das wars eigentlich schon. Ein erster Test: [...]]]></description>
			<content:encoded><![CDATA[<p>Cowsay (bzw. Cowthink) erstellt ein paar simple ASCII-Grafiken auf der Konsole mit einem beliebigen Textinhalt. Könnte man z.B. benutzen um MOTD-Banner zu erstellen, oder die Benutzer über die .bashrc auf eine spezielle Art und Weise zu begrüssen.<br />
<span id="more-57"></span><br />
Installation unter Debian Lenny:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> cowsay
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>games<span style="color: #000000; font-weight: bold;">/</span>cowsay <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>cowsay</pre></div></div>

<p>Das wars eigentlich schon.</p>
<p>Ein erster Test:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">cowsay <span style="color: #ff0000;">&quot;blog.alonso.ch&quot;</span></pre></div></div>

<p>Müsste zu folgendem Resultat führen:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"> ________________
&lt; blog.alonso.ch &gt;
 ----------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||</pre></div></div>

<p>Unter <em>/usr/share/cowsay/cows/</em> sind ausserdem diverse Templates vorhanden, welche alternativ über den Parameter -f verwendet werden können.</p>
<p>Ein weiteres Beispiel:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">cowsay <span style="color: #660033;">-f</span> bunny <span style="color: #ff0000;">&quot;blog.alonso.ch&quot;</span></pre></div></div>

<p>Müsste zu folgendem Resultat führen:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"> ________________
&lt; blog.alonso.ch &gt;
 ----------------
  \
   \   \
        \ /\
        ( )
      .( o ).</pre></div></div>

<p>Natürlich kann die Kuh auch über die Pipe gefüttert werden.</p>
<p>Ein letztes Beispiel:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>meminfo <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> MemFree <span style="color: #000000; font-weight: bold;">|</span> cowsay <span style="color: #660033;">-f</span> tux</pre></div></div>

<p>Müsste zu folgendem Resultat führen:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">  ____________________
&lt; MemFree: 369624 kB &gt;
 --------------------
   \
    \
        .--.
       |o_o |
       |:_/ |
      //   \ \
     (|     | )
    /'\_   _/`\
    \___)=(___/</pre></div></div>

<p>Natürlich kann die Kuh noch viel mehr, siehe Manpage</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.alonso.ch/paste-bin/cowsay-ascii-spass-fur-die-konsole/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quickstart: Nagios3 auf Debian Lenny installieren</title>
		<link>http://blog.alonso.ch/tech/nagios/quickstart-nagios3-auf-debian-lenny-installieren/</link>
		<comments>http://blog.alonso.ch/tech/nagios/quickstart-nagios3-auf-debian-lenny-installieren/#comments</comments>
		<pubDate>Sun, 20 Dec 2009 15:49:38 +0000</pubDate>
		<dc:creator>Alonso</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[Lenny]]></category>

		<guid isPermaLink="false">http://blog.alonso.ch/?p=10</guid>
		<description><![CDATA[Die Basisinstallation von Nagios3 unter Debian Lenny ist eigentlich keine grosse Herausforderung und innert Minuten erledigt. Die Anforderungen: Betriebsfähiges Debian Lenny (32 oder 64Bit) mit intaktem Netzwerksetup Konsole oder SSH Zugang mit Root-Account ca. 200MB freier Speicherplatz (/usr, /var) Texteditor (z.B. vim) Die Installation kann direkt über die Packete aus dem Repository gestartet werden: apt-get [...]]]></description>
			<content:encoded><![CDATA[<p>Die Basisinstallation von Nagios3 unter Debian Lenny ist eigentlich keine grosse Herausforderung und innert Minuten erledigt.</p>
<p>Die Anforderungen:</p>
<ol>
<li>Betriebsfähiges Debian Lenny (32 oder 64Bit) mit intaktem Netzwerksetup</li>
<li>Konsole oder SSH Zugang mit Root-Account</li>
<li>ca. 200MB freier Speicherplatz (/usr, /var)</li>
<li>Texteditor (z.B. vim)</li>
</ol>
<p><span id="more-10"></span></p>
<p>Die Installation kann direkt über die Packete aus dem Repository gestartet werden:</p>

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

<p>(Durch die Packetabhängigkeiten werden alle notwendigen Packete automatisch mitinstalliert)</p>
<p>Damit ist schon ein beachtlicher Teil der Installation erledigt. Nun braucht es noch ein paar kleine Anpassungen.</p>
<p>Die Nagios-Konfiguration ist weitgehend unter /etc/nagios3 zu finden. Dort brauchen wir als erstes nun einen gültigen User für die HTTP-Autentifizierung.</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>nagios3
htpasswd <span style="color: #660033;">-c</span> htpasswd.users IHRBENUTZERNAME</pre></div></div>

<p>Danach wird das Passwort abgefragt. Mit diese Kombination aus User/Passwort können wir uns anschliessend auf unserer Nagios-Installation anmelden.</p>
<p>Als nächstes sollten wir nun die external commands aktivieren. Dadurch können wir direkt über Weboberfläche die Alarmierung aktivieren/deaktivieren.</p>
<p>Dazu bearbeiten wir die nagios.cfg:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>nagios3<span style="color: #000000; font-weight: bold;">/</span>nagios.cfg</pre></div></div>

<p>Dort suchen wir uns folgende Zeile:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">check_external_commands=0</pre></div></div>

<p>Diese aktivieren wir durch ändern dieses Wertes auf 1:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">check_external_commands=1</pre></div></div>

<p>Danach müssen noch die Berechtigungen auf dem Filesystem angepasst werden, wa wir sonst diesen Fehler erhalten:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Error: Could not stat() command file '/var/lib/nagios3/rw/nagios.cmd'!</pre></div></div>

<p>Dies können wir relativ einfach beheben durch:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">touch</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>nagios3<span style="color: #000000; font-weight: bold;">/</span>rw<span style="color: #000000; font-weight: bold;">/</span>nagios.cmd
dpkg-statoverride <span style="color: #660033;">--update</span> <span style="color: #660033;">--add</span> nagios www-data <span style="color: #000000;">2710</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>nagios3<span style="color: #000000; font-weight: bold;">/</span>rw
dpkg-statoverride <span style="color: #660033;">--update</span> <span style="color: #660033;">--add</span> nagios nagios <span style="color: #000000;">751</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>nagios3
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>nagios3 restart</pre></div></div>

<p>Das wars. Nun sollten sie unter http://NAGIOSIP/nagios3 auf ihr soeben installiertes Nagios zugreiffen können. </p>
<p>Natürlich braucht unser Nagios danach noch eine <a href="http://blog.alonso.ch/tech/nagios-basiskonfiguration/">Konfiguration</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.alonso.ch/tech/nagios/quickstart-nagios3-auf-debian-lenny-installieren/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

