<?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>Journal « Raphael Kallensee &#187; javascript</title>
	<atom:link href="http://raphael.kallensee.name/journal/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://raphael.kallensee.name/journal</link>
	<description>Web, Mobile, Design, Music.</description>
	<lastBuildDate>Sun, 08 Jan 2012 18:00:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<atom:link rel="hub" href="http://rkallensee.superfeedr.com/" />
	<atom:link rel="hub" href="http://pubsubhubbub.appspot.com/" />
			<item>
		<title>Installation von Etherpad Lite auf Ubuntu 10.04 Server und Apache als Reverse-Proxy + Upstart</title>
		<link>http://raphael.kallensee.name/journal/etherpad-lite-auf-ubuntu-server-apache-upstart/</link>
		<comments>http://raphael.kallensee.name/journal/etherpad-lite-auf-ubuntu-server-apache-upstart/#comments</comments>
		<pubDate>Sun, 18 Sep 2011 19:48:30 +0000</pubDate>
		<dc:creator>Raphael Kallensee</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[WebDevelopment]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[FLOSS]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Node.js]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://raphael.kallensee.name/journal/?p=347</guid>
		<description><![CDATA[Etherpad Lite ist eine Neuentwicklung des kollaborativen Real-Time-Texteditors Etherpad in Node.js. Ausprobiert werden kann Etherpad Lite beispielsweise unter beta.etherpad.org. Die ursprüngliche Etherpad-Software ist enorm ressourcenhungrig und die Codebase sehr umfangreich &#8211; insbesondere die hohen Anforderungen an den Arbeitsspeicher (im laufenden Betrieb wohl ca. 1 GB!) hielten mich von der Installation auf meinem Server ab. Etherpad [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://raphael.kallensee.name/journal/wp-content/uploads/2011/09/etherpad-lite.png"><img src="http://raphael.kallensee.name/journal/wp-content/uploads/2011/09/etherpad-lite-300x138.png" alt="Screenshot von Etherpad Lite, einem kollaborativen Texteditor" title="Etherpad Lite" width="300" height="138" class="alignleft size-medium wp-image-358" /></a><a href="http://etherpad.org/">Etherpad Lite</a> ist eine <a href="http://etherpad.org/2011/08/22/major-release-etherpad-lite-v1/">Neuentwicklung</a> des kollaborativen Real-Time-Texteditors Etherpad in <a href="http://nodejs.org/">Node.js</a>. Ausprobiert werden kann Etherpad Lite beispielsweise unter <a href="http://beta.etherpad.org/">beta.etherpad.org</a>.</p>
<p>Die ursprüngliche Etherpad-Software ist enorm ressourcenhungrig und die Codebase sehr umfangreich &#8211; insbesondere die hohen Anforderungen an den Arbeitsspeicher (im laufenden Betrieb wohl ca. 1 GB!) hielten mich von der Installation auf meinem Server ab. Etherpad Lite hingegen begnügt sich nach eigenen Angaben im laufenden Betrieb mit <a href="https://github.com/Pita/etherpad-lite#readme">rund 30 MB Arbeitsspeicher</a>.</p>
<p>Diese Anleitung beschreibt die Installation von Node.js, NPM und Etherpad Lite auf Ubuntu 10.04 Server. Da in den meisten Fällen auf Port 80 eines bestehenden Servers bereits ein Webserver (in meinem Fall Apache) läuft, wird Etherpad Lite hinter Apache als Reverse-Proxy (via mod_proxy) installiert. Sicherlich nicht die beste Lösung, eine &#8220;<a href="http://nodejs.org/jsconf.pdf">non-blocking</a>&#8221; Node.js-Applikation hinter einem &#8220;blocking&#8221; Apache-Server zu installieren &#8211; <a href="http://de.wikipedia.org/wiki/Nginx">Nginx</a> wäre hier sicherlich eine bessere Wahl. Aber vorerst soll Apache als Reverse-Proxy genügen. Des weiteren richten wir eine Upstart-Konfiguration ein, die Etherpad Lite nach jedem Reboot automatisch startet.</p>
<h3>Installation von Node.js</h3>
<p>Zunächst installieren wir Node.js auf dem Server. Die Version in den Ubuntu-Paketquellen ist deutlich zu alt, deshalb müssen wir selbst kompilieren. Da wir Node.js, den Node-Paketmanager NPM und die Applikation aus Sicherheitsgründen unter einem eigenen User installieren möchten, legen wir diesen zunächst an:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">groupadd nodejs
useradd <span style="color: #660033;">-g</span> nodejs <span style="color: #660033;">-s</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;">bash</span> <span style="color: #660033;">-d</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>nodejs nodejs
<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>lib<span style="color: #000000; font-weight: bold;">/</span>nodejs
<span style="color: #c20cb9; font-weight: bold;">chown</span> nodejs:nodejs <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>nodejs</pre></div></div>

<p>Nun wurde der User nodejs angelegt, sein Home-Verzeichnis ist /var/lib/nodejs. Nun bereiten wir den User für die Installation von Node.js und NPM vor &#8211; wir wechseln in den User nodejs:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">su</span> nodejs
<span style="color: #7a0874; font-weight: bold;">cd</span> ~</pre></div></div>

<p>Der folgende Inhalt muss in die Datei /var/lib/nodejs/.npmrc:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root =    <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>nodejs<span style="color: #000000; font-weight: bold;">/</span>.node_modules
binroot = <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>nodejs<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin
manroot = <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>nodejs<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">man</span></pre></div></div>

<p>Die entsprechenden Ordner müssen nun noch angelegt werden:</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><span style="color: #7a0874; font-weight: bold;">local</span>
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> ~<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> ~<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>share
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> ~<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">man</span></pre></div></div>

<p>Nun fügen wir den Ordner ~/local/bin noch zum PATH hinzu &#8211; die folgende Zeile muss zum einen in die Datei /var/lib/nodejs/.bashrc, zum anderen einmal in der Shell eingegeben 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: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #007800;">$PATH</span></pre></div></div>

<p>Jetzt installieren wir die notwendigen Abhängigkeiten über apt / aptitude:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> build-essential python libssl-dev git-core libsqlite3-dev <span style="color: #c20cb9; font-weight: bold;">gzip</span> curl</pre></div></div>

<p>Nun kann Node.js heruntergeladen und kompiliert werden. Dazu &#8220;klonen&#8221; wir das Git-Repository und checken die letzte stabile Version aus &#8211; was spätere Updates erleichtert.</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>local<span style="color: #000000; font-weight: bold;">/</span>src
<span style="color: #7a0874; font-weight: bold;">cd</span> ~<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>src
<span style="color: #c20cb9; font-weight: bold;">git</span> clone <span style="color: #c20cb9; font-weight: bold;">git</span>:<span style="color: #000000; font-weight: bold;">//</span>github.com<span style="color: #000000; font-weight: bold;">/</span>joyent<span style="color: #000000; font-weight: bold;">/</span>node.git
<span style="color: #7a0874; font-weight: bold;">cd</span> node
<span style="color: #c20cb9; font-weight: bold;">git</span> checkout v0.4.12
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<h3>Installation von NPM</h3>
<p>Jetzt ist Node.js installiert &#8211; wir benötigen aber noch den Node.js-Paketmanager NPM. Den installieren wir ebenfalls aus den GIT-Quellen:</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>local<span style="color: #000000; font-weight: bold;">/</span>src
<span style="color: #c20cb9; font-weight: bold;">git</span> clone https:<span style="color: #000000; font-weight: bold;">//</span>github.com<span style="color: #000000; font-weight: bold;">/</span>isaacs<span style="color: #000000; font-weight: bold;">/</span>npm.git
<span style="color: #7a0874; font-weight: bold;">cd</span> npm
<span style="color: #c20cb9; font-weight: bold;">git</span> checkout v1.0.30
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>Zu guter letzt legen wir noch einen Symlink an, damit NPM später das Verzeichnis für die Node-Module findet, das wir weiter oben bereits konfiguriert haben:</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>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>node_modules ~<span style="color: #000000; font-weight: bold;">/</span>.node_modules</pre></div></div>

<h3>Installation von Etherpad Lite</h3>
<p>Nun sind endlich die Voraussetzungen gegeben, um Etherpad Lite zu installieren. Dies tun wir ebenfalls aus den GIT-Quellen. Danach rufen wir ein Shell-Script auf, um die Abhängigkeiten zu installieren.</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>node-apps
<span style="color: #7a0874; font-weight: bold;">cd</span> ~<span style="color: #000000; font-weight: bold;">/</span>node-apps
<span style="color: #c20cb9; font-weight: bold;">git</span> clone <span style="color: #c20cb9; font-weight: bold;">git</span>:<span style="color: #000000; font-weight: bold;">//</span>github.com<span style="color: #000000; font-weight: bold;">/</span>Pita<span style="color: #000000; font-weight: bold;">/</span>etherpad-lite.git
<span style="color: #7a0874; font-weight: bold;">cd</span> etherpad-lite
.<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>installDeps.sh</pre></div></div>

<p>Jetzt kann die Konfiguration angepasst werden, die sich in der Datei <code>/var/lib/nodejs/node-apps/etherpad-lite/settings.json</code> befindet. Da ich das Etherpad mit MySQL als Datenbank betreiben möchte, kommentiere ich die vorhandene SQLite-Konfiguration aus und füge den MySQL-Benutzer und den Datenbank-Namen hinzu, die ich beide vorher angelegt habe. Den &#8220;loglevel&#8221; setze ich außerdem auf &#8220;WARN&#8221;, um nicht zu viele unnötige Log-Meldungen zu schreiben.</p>
<p>Jetzt legen wir gleich eine Upstart-Konfiguration an, um sicherzustellen, dass das Etherpad nach jedem System-Neustart automatisch gestartet wird. Für eine regelmäßige Überwachung und ggf. Neustart des Etherpads im Fehlerfalle bietet sich <a href="http://mmonit.com/monit/">Monit</a> an &#8211; was aber nicht Teil dieses Artikels sein soll.</p>
<p>Wir legen nun die Datei <code>/etc/init/etherpad-lite.conf</code> mit folgendem Inhalt an (auf Grundlage <a href="https://github.com/Pita/etherpad-lite/wiki/How-to-deploy-Etherpad-Lite-as-a-service">dieser Quelle</a>):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">description <span style="color: #ff0000;">&quot;etherpad-lite&quot;</span>
&nbsp;
start on started networking
stop on runlevel <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">!</span><span style="color: #000000;">2345</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">env</span> <span style="color: #007800;">NODEBIN</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>nodejs<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>node
<span style="color: #c20cb9; font-weight: bold;">env</span> <span style="color: #007800;">EPHOME</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>nodejs<span style="color: #000000; font-weight: bold;">/</span>node-apps<span style="color: #000000; font-weight: bold;">/</span>etherpad-lite
<span style="color: #c20cb9; font-weight: bold;">env</span> <span style="color: #007800;">EPLOGS</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>etherpad-lite
<span style="color: #c20cb9; font-weight: bold;">env</span> <span style="color: #007800;">EPUSER</span>=nodejs
&nbsp;
pre-start script
    chdir <span style="color: #007800;">$EPHOME</span>
    <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #007800;">$EPLOGS</span>                              <span style="color: #000000; font-weight: bold;">||</span><span style="color: #c20cb9; font-weight: bold;">true</span>
    <span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #007800;">$EPUSER</span>:admin <span style="color: #007800;">$EPLOGS</span>                <span style="color: #000000; font-weight: bold;">||</span><span style="color: #c20cb9; font-weight: bold;">true</span>
    <span style="color: #c20cb9; font-weight: bold;">chmod</span> 0755 <span style="color: #007800;">$EPLOGS</span>                         <span style="color: #000000; font-weight: bold;">||</span><span style="color: #c20cb9; font-weight: bold;">true</span>
    <span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> <span style="color: #007800;">$EPUSER</span>:admin <span style="color: #007800;">$EPHOME</span><span style="color: #000000; font-weight: bold;">/</span>var         <span style="color: #000000; font-weight: bold;">||</span><span style="color: #c20cb9; font-weight: bold;">true</span>
<span style="color: #666666; font-style: italic;">#    exec su -s /bin/bash -c 'exec &quot;$0&quot; &quot;$@&quot;' $EPUSER $EPHOME/bin/installDeps.sh &gt;&gt; $EPLOGS/error.log || { stop; exit 1; }</span>
end script
&nbsp;
script
  <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #007800;">$EPHOME</span><span style="color: #000000; font-weight: bold;">/</span>node
  <span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #c20cb9; font-weight: bold;">su</span> <span style="color: #660033;">-s</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;">bash</span> <span style="color: #660033;">-c</span> <span style="color: #ff0000;">'exec &quot;$0&quot; &quot;$@&quot;'</span> <span style="color: #007800;">$EPUSER</span> <span style="color: #007800;">$NODEBIN</span> server.js \
                        <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #007800;">$EPLOGS</span><span style="color: #000000; font-weight: bold;">/</span>access.log \
                        <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #007800;">$EPLOGS</span><span style="color: #000000; font-weight: bold;">/</span>error.log
end script</pre></div></div>

<p><em>(Diese Upstart-Konfiguration ist noch nicht optimal &#8211; spontan gelang es mir nicht, das Shell-Script <code>installDeps.sh</code> im pre-start erfolgreich auszuführen. Deshalb muss man daran denken, dieses Script nach einem Etherpad-Update manuell auszuführen.)</em></p>
<p>Jetzt kann Etherpad ganz einfach mittels</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">start etherpad-lite</pre></div></div>

<p>gestartet werden.</p>
<h3>Einrichtung des Apache Reverse-Proxys</h3>
<p>Nun richten wir Apache ein, damit Etherpad auf Port 80 erreichbar ist. Dafür verwenden wir z.B. die Subdomain etherpad.example.lit &#8211; und folgende virtuelle Host-Konfiguration (beispielsweise in der Datei /etc/apache2/sites-available/etherpad.example.lit):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;</span>virtualhost <span style="color: #000000; font-weight: bold;">*</span>:<span style="color: #000000;">80</span><span style="color: #000000; font-weight: bold;">&gt;</span>
        ServerName etherpad.example.lit
&nbsp;
        ServerAdmin webmaster<span style="color: #000000; font-weight: bold;">@</span>localhost
&nbsp;
        <span style="color: #000000; font-weight: bold;">&lt;</span>ifmodule mod_proxy.c<span style="color: #000000; font-weight: bold;">&gt;</span>
            ProxyVia On
            ProxyRequests Off
            ProxyPass <span style="color: #000000; font-weight: bold;">/</span> http:<span style="color: #000000; font-weight: bold;">//</span>localhost:<span style="color: #000000;">9001</span><span style="color: #000000; font-weight: bold;">/</span>
            ProxyPassReverse <span style="color: #000000; font-weight: bold;">/</span> http:<span style="color: #000000; font-weight: bold;">//</span>localhost:<span style="color: #000000;">9001</span><span style="color: #000000; font-weight: bold;">/</span>
            ProxyPreserveHost on
            <span style="color: #000000; font-weight: bold;">&lt;</span>proxy <span style="color: #000000; font-weight: bold;">*&gt;</span>
                Options FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
            <span style="color: #000000; font-weight: bold;">&lt;/</span>proxy<span style="color: #000000; font-weight: bold;">&gt;</span>
        <span style="color: #000000; font-weight: bold;">&lt;/</span>ifmodule<span style="color: #000000; font-weight: bold;">&gt;</span>
&nbsp;
        ErrorLog <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>etherpad-lite<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>error.log
&nbsp;
        <span style="color: #666666; font-style: italic;"># Possible values include: debug, info, notice, warn, error, crit,</span>
        <span style="color: #666666; font-style: italic;"># alert, emerg.</span>
        LogLevel warn
&nbsp;
        CustomLog <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>etherpad-lite<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>access.log combined
        ServerSignature Off
<span style="color: #000000; font-weight: bold;">&lt;/</span>virtualhost<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>Wichtig: das Verzeichnis <code>/var/log/etherpad-lite/apache2/</code> für die Apache-Logs muss angelegt werden!</p>
<p>Daraufhin kann der oben angelegte virtuelle Apache-Host aktiviert werden. Außerdem müssen die Apache-Module mod_proxy und mod_proxy_http aktiviert sein, danach kann die Apache-Konfiguration neu geladen werden:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">a2ensite etherpad.example.lit
a2enmod proxy proxy_http
<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>apache2 reload</pre></div></div>

<p>Nun sollte das Etherpad unter http://etherpad.example.lit erreichbar sein!</p>
<h3>Konfiguration von Logrotate</h3>
<p>Wir haben nun einige Log-Dateien unterhalb von <code>/var/log/etherpad-lite/</code>, die schnell sehr groß werden können. Deshalb konfigurieren wir Logrotate so, dass diese Dateien wöchentlich rotiert und gepackt und für acht Wochen vorgehalten werden. Dazu fügen wir einfach folgende Zeilen zur <code>/etc/logrotate.conf</code> hinzu &#8211; oder legen eine <code>/etc/logrotate.d/etherpadlite</code> mit dem folgenden Inhalt an:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># rotate etherpad lite logs</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>etherpad-lite<span style="color: #000000; font-weight: bold;">/*</span>.log <span style="color: #7a0874; font-weight: bold;">&#123;</span>
        weekly
        missingok
        rotate <span style="color: #000000;">8</span>
        compress
        notifempty
<span style="color: #7a0874; font-weight: bold;">&#125;</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>etherpad-lite<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/*</span>.log <span style="color: #7a0874; font-weight: bold;">&#123;</span>
        weekly
        missingok
        rotate <span style="color: #000000;">8</span>
        compress
        notifempty
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

<h3>Installation von Abiword für Import/Export (optional)</h3>
<p>Für den erweiterten Import/Export muss die Textverarbeitungs-Software <a href="http://www.abisource.com/">Abiword</a> installiert werden &#8211; deren Binaries benutzt Etherpad zum Lesen und Schreiben von Dokumenten. In Ubuntu 10.04 ist Abiword in den Paketquellen vorhanden, deshalb reicht ein:</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> abiword</pre></div></div>

<p>Daraufhin muss in der <code>/var/lib/nodejs/node-apps/etherpad-lite/settings.json</code> der Pfad zum Abiword-Binary angepasst werden:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">/* This is the path to the Abiword executable. Setting it to null, disables abiword.
     Abiword is needed to enable the import/export of pads*/</span>
  <span style="color: #3366CC;">&quot;abiword&quot;</span> <span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;/usr/bin/abiword&quot;</span><span style="color: #339933;">,</span></pre></div></div>

<p>Nach einem Neustart mittels</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">stop etherpad-lite
start etherpad-lite</pre></div></div>

<p>stehen die erweiterten Import-/Export-Funktionen zur Verfügung &#8211; dann kann ein Pad beispielsweise auch als PDF exportiert werden.</p>
<h3>Abschluss</h3>
<p>Etherpad Lite ist meiner Meinung nach ein sehr nützliches Tool, um gemeinsam Dokumente zu bearbeiten, Protokolle und To-Do-Listen zu erstellen usw. &#8211; was durch die Export-Funktion in viele Formate sehr gut ergänzt wird. Es existieren auch bereits viele Bibliotheken und Plugins, welche die HTTP-API von Etherpad nutzen, um Etherpads in eigenen Applikationen bequem einzubinden &#8211; Libraries für <a href="https://github.com/jhollinger/ruby-etherpad-lite">Ruby</a>, <a href="https://github.com/tomnomnom/etherpad-lite-client">PHP</a>, ein <a href="https://github.com/johnyma22/etherpad-lite-jquery-plugin">jQuery-Plugin</a>, ein <a href="http://drupal.org/sandbox/webflo/1255474">Drupal-Modul</a> (im Entwicklungsstadium) und viele mehr.</p>
<p>Ein Hinweis zum Schluss: diese Anleitung stellt sicher kein Optimum dar &#8211; jedoch war es mir wichtig, Node.JS sowie NPM nicht als <code>root</code>-User zu installieren. Deshalb weicht diese Anleitung zum Teil von den meisten im Netz zu findenden Anleitungen ab. Verbesserungsvorschläge nehme ich gern per Kommentar oder E-Mail entgegen!</p>
<p>Quellen und weiterführende Links:</p>
<ul>
<li><a href="http://mrtopf.de/blog/de/ein-besseres-etherpad-dank-etherpad-lite/">Ein besseres Etherpad dank Etherpad Lite!</a></li>
<li><a href="https://github.com/joyent/node/wiki/Installation">Building and Installing Node.js</a></li>
<li><a href="https://github.com/Pita/etherpad-lite#readme">Etherpad Lite Readme</a></li>
<li><a href="http://tnovelli.net/blog/blog.2011-08-27.node-npm-user-install.html">Node.js HOWTO: Install NPM as user (not root)</a></li>
<li><a href="http://mclear.co.uk/2011/08/01/install-etherpad-lite-on-ubuntu/">Install Etherpad Lite on Ubuntu and Debian</a></li>
<li><a href="http://stackoverflow.com/questions/6514621/npm-install-locally">npm install locally</a></li>
<li><a href="https://github.com/Pita/etherpad-lite/wiki/How-to-put-Etherpad-Lite-behind-a-reverse-Proxy">How to put Etherpad Lite behind a reverse Proxy</a></li>
<li><a href="http://howtonode.org/deploying-node-upstart-monit">Deploying Node.js With Upstart and Monit</a></li>
<li><a href="http://kevin.vanzonneveld.net/techblog/article/run_nodejs_as_a_service_on_ubuntu_karmic/">Run Node.js as a Service on Ubuntu</a></li>
<li><a href="https://github.com/Pita/etherpad-lite/wiki/How-to-deploy-Etherpad-Lite-as-a-service">How to deploy Etherpad Lite as a service</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://raphael.kallensee.name/journal/etherpad-lite-auf-ubuntu-server-apache-upstart/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PRODROMUS, ein minimaler JavaScript-XMPP-Client</title>
		<link>http://raphael.kallensee.name/journal/prodromus-ein-minimaler-javascript-xmpp-client/</link>
		<comments>http://raphael.kallensee.name/journal/prodromus-ein-minimaler-javascript-xmpp-client/#comments</comments>
		<pubDate>Sat, 28 Aug 2010 01:01:12 +0000</pubDate>
		<dc:creator>Raphael Kallensee</dc:creator>
				<category><![CDATA[WebDevelopment]]></category>
		<category><![CDATA[FLOSS]]></category>
		<category><![CDATA[jabber]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[libre]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[xmpp]]></category>

		<guid isPermaLink="false">http://raphael.kallensee.name/journal/?p=297</guid>
		<description><![CDATA[Auf meiner Kontakt-Seite befindet sich schon eine Weile mein XMPP-MiniChat-Client &#8220;PRODROMUS&#8221;. Nun habe ich ihn endlich unter der AGPL veröffentlicht. &#8220;Prodromus&#8221; steht lateinisch für &#8220;Eilbote&#8221;. PRODROMUS ist ein simpler XMPP-Client, der vollständig in JavaScript geschrieben ist. Er benutzt die großartige Bibliothek Strophe.js von Jack Moffit, um sich zu einem XMPP-Server zu verbinden und ermöglicht es [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://raphael.kallensee.name/journal/wp-content/uploads/2010/08/prodromus_de.png"><img src="http://raphael.kallensee.name/journal/wp-content/uploads/2010/08/prodromus_de-280x300.png" alt="PRODROMUS Mini-XMPP-Client" title="prodromus_de" width="280" height="300" class="alignleft size-medium wp-image-298" /></a>Auf meiner <a href="/kontakt">Kontakt</a>-Seite befindet sich schon eine Weile mein XMPP-MiniChat-Client &#8220;PRODROMUS&#8221;. Nun habe ich ihn endlich unter der <a href="http://de.wikipedia.org/wiki/GNU_Affero_General_Public_License">AGPL</a> <a href="http://forge.webpresso.net/projects/prodromus">veröffentlicht</a>. &#8220;Prodromus&#8221; steht lateinisch für &#8220;Eilbote&#8221;.</p>
<p>PRODROMUS ist ein simpler <a href="http://de.wikipedia.org/wiki/Extensible_Messaging_and_Presence_Protocol">XMPP</a>-Client, der vollständig in JavaScript geschrieben ist. Er benutzt die großartige Bibliothek <a href="http://code.stanziq.com/strophe/">Strophe.js</a> von <a href="http://metajack.im/">Jack Moffit</a>, um sich zu einem XMPP-Server zu verbinden und ermöglicht es somit dem Besucher, mit einer vorkonfigurierten Person via XMPP zu kommunizieren. PRODROMUS ist als Ergänzung zu einem Kontaktformular gedacht &#8211; er lässt sich in bestehende Websites einbinden und erweitert die Kontaktmöglichkeiten um Echtzeit-Kommunikation.</p>
<p>Eine kurze Installationsanleitung sowie die erforderlichen Voraussetzungen gibt es <a href="http://forge.webpresso.net/projects/prodromus/wiki">im Wiki</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://raphael.kallensee.name/journal/prodromus-ein-minimaler-javascript-xmpp-client/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Prototype endlich mit Dokumentation</title>
		<link>http://raphael.kallensee.name/journal/prototype-endlich-mit-dokumentation/</link>
		<comments>http://raphael.kallensee.name/journal/prototype-endlich-mit-dokumentation/#comments</comments>
		<pubDate>Sat, 20 Jan 2007 12:12:43 +0000</pubDate>
		<dc:creator>Raphael Kallensee</dc:creator>
				<category><![CDATA[WebDevelopment]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.kallensee.info/journal/index.php/2007/01/20/prototype-endlich-mit-dokumentation/</guid>
		<description><![CDATA[Das mächtige JavaScript-Framework Prototype hat eine neue Website, auf der auch endlich Dokumentationen zu finden sind bzw. sein werden.]]></description>
			<content:encoded><![CDATA[<p>Das mächtige JavaScript-Framework Prototype hat eine neue <a href="http://prototypejs.org/" target="_blank">Website</a>, auf der auch endlich Dokumentationen zu finden sind bzw. sein werden.</p>
]]></content:encoded>
			<wfw:commentRss>http://raphael.kallensee.name/journal/prototype-endlich-mit-dokumentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>moo.fx &#8211; JavaScript-Effekte in 3KB</title>
		<link>http://raphael.kallensee.name/journal/moofx-javascript-effekte-in-3kb/</link>
		<comments>http://raphael.kallensee.name/journal/moofx-javascript-effekte-in-3kb/#comments</comments>
		<pubDate>Wed, 20 Sep 2006 16:50:26 +0000</pubDate>
		<dc:creator>Raphael Kallensee</dc:creator>
				<category><![CDATA[WebDevelopment]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.kallensee.info/journal/index.php/2006/09/20/moofx-javascript-effekte-in-3kb/</guid>
		<description><![CDATA[Unglaublich, was man in 3 Kilobyte so alles unterbringen kann, wenn man nur will. Die JavaScript-Bibliothek moo.fx stellt sehr nützliche Effekte für Webdesigner bereit. Wer ein wenig mehr will &#8211; und noch ein paar Kilobyte mehr investiert &#8211; bekommt mit mootools ein komplettes Framework. Darin enthalten ist unter anderem die Effektbibliothek moo.fx, moo.ajax für Ajax-Applikationen, [...]]]></description>
			<content:encoded><![CDATA[<p>Unglaublich, was man in 3 Kilobyte so alles unterbringen kann, wenn man nur will. Die JavaScript-Bibliothek <a href="http://moofx.mad4milk.net/" target="_blank">moo.fx</a> stellt sehr nützliche Effekte für Webdesigner bereit. </p>
<p>Wer ein wenig mehr will &#8211; und noch ein paar Kilobyte mehr investiert &#8211; bekommt mit <a href="http://mootools.net/" target="_blank">mootools</a> ein komplettes Framework. Darin enthalten ist unter anderem die Effektbibliothek moo.fx, moo.ajax für Ajax-Applikationen, moo.dom, Drag&#038;Drop-Funktionen und einiges mehr.</p>
]]></content:encoded>
			<wfw:commentRss>http://raphael.kallensee.name/journal/moofx-javascript-effekte-in-3kb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AJAX, let&#8217;s go&#8230;</title>
		<link>http://raphael.kallensee.name/journal/ajax-lets-go/</link>
		<comments>http://raphael.kallensee.name/journal/ajax-lets-go/#comments</comments>
		<pubDate>Mon, 24 Apr 2006 22:04:51 +0000</pubDate>
		<dc:creator>Raphael Kallensee</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[WebDevelopment]]></category>
		<category><![CDATA[2.0]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.kallensee.info/journal/index.php/2006/04/24/ajax-lets-go/</guid>
		<description><![CDATA[Für den Eistieg in die AJAX-Welt habe ich ein schönes Beispiel-Skript gefunden, das die Funktionsweise der &#8220;Technologie&#8221; recht einfach demonstriert: Super AJAX Programming Seed.]]></description>
			<content:encoded><![CDATA[<p>Für den Eistieg in die <a href="http://de.wikipedia.org/wiki/Ajax_(Programmierung)">AJAX</a>-Welt habe ich ein schönes Beispiel-Skript gefunden, das die Funktionsweise der &#8220;Technologie&#8221; recht einfach demonstriert: <a href="http://www.impliedbydesign.com/super-ajax-programming-seed.html">Super AJAX Programming Seed</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://raphael.kallensee.name/journal/ajax-lets-go/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

