Files
siarp.de/public/node/167/index.html
T
Martin Stadler 1c6e73937f cleanup project
* remove httrack meta files
* rename site dir to "public"
2019-12-08 14:00:25 +01:00

224 lines
12 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"
"http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" version="XHTML+RDFa 1.0" dir="ltr">
<!-- Mirrored from siarp.de/node/167 by HTTrack Website Copier/3.x [XR&CO'2014], Sun, 08 Dec 2019 12:01:20 GMT -->
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=utf-8" /><!-- /Added by HTTrack -->
<head profile="http://www.w3.org/1999/xhtml/vocab">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Generator" content="Drupal 7 (http://drupal.org)" />
<link rel="canonical" href="index.html" />
<link rel="shortlink" href="index.html" />
<title>Buildout-basiertes Zope2 (Plone) unter Debian/Ubuntu installieren | siarp.de</title>
<link type="text/css" rel="stylesheet" href="../../sites/siarp.de/files/css/css_xE-rWrJf-fncB6ztZfd2huxqgxu4WO-qwma6Xer30m4.css" media="all" />
<link type="text/css" rel="stylesheet" href="../../sites/siarp.de/files/css/css_NdVgz6YKifxQUEsW5xls_zI7Pn2F7E5U5Wb29zcu3vo.css" media="all" />
<link type="text/css" rel="stylesheet" href="../../sites/siarp.de/files/css/css_OAqUol8y_hmU_lCucLyaRX-a1G627sWWbvG_VG1GKnE.css" media="all" />
<link type="text/css" rel="stylesheet" href="../../sites/siarp.de/files/css/css_xPIRNNJGw8EiKyuE5b-xAtWWTQ8U1_huTr4xL09Dq2A.css" media="all" />
<link type="text/css" rel="stylesheet" href="../../sites/siarp.de/files/css/css_k3snrbsthqot7V7ccRZHS9OkCZkwBv4adtNieIVlbEU.css" media="print" />
<!--[if lt IE 7]>
<link type="text/css" rel="stylesheet" href="http://siarp.de/themes/garland/fix-ie.css?q26w7t" media="all" />
<![endif]-->
<script type="text/javascript" src="../../sites/siarp.de/files/js/js_qikmINIYTWe4jcTUn8cKiMr8bmSDiZB9LQqvceZ6wlM.js"></script>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
jQuery.extend(Drupal.settings, {"basePath":"\/","pathPrefix":"","ajaxPageState":{"theme":"garland","theme_token":"QthI8cnrtmXdNIQpDE9MhabOwPI60Zp5BSLArZJrIi4","js":{"misc\/jquery.js":1,"misc\/jquery-extend-3.4.0.js":1,"misc\/jquery.once.js":1,"misc\/drupal.js":1},"css":{"modules\/system\/system.base.css":1,"modules\/system\/system.menus.css":1,"modules\/system\/system.messages.css":1,"modules\/system\/system.theme.css":1,"modules\/comment\/comment.css":1,"modules\/field\/theme\/field.css":1,"modules\/node\/node.css":1,"modules\/user\/user.css":1,"sites\/all\/modules\/views\/css\/views.css":1,"sites\/all\/modules\/ctools\/css\/ctools.css":1,"public:\/\/geshi\/geshifilter-languages.css":1,"sites\/siarp.de\/modules\/geshifilter\/geshifilter.css":1,"themes\/garland\/style.css":1,"themes\/garland\/print.css":1,"themes\/garland\/fix-ie.css":1}}});
//--><!]]>
</script>
</head>
<body class="html not-front not-logged-in one-sidebar sidebar-second page-node page-node- page-node-167 node-type-story fluid-width" >
<div id="skip-link">
<a href="#main-content" class="element-invisible element-focusable">Skip to main content</a>
</div>
<div id="wrapper">
<div id="container" class="clearfix">
<div id="header">
<div id="logo-floater">
<div id="branding"><strong><a href="../../">
<span>siarp.de</span> </a></strong></div>
</div>
</div> <!-- /#header -->
<div id="center"><div id="squeeze"><div class="right-corner"><div class="left-corner">
<h2 class="element-invisible">You are here</h2><div class="breadcrumb"><a href="../../">Home</a></div> <a id="main-content"></a>
<div id="tabs-wrapper" class="clearfix"> <h1 class="with-tabs">Buildout-basiertes Zope2 (Plone) unter Debian/Ubuntu installieren</h1>
</div> <div class="clearfix">
<div class="region region-content">
<div id="block-system-main" class="block block-system clearfix">
<div class="content">
<div id="node-167" class="node node-story node-promoted">
<span class="submitted">7. September 2008 - 14:53 — <span class="username">Martin</span></span>
<div class="content clearfix">
<div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even"><p><i>Ubuntu 8.04 Server / Plone 3.1.5.1</i></p>
<p><b>Voraussetzungen buildout:</b></p>
<p><div class="geshifilter"><div class="text geshifilter-text">$ sudo aptitude install gcc python2.4 python2.4-dev python-imaging python-elementtree</div></div></p>
<p><i>(Für Ubuntu Desktop muss noch <span class="geshifilter"><code class="text geshifilter-text">zlib1g-dev</code></span> installiert werden.)</i></p>
<p><div class="geshifilter"><div class="text geshifilter-text">Ergänzung von &lt;a href=&quot;<a href="../167_/">http://siarp.de/node/167&quot;</a> rel=&quot;nofollow&quot;&gt;<a href="../167_/a_/">http://siarp.de/node/167&lt;/a&gt;</a> für Plone 3.3 unter Ubuntu Jaunty<br />
========================================================================<br />
<br />
Ubuntu Jaunty enthält zwar Python 2.4 aber keine Image Library (PIL) für 2.4.<br />
Diese kann auch als Egg mittels buildout installiert werden [1]. Dafür braucht<br />
man die Header-Dateien von Python, libjpeg und zlib [2]:<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; sudo aptitude install build-essential python2.4-dev zlib1g-dev libjpeg62-dev<br />
<br />
PIL gibt es zwar als offizielles Egg [3], doch nur die Version von der ZOPE-Site<br />
&quot;PILwoTk&quot; funktioniert mir Plone. buildout.cfg sieht dann so aus:<br />
<br />
&nbsp; &nbsp; [buildout]<br />
&nbsp; &nbsp; ...<br />
&nbsp; &nbsp; find-links += &lt;a href=&quot;<a href="http://download.zope.org/distribution/">http://download.zope.org/distribution/</a><br />
&quot; rel=&quot;nofollow&quot;&gt;<a href="http://download.zope.org/distribution/">http://download.zope.org/distribution/</a><br />
&lt;/a&gt; &nbsp; &nbsp;eggs += PILwoTk<br />
&nbsp; &nbsp; ...<br />
<br />
Zusätzlich kann das Problem auftauchen, dass sich ZOPE beschwert, es habe keine<br />
Berechtigung seine Eier abzulegen (Permission denied: ... .python-eggs). Wenn<br />
Eggs entpackt werden müssen, werden diese standardmäßig in ~/.python-eggs<br />
abgelegt, was aber durch den Benutzer zope nicht erlaubt ist. Dafür kann man<br />
PYTHON_EGG_CACHE im Buildout neu setzen [4]:<br />
<br />
&nbsp; &nbsp; [instance]<br />
&nbsp; &nbsp; effective-user = zope<br />
&nbsp; &nbsp; environment-vars = PYTHON_EGG_CACHE ${buildout:directory}/var/.python-eggs<br />
&nbsp; &nbsp; ...<br />
<br />
<br />
[1] &lt;a href=&quot;<a href="http://www.veit-schiele.de/dienstleistungen/technische-dokumentation/plone-entwicklerhandbuch/entwicklungsumgebung/erstellen-eines-buildout-projekts.html">http://www.veit-schiele.de/dienstleistungen/technische-dokumentation/plo...</a><br />
&quot; rel=&quot;nofollow&quot;&gt;<a href="http://www.veit-schiele.de/dienstleistungen/technische-dokumentation/plone-entwicklerhandbuch/entwicklungsumgebung/erstellen-eines-buildout-projekts.html">http://www.veit-schiele.de/dienstleistungen/technische-dokumentation/plo...</a><br />
&lt;/a&gt;[2] &lt;a href=&quot;<a href="https://svn.infrae.com/buildout/silva/INSTALL.txt">https://svn.infrae.com/buildout/silva/INSTALL.txt</a><br />
&quot; rel=&quot;nofollow&quot;&gt;<a href="https://svn.infrae.com/buildout/silva/INSTALL.txt">https://svn.infrae.com/buildout/silva/INSTALL.txt</a><br />
&lt;/a&gt;[3] &lt;a href=&quot;<a href="http://pypi.python.org/pypi/PIL">http://pypi.python.org/pypi/PIL</a><br />
&quot; rel=&quot;nofollow&quot;&gt;<a href="http://pypi.python.org/pypi/PIL">http://pypi.python.org/pypi/PIL</a><br />
&lt;/a&gt;[4] &lt;a href=&quot;<a href="http://plone.org/documentation/error/permission-denied-python-eggs">http://plone.org/documentation/error/permission-denied-python-eggs</a><br />
&quot; rel=&quot;nofollow&quot;&gt;<a href="http://plone.org/documentation/error/permission-denied-python-eggs">http://plone.org/documentation/error/permission-denied-python-eggs</a><br />
&lt;/a&gt;</div></div></p>
<p><b>Installation:</b></p>
<p>Ziel ist die systemweite Installation mit automatischem Start des Dienstes beim Booten. Zur Entwicklung und zum Testen reicht es, das ganze im Benutzer-Verzeichnis zu machen.</p>
<p>Zunächste wird der Code nach /opt kopiert:</p>
<p><div class="geshifilter"><div class="text geshifilter-text">$ sudo svn co SERVER/PFAD/ PROJEKTNAME</div></div></p>
<p>Dann der Buildout installiert:</p>
<p><div class="geshifilter"><div class="text geshifilter-text">$ cd PROJEKTNAME<br />
$ sudo python2.4 bootstrap.py<br />
$ sudo bin/buildout<br />
$ sudo bin/instance fg</div></div></p>
<p>Läuft? Dann wollen wir das ganze noch dem User „zope“ zuordnen:</p>
<p><div class="geshifilter"><div class="text geshifilter-text">sudo adduser zope</div></div></p>
<p>In buildout.cfg:</p>
<p><div class="geshifilter"><div class="text geshifilter-text">[instance]<br />
effective-user = zope</div></div></p>
<p>Das wird dann beim nächsten Aufruf von bin/buildout in zope.conf eingetragen. Beim Start durch <span class="geshifilter"><code class="text geshifilter-text">sudo bin/instance start</code></span> wird nun „zope“ als User des Prozesses verwendet.</p>
<p><b>Start beim Hochfahren:</b></p>
<p><div class="geshifilter"><div class="text geshifilter-text">$ sudo vim /etc/init.d/PROJEKTNAME<br />
<br />
#!/bin/bash<br />
cd /opt/PROJEKTNAME<br />
bin/instance start<br />
<br />
$ sudo chmod +x /etc/init.d/PROJEKTNAME<br />
$ update-rc.d PROJEKTNAME defaults</div></div></p>
<p>Quelle: <a href="http://ubuntu.wordpress.com/2005/09/07/adding-a-startup-script-to-be-run-at-bootup/" rel="nofollow">http://ubuntu.wordpress.com/2005/09/07/adding-a-startup-script-to-be-run-at-bootup/</a></p>
<p><b>Hinter Apache laufen lassen (Reverse Proxy):</b></p>
<p><div class="geshifilter"><div class="text geshifilter-text">$ sudo aptitude install apache2<br />
$ sudo vim /etc/apache2/sites-available/PROJEKTNAME<br />
<br />
NameVirtualHost *:80<br />
<br />
&lt;VirtualHost *:80&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; ServerName HOST<br />
&nbsp; &nbsp; &nbsp; &nbsp; DocumentRoot /var/www/<br />
&nbsp; &nbsp; &nbsp; &nbsp; RewriteEngine On<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;Proxy *&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Order deny,allow<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Deny from all<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Allow from HOST<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/Proxy&gt;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; RewriteEngine On<br />
&nbsp; &nbsp; &nbsp; &nbsp; RewriteRule ^(.*) <a href="http://localhost:8080/VirtualHostBase/http/HOST:80/PLONESITENAME/VirtualHostRoot">http://localhost:8080/VirtualHostBase/http/HOST:80/PLONESITENAME/Virtual...</a>$1 [L,P]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; CustomLog /var/log/apache2/access.log combined<br />
&lt;/VirtualHost&gt;<br />
<br />
$ sudo a2enmod proxy<br />
$ sudo a2enmod proxy_http<br />
$ sudo a2enmod rewrite<br />
$ sudo a2ensite PROJEKTNAME<br />
$ sudo /etc/init.d/apache2 restart</div></div><br />
</p></div></div></div> </div>
<div class="clearfix">
<div class="links"><ul class="links inline"><li class="comment_forbidden first last"></li>
</ul></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="region region-footer">
<div id="block-block-3" class="block block-block clearfix">
<div class="content">
<p>Alle Rechte liegen bei siarp.</p>
</div>
</div>
</div>
</div></div></div></div> <!-- /.left-corner, /.right-corner, /#squeeze, /#center -->
<div id="sidebar-second" class="sidebar">
<div class="region region-sidebar-second">
<div id="block-menu-menu-autoren" class="block block-menu clearfix">
<h2 class="title">Written by</h2>
<div class="content">
<ul class="menu"><li class="first leaf"><a href="../../blog/2/">Martin</a></li>
<li class="last leaf"><a href="../../blog/3/">Tilman</a></li>
</ul> </div>
</div>
</div>
</div>
</div> <!-- /#container -->
</div> <!-- /#wrapper -->
</body>
<!-- Mirrored from siarp.de/node/167 by HTTrack Website Copier/3.x [XR&CO'2014], Sun, 08 Dec 2019 12:01:20 GMT -->
</html>