mirror of
https://gitlab.com/siarp/siarp.de.git
synced 2026-08-07 19:18:17 +00:00
cleanup project
* remove httrack meta files * rename site dir to "public"
This commit is contained in:
@@ -0,0 +1,130 @@
|
||||
<!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/comment/13 by HTTrack Website Copier/3.x [XR&CO'2014], Sun, 08 Dec 2019 12:05:00 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="../../node/40/" />
|
||||
<link rel="shortlink" href="../../node/40/" />
|
||||
<title>SVN Migration | 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":"QMuBuQNGpCQUgoOdDqCHp1dxRzQt1slzGOHtBIrtr1w","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-40 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">SVN Migration</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-40" class="node node-story node-promoted">
|
||||
|
||||
|
||||
|
||||
<span class="submitted">2. June 2006 - 1:45 — <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>Migration von BerkeleyDB nach FSFS sollte ganz leicht sein.</p>
|
||||
<p>Man kann einen Dump exportieren. Das ist eine menschenlesbare Datei, die man für heftige Änderungen auch bearbeiten kann. Tolle Sache das, damit gehen auch so Sachen, wie Zusammenlegung von zwei Repositories etc. Noch besser: <a href="http://svnbook.red-bean.com/nightly/en/svn.reposadmin.maint.html#svn.reposadmin.maint.migrate">LIES ES NACH</a>. In der wie immer hervorragenden Doku.</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 id="comments" class="comment-wrapper">
|
||||
<h2 class="title">Comments</h2>
|
||||
|
||||
<a id="comment-13"></a>
|
||||
<div class="comment comment-by-node-author odd">
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
<span class="submitted">2. June 2006 - 1:46 — <span class="username">Martin</span></span>
|
||||
|
||||
|
||||
|
||||
<h3><a href="index.html#comment-13" class="permalink" rel="bookmark">Ich liebe uns...</a></h3>
|
||||
|
||||
<div class="content">
|
||||
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even"><p>Ich liebe Subversion! Wirklich!</p></div></div></div> </div>
|
||||
</div>
|
||||
|
||||
<ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
|
||||
</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/comment/13 by HTTrack Website Copier/3.x [XR&CO'2014], Sun, 08 Dec 2019 12:05:00 GMT -->
|
||||
</html>
|
||||
@@ -0,0 +1,208 @@
|
||||
<!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/comment/14 by HTTrack Website Copier/3.x [XR&CO'2014], Sun, 08 Dec 2019 12:05:00 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="../../node/42/" />
|
||||
<link rel="shortlink" href="../../node/42/" />
|
||||
<title>Mein erstes echtes bash-Skript! | 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":"f1UlSHBitA_6fJjXj23QS2HMWnSvPLQ5asJRKXz3iCM","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-42 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">Mein erstes echtes bash-Skript!</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-42" class="node node-story node-promoted">
|
||||
|
||||
|
||||
|
||||
<span class="submitted">4. June 2006 - 13:15 — <span class="username">Tilman</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>...erstellt ein Repository und liegt unter <span style="font-style:italic">/root/tilman/create_repository.sh</span>. Nächstes Ziel: Subversion hook script für automatisiertes Update, damit die Webentwicklung so richtig losgehen kann.<br />
|
||||
<!--break--><br />
|
||||
<div class="geshifilter"><div class="text geshifilter-text">#!/bin/sh<br />
|
||||
<br />
|
||||
# Erstellt ein Repository unterhalb von /home/svn-repos,<br />
|
||||
# traegt es in die httpd.conf ein und startet Apache neu<br />
|
||||
#<br />
|
||||
# Optionen: -n um den Eintrag in die httpd.conf und den Apache-Neustart<br />
|
||||
# abzuschalten<br />
|
||||
# Parameter: Pfad des neuen Repository (unterhalb von /home/svn-repos/)<br />
|
||||
<br />
|
||||
if [ $# -eq 2 ]<br />
|
||||
then<br />
|
||||
if [ $1 == "-n" ]<br />
|
||||
then<br />
|
||||
# Slashes am Anfang und Ende der Pfadangabe entfernen<br />
|
||||
repos=${2%\/}<br />
|
||||
repos=${repos#\/}<br />
|
||||
updateconf=false<br />
|
||||
else<br />
|
||||
echo "usage: create_repository [-n] repository_path"<br />
|
||||
exit 1<br />
|
||||
fi<br />
|
||||
else<br />
|
||||
if [ $# -eq 1 ]<br />
|
||||
then<br />
|
||||
# Slashes am Anfang und Ende der Pfadangabe entfernen<br />
|
||||
repos=${1%\/}<br />
|
||||
repos=${repos#\/}<br />
|
||||
updateconf=true<br />
|
||||
else<br />
|
||||
echo "usage: create_repository [-n] repository_path"<br />
|
||||
exit 2<br />
|
||||
fi<br />
|
||||
fi<br />
|
||||
<br />
|
||||
mkdir /home/svn-repos/$repos<br />
|
||||
svnadmin create /home/svn-repos/$repos<br />
|
||||
chown -R svn.svn /home/svn-repos/$repos<br />
|
||||
chmod -R ug+w /home/svn-repos/$repos<br />
|
||||
chmod ug+s /home/svn-repos/$repos /home/svn-repos/$repos/*<br />
|
||||
<br />
|
||||
# in httpd.conf eintragen und Apache neu starten<br />
|
||||
if [ $updateconf = true ]<br />
|
||||
then<br />
|
||||
echo "<br />
|
||||
<Location /svn/$repos><br />
|
||||
DAV svn<br />
|
||||
SVNPath /home/svn-repos/$repos<br />
|
||||
SVNIndexXSLT \"/subversion-xslt/svnindex.xsl\"<br />
|
||||
AuthType Basic<br />
|
||||
AuthName \"siarp.de repository\"<br />
|
||||
AuthUserFile /home/svn-repos/svn-auth-file<br />
|
||||
Require user martin tilman<br />
|
||||
SSLRequireSSL<br />
|
||||
</Location><br />
|
||||
" >> /usr/local/apache2/conf/httpd.conf<br />
|
||||
<br />
|
||||
/usr/local/apache2/bin/apachectl restart<br />
|
||||
fi</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 id="comments" class="comment-wrapper">
|
||||
<h2 class="title">Comments</h2>
|
||||
|
||||
<a id="comment-14"></a>
|
||||
<div class="comment odd">
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
<span class="submitted">4. June 2006 - 20:30 — <span class="username">Martin</span></span>
|
||||
|
||||
|
||||
|
||||
<h3><a href="index.html#comment-14" class="permalink" rel="bookmark">0.2?</a></h3>
|
||||
|
||||
<div class="content">
|
||||
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even"><p><span class="geshifilter"><code class="text geshifilter-text">/usr/local/apache2/bin/apachectl restart</code></span></p>
|
||||
|
||||
<p>Was macht denn <span class="geshifilter"><code class="text geshifilter-text">chmod ug+s /home/svn-repos/$repos /home/svn-repos/$repos/*</code></span> und warum geht das nicht rekursiv?</p></div></div></div> </div>
|
||||
</div>
|
||||
|
||||
<ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
|
||||
<div class="indented"><a id="comment-15"></a>
|
||||
<div class="comment comment-by-node-author even">
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
<span class="submitted">4. June 2006 - 20:35 — <span class="username">Tilman</span></span>
|
||||
|
||||
|
||||
|
||||
<h3><a href="../15/#comment-15" class="permalink" rel="bookmark">Schnelle Antwort</a></h3>
|
||||
|
||||
<div class="content">
|
||||
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even"><p>Also eigentlich habe ich diese drei Zeilen mit den Rechten aus einer c't und benutze sie immer, ohne sie zu hinterfragen...</p></div></div></div> </div>
|
||||
</div>
|
||||
|
||||
<ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
</div>
|
||||
</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/comment/14 by HTTrack Website Copier/3.x [XR&CO'2014], Sun, 08 Dec 2019 12:05:00 GMT -->
|
||||
</html>
|
||||
@@ -0,0 +1,208 @@
|
||||
<!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/comment/15 by HTTrack Website Copier/3.x [XR&CO'2014], Sun, 08 Dec 2019 12:05:00 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="../../node/42/" />
|
||||
<link rel="shortlink" href="../../node/42/" />
|
||||
<title>Mein erstes echtes bash-Skript! | 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":"x937Kive66hx81g2-k7F5boVzWMY9ff9lowaIy6oM6Y","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-42 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">Mein erstes echtes bash-Skript!</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-42" class="node node-story node-promoted">
|
||||
|
||||
|
||||
|
||||
<span class="submitted">4. June 2006 - 13:15 — <span class="username">Tilman</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>...erstellt ein Repository und liegt unter <span style="font-style:italic">/root/tilman/create_repository.sh</span>. Nächstes Ziel: Subversion hook script für automatisiertes Update, damit die Webentwicklung so richtig losgehen kann.<br />
|
||||
<!--break--><br />
|
||||
<div class="geshifilter"><div class="text geshifilter-text">#!/bin/sh<br />
|
||||
<br />
|
||||
# Erstellt ein Repository unterhalb von /home/svn-repos,<br />
|
||||
# traegt es in die httpd.conf ein und startet Apache neu<br />
|
||||
#<br />
|
||||
# Optionen: -n um den Eintrag in die httpd.conf und den Apache-Neustart<br />
|
||||
# abzuschalten<br />
|
||||
# Parameter: Pfad des neuen Repository (unterhalb von /home/svn-repos/)<br />
|
||||
<br />
|
||||
if [ $# -eq 2 ]<br />
|
||||
then<br />
|
||||
if [ $1 == "-n" ]<br />
|
||||
then<br />
|
||||
# Slashes am Anfang und Ende der Pfadangabe entfernen<br />
|
||||
repos=${2%\/}<br />
|
||||
repos=${repos#\/}<br />
|
||||
updateconf=false<br />
|
||||
else<br />
|
||||
echo "usage: create_repository [-n] repository_path"<br />
|
||||
exit 1<br />
|
||||
fi<br />
|
||||
else<br />
|
||||
if [ $# -eq 1 ]<br />
|
||||
then<br />
|
||||
# Slashes am Anfang und Ende der Pfadangabe entfernen<br />
|
||||
repos=${1%\/}<br />
|
||||
repos=${repos#\/}<br />
|
||||
updateconf=true<br />
|
||||
else<br />
|
||||
echo "usage: create_repository [-n] repository_path"<br />
|
||||
exit 2<br />
|
||||
fi<br />
|
||||
fi<br />
|
||||
<br />
|
||||
mkdir /home/svn-repos/$repos<br />
|
||||
svnadmin create /home/svn-repos/$repos<br />
|
||||
chown -R svn.svn /home/svn-repos/$repos<br />
|
||||
chmod -R ug+w /home/svn-repos/$repos<br />
|
||||
chmod ug+s /home/svn-repos/$repos /home/svn-repos/$repos/*<br />
|
||||
<br />
|
||||
# in httpd.conf eintragen und Apache neu starten<br />
|
||||
if [ $updateconf = true ]<br />
|
||||
then<br />
|
||||
echo "<br />
|
||||
<Location /svn/$repos><br />
|
||||
DAV svn<br />
|
||||
SVNPath /home/svn-repos/$repos<br />
|
||||
SVNIndexXSLT \"/subversion-xslt/svnindex.xsl\"<br />
|
||||
AuthType Basic<br />
|
||||
AuthName \"siarp.de repository\"<br />
|
||||
AuthUserFile /home/svn-repos/svn-auth-file<br />
|
||||
Require user martin tilman<br />
|
||||
SSLRequireSSL<br />
|
||||
</Location><br />
|
||||
" >> /usr/local/apache2/conf/httpd.conf<br />
|
||||
<br />
|
||||
/usr/local/apache2/bin/apachectl restart<br />
|
||||
fi</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 id="comments" class="comment-wrapper">
|
||||
<h2 class="title">Comments</h2>
|
||||
|
||||
<a id="comment-14"></a>
|
||||
<div class="comment odd">
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
<span class="submitted">4. June 2006 - 20:30 — <span class="username">Martin</span></span>
|
||||
|
||||
|
||||
|
||||
<h3><a href="../14/#comment-14" class="permalink" rel="bookmark">0.2?</a></h3>
|
||||
|
||||
<div class="content">
|
||||
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even"><p><span class="geshifilter"><code class="text geshifilter-text">/usr/local/apache2/bin/apachectl restart</code></span></p>
|
||||
|
||||
<p>Was macht denn <span class="geshifilter"><code class="text geshifilter-text">chmod ug+s /home/svn-repos/$repos /home/svn-repos/$repos/*</code></span> und warum geht das nicht rekursiv?</p></div></div></div> </div>
|
||||
</div>
|
||||
|
||||
<ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
|
||||
<div class="indented"><a id="comment-15"></a>
|
||||
<div class="comment comment-by-node-author even">
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
<span class="submitted">4. June 2006 - 20:35 — <span class="username">Tilman</span></span>
|
||||
|
||||
|
||||
|
||||
<h3><a href="index.html#comment-15" class="permalink" rel="bookmark">Schnelle Antwort</a></h3>
|
||||
|
||||
<div class="content">
|
||||
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even"><p>Also eigentlich habe ich diese drei Zeilen mit den Rechten aus einer c't und benutze sie immer, ohne sie zu hinterfragen...</p></div></div></div> </div>
|
||||
</div>
|
||||
|
||||
<ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
</div>
|
||||
</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/comment/15 by HTTrack Website Copier/3.x [XR&CO'2014], Sun, 08 Dec 2019 12:05:00 GMT -->
|
||||
</html>
|
||||
@@ -0,0 +1,159 @@
|
||||
<!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/comment/153 by HTTrack Website Copier/3.x [XR&CO'2014], Sun, 08 Dec 2019 12:05:00 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="../../node/218/" />
|
||||
<link rel="shortlink" href="../../node/218/" />
|
||||
<title>Bazaar: incompatible format 2a and rich-root support | 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":"tYi-ozgu5CQXr24H7fqW3pKgIXcF8lDwVg7yv-7bjfQ","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-218 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">Bazaar: incompatible format 2a and rich-root support</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-218" class="node node-story node-promoted">
|
||||
|
||||
|
||||
|
||||
<span class="submitted">26. October 2009 - 10:38 — <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'm running Bazaar 2.0 on my local machine and the remote repository runs on Ubuntu Jaunty which provides Bazaar 1.13. After working locally for some time I wanted to push my branch to a newly created shared repository on the server but I got the error message</p>
|
||||
|
||||
<div class="geshifilter"><div class="text geshifilter-text">bzr: ERROR: RemoteRepository(bzr+ssh://SERVER/path/to/repo/.bzr/) <br />
|
||||
is not compatible with<br />
|
||||
CHKInventoryRepository('file:///path/to/repo/.bzr/repository/')<br />
|
||||
different rich-root support</div></div>
|
||||
|
||||
<p>Reading http://www.nabble.com/bazaar-error-on-repository-td25868297.html it seems different Bazaar versions make different repository formats which are incompatible. But</p>
|
||||
|
||||
<blockquote>
|
||||
<p>[...] you could move the server to a rich root capable format; then
|
||||
it would work (though crossing the format boundary can be slow).
|
||||
1.3.1 is new enough to support rich-root-pack.</p>
|
||||
</blockquote>
|
||||
|
||||
<p>So on the server I did</p>
|
||||
|
||||
<div class="geshifilter"><div class="text geshifilter-text">bzr upgrade --rich-root-pack repo/</div></div>
|
||||
|
||||
<p>and now it works. I can push my local branch to the remote repository.</p>
|
||||
|
||||
<p><strong>But only once!</strong></p>
|
||||
|
||||
<p>Second time I wanted to push I got another error:</p>
|
||||
|
||||
<div class="geshifilter"><div class="text geshifilter-text">bzr: ERROR: bzrlib.errors.ErrorFromSmartServer: Error received from smart server: ('error', "'Bazaar repository format 2a (needs bzr 1.16 or later)\\n'")</div></div>
|
||||
|
||||
<p>Looks like the format 2a, which is the default for Bazaar >= 2.0 is incompatible with the one on my server. Downgrading to an older format of my local tree did the trick:</p>
|
||||
|
||||
<div class="geshifilter"><div class="text geshifilter-text">bzr upgrade --format=1.14-rich-root</div></div>
|
||||
</div></div></div> </div>
|
||||
|
||||
<div class="clearfix">
|
||||
<div class="links"><ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
|
||||
<div id="comments" class="comment-wrapper">
|
||||
<h2 class="title">Comments</h2>
|
||||
|
||||
<a id="comment-153"></a>
|
||||
<div class="comment comment-by-anonymous odd">
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
<span class="submitted">26. December 2009 - 20:54 — <span class="username">Anonym</span></span>
|
||||
|
||||
|
||||
|
||||
<h3><a href="index.html#comment-153" class="permalink" rel="bookmark">Thanks, helped a lot :)</a></h3>
|
||||
|
||||
<div class="content">
|
||||
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even"><p>Thanks, helped a lot :)</p>
|
||||
</div></div></div> </div>
|
||||
</div>
|
||||
|
||||
<ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
|
||||
</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/comment/153 by HTTrack Website Copier/3.x [XR&CO'2014], Sun, 08 Dec 2019 12:05:00 GMT -->
|
||||
</html>
|
||||
@@ -0,0 +1,134 @@
|
||||
<!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/comment/157 by HTTrack Website Copier/3.x [XR&CO'2014], Sun, 08 Dec 2019 12:05:00 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="../../node/227/" />
|
||||
<link rel="shortlink" href="../../node/227/" />
|
||||
<title>Committeten auf deutsch | 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":"mZuNSksBWB8B6h8xW-V2UEC9A4SzeSffb6v62PBE4Nc","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-227 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">Committeten auf deutsch</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-227" class="node node-story node-promoted">
|
||||
|
||||
|
||||
|
||||
<span class="submitted">6. May 2010 - 22:01 — <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>Bei der Frage, mit wie vielen Ts man eigentlich „committeten“ („das steht im committeten Code“) schreibt, dachte ich mir, es wäre Zeit, sich mal mit vernünftigen und vertretbaren Übersetzungen in diesem Bereich zu beschäftigen. Das Ergebnis:</p>
|
||||
|
||||
<p>Ein „Commit“ ist ein „Beitrag“, etwas „committen“ etwas „beitragen“. Beim „Repository“ ist es noch unklar. Es lässt sich wohl mit „Repositorium“aber auch mit „Repository“ übersetzen. Schön wäre vielleicht auch „Magazin“. „Einen Beitrag zum Magazin leisten“...</p>
|
||||
|
||||
<p>Also, wisst ihr bescheid. Übersetzt eure Werkzeuge und pflegt die Sprachkultur!</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 id="comments" class="comment-wrapper">
|
||||
<h2 class="title">Comments</h2>
|
||||
|
||||
<a id="comment-157"></a>
|
||||
<div class="comment comment-by-anonymous odd">
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
<span class="submitted">7. May 2010 - 17:55 — <a href="http://tobias-kraentzer.de/" rel="nofollow" class="username">Tobias</a></span>
|
||||
|
||||
|
||||
|
||||
<h3><a href="index.html#comment-157" class="permalink" rel="bookmark">Übersetzung von „Repository“</a></h3>
|
||||
|
||||
<div class="content">
|
||||
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even"><p>Für die Übersetzung von „Repository“ sollte man ähnlich lange bei einem Bier im Lebowski nachdenken. „Magazin“ gefällt mir nicht sonderlich gut.</p>
|
||||
</div></div></div> </div>
|
||||
</div>
|
||||
|
||||
<ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
|
||||
</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/comment/157 by HTTrack Website Copier/3.x [XR&CO'2014], Sun, 08 Dec 2019 12:05:00 GMT -->
|
||||
</html>
|
||||
@@ -0,0 +1,452 @@
|
||||
<!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/comment/158 by HTTrack Website Copier/3.x [XR&CO'2014], Sun, 08 Dec 2019 12:05:00 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="../../node/196/" />
|
||||
<link rel="shortlink" href="../../node/196/" />
|
||||
<title>Using AppleScript and cURL to import Content from iPhoto into Drupal | 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":"Zv7bfXE7Jipqmnj7VxxGgOt4yJoMJneYQ7houaXmuls","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-196 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">Using AppleScript and cURL to import Content from iPhoto into Drupal</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-196" class="node node-story node-promoted">
|
||||
|
||||
|
||||
|
||||
<span class="submitted">7. February 2009 - 23:25 — <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'm using Apple's iPhoto to organize my private photographs and Drupal is what comes to my mind first when there's need for a web-based solution. Having lots of pictures from a recent trip I want to show people I started thinking about some kind of web gallery. Being a developer I need to come up with something fancier than just some stock gallery product like <a href="http://gallery.menalto.com/">Gallery2</a> (actually I don't really know that product so bear with me). I did some research and found some article about different approaches to build photo galleries in Drupal and also a nice <a href="http://blip.tv/file/256997">video tutorial</a>. I've used image module and gallery module before but the flexibility that CCK extended by imagefield and imagecache and views seem to offer is just too tempting.
|
||||
<!--break-->
|
||||
But how would I get my hundreds of pictures imported into my yet-to-be-built gallery site? There are plenty of exporter plug-ins for iPhoto sending pictures to galleries like said Gallery2, Flickr and so on. I did not find much information on how to write a plug-in for iPhoto but I found some <a href="http://ruk.ca/article/2604">AppleScript code</a> that did just an export to Drupal. This one seemed to be very outdated but it was a good start. I started a <a href="http://lists.drupal.org/pipermail/development/2009-February/031849.html">thread on the Drupal developer mailing list</a> which gave me interesting options but I stayed with the concept of using cURL because it's the most flexible and probably the fasted way for my one-time requirement and there are no dependencies. The missing piece was this <a href="http://drupal.org/node/80548">handbook page</a> on d.o.</p>
|
||||
|
||||
<p><em><strong>Note</strong>: The following is a kind of tutorial but the result is just a custom script that needs to be adjusted to your scenario.</em></p>
|
||||
|
||||
<p>AppleScript is probably not the most powerful language but it allows us to call shell scripts. The idea is to get all the image information from iPhoto and then use shell commands to upload to a Drupal site. The first step is to extract the cURL commands from the PHP code from the handbook page so I don't need a separate script. Here are the shell commands to create content on a Drupal site:</p>
|
||||
|
||||
<p>First we log in which means getting a cookie with session data.</p>
|
||||
|
||||
<div class="geshifilter"><div class="bash geshifilter-bash">curl http:<span class="sy0">//</span>localhost<span class="sy0">/</span>drupal<span class="sy0">/</span>?<span class="re2">q</span>=user \<br />
|
||||
<span class="re5">-s</span> \<br />
|
||||
<span class="re5">-c</span> <span class="sy0">/</span>tmp<span class="sy0">/</span>curl-cookies.txt \<br />
|
||||
<span class="re5">-b</span> <span class="sy0">/</span>tmp<span class="sy0">/</span>curl-cookies.txt \<br />
|
||||
<span class="re5">-F</span> <span class="st_h">'name=user'</span> \<br />
|
||||
<span class="re5">-F</span> <span class="st_h">'pass=pass'</span> \<br />
|
||||
<span class="re5">-F</span> <span class="st_h">'form_id=user_login'</span> \<br />
|
||||
<span class="re5">-F</span> <span class="st_h">'op=Log in'</span> \<br />
|
||||
<span class="re5">--output</span> ~<span class="sy0">/</span>response_login.html</div></div>
|
||||
|
||||
<p>This calls the user page with your username and password. Check <span class="geshifilter"><code class="text geshifilter-text">response_login.html</code></span> to see if this has been successful.</p>
|
||||
|
||||
<p>Next we need to get the security token of the content creation form.</p>
|
||||
|
||||
<div class="geshifilter"><div class="bash geshifilter-bash">curl http:<span class="sy0">//</span>localhost<span class="sy0">/</span>drupal<span class="sy0">/</span>?<span class="re2">q</span>=node<span class="sy0">/</span>add<span class="sy0">/</span>image \<br />
|
||||
<span class="re5">-s</span> \<br />
|
||||
<span class="re5">-c</span> <span class="sy0">/</span>tmp<span class="sy0">/</span>curl-cookies.txt \<br />
|
||||
<span class="re5">-b</span> <span class="sy0">/</span>tmp<span class="sy0">/</span>curl-cookies.txt \<br />
|
||||
<span class="re5">--output</span> ~<span class="sy0">/</span>response_create_form.html</div></div>
|
||||
|
||||
<p>I'm using a custom content type called "image" – substitute that with whatever your content type is. <span class="geshifilter"><code class="text geshifilter-text">response_create_form.html</code></span> contains the HTML form to add an image including the security token which we can extract using a perl regular expression:</p>
|
||||
|
||||
<div class="geshifilter"><div class="perl geshifilter-perl"><a href="http://perldoc.perl.org/functions/s.html"><span class="kw3">s</span></a><span class="sy0">/.</span><span class="re0">*edit</span><span class="sy0">-</span>image<span class="sy0">-</span>node<span class="sy0">-</span>form<span class="sy0">-</span>form<span class="sy0">-</span>token<span class="st0">" *value="</span><span class="br0">(</span><span class="br0">[</span><span class="sy0">^</span><span class="st0">"]*)"</span><span class="sy0">.*/</span><span class="co3">$1</span><span class="sy0">/</span><a href="http://perldoc.perl.org/functions/s.html"><span class="kw3">s</span></a></div></div>
|
||||
|
||||
<p>Finally we actually upload our content.</p>
|
||||
|
||||
<div class="geshifilter"><div class="bash geshifilter-bash">curl http:<span class="sy0">//</span>localhost<span class="sy0">/</span>drupal<span class="sy0">/</span>?<span class="re2">q</span>=node<span class="sy0">/</span>add<span class="sy0">/</span>image \<br />
|
||||
<span class="re5">-s</span> \<br />
|
||||
<span class="re5">-c</span> <span class="sy0">/</span>tmp<span class="sy0">/</span>curl-cookies.txt \<br />
|
||||
<span class="re5">-b</span> <span class="sy0">/</span>tmp<span class="sy0">/</span>curl-cookies.txt \<br />
|
||||
<span class="re5">-F</span> <span class="st_h">'title=My Title'</span> \<br />
|
||||
<span class="re5">-F</span> <span class="st_h">'field_image[0][fid]=0'</span> \<br />
|
||||
<span class="re5">-F</span> <span class="st_h">'field_image[0][list]=1'</span> \<br />
|
||||
<span class="re5">-F</span> <span class="st_h">'files[field_image_0]=@/Users/me/myimage.jpg'</span> \<br />
|
||||
<span class="re5">-F</span> <span class="st_h">'body=My content.'</span> \<br />
|
||||
<span class="re5">-F</span> <span class="st_h">'name=Myself'</span> \<br />
|
||||
<span class="re5">-F</span> <span class="st_h">'status=1'</span> \<br />
|
||||
<span class="re5">-F</span> <span class="st_h">'revision=1'</span> \<br />
|
||||
<span class="re5">-F</span> <span class="st_h">'op=Save'</span> \<br />
|
||||
<span class="re5">-F</span> <span class="st_h">'form_id=image_node_form'</span> \<br />
|
||||
<span class="re5">-F</span> <span class="st_h">'form_token=63fe773e820d2a4565720ab3bd0fc991'</span> \</div></div>
|
||||
|
||||
<p>Check your Drupal site – there should be new content. My content type contains an <a href="http://drupal.org/project/imagefield">imagefield</a> that takes the above values. The "@" makes cURL upload the actual file.</p>
|
||||
|
||||
<p>Now to upload all selected images in iPhoto to the Drupal site I merge the snippets above with the AppleScript from iPhotoToDrupal:</p>
|
||||
|
||||
<p><em><strong>Update:</strong> I had an issue with special characters as I entered "'" in iPhoto's description field. I found out about <span class="geshifilter"><code class="applescript geshifilter-applescript"><span class="kw1">quoted form</span> <span class="kw3">of</span> variablename</code></span> which is used to escape strings in AppleScript to use them in shell scripts. This funtion puts the string in single quotes automatically so I couldn't use it like <span class="geshifilter"><code class="applescript geshifilter-applescript"><span class="st0">" -F 'body="</span> <span class="sy0">&</span> <span class="kw1">quoted form</span> <span class="kw3">of</span> this_comment <span class="sy0">&</span> <span class="st0">"'"</span></code></span>. Fortunately it's also possible to quote the value only like <span class="geshifilter"><code class="text geshifilter-text">-F body='xxx'</code></span> so <span class="geshifilter"><code class="applescript geshifilter-applescript"><span class="st0">" -F body="</span> <span class="sy0">&</span> <span class="kw1">quoted form</span> <span class="kw3">of</span> this_comment</code></span> works. Just being at it I replaced it for other variables also. Finally, I added a "Done" dialog.</em></p>
|
||||
|
||||
<div class="geshifilter"><div class="applescript geshifilter-applescript"><span class="kw3">set</span> DrupalUsername <span class="kw3">to</span> <span class="st0">"user"</span><br />
|
||||
<span class="kw3">set</span> DrupalPassword <span class="kw3">to</span> <span class="st0">"pass"</span><br />
|
||||
<span class="kw3">set</span> DrupalSite <span class="kw3">to</span> <span class="st0">"http://localhost/drupal/"</span><br />
|
||||
<span class="kw3">set</span> DrupalContentType <span class="kw3">to</span> <span class="st0">"image"</span><br />
|
||||
<span class="kw3">set</span> DrupalAddPage <span class="kw3">to</span> <span class="st0">"?q=node/add/"</span> <span class="sy0">&</span> DrupalContentType<br />
|
||||
<span class="kw3">set</span> CookieFile <span class="kw3">to</span> <span class="st0">"/tmp/curl-cookies.txt"</span><br />
|
||||
<br />
|
||||
<br />
|
||||
<span class="kw3">set</span> curlLogin <span class="kw3">to</span> <span class="st0">"curl"</span><br />
|
||||
<span class="kw3">set</span> curlLogin <span class="kw3">to</span> curlLogin <span class="sy0">&</span> <span class="st0">" "</span> <span class="sy0">&</span> DrupalSite <span class="sy0">&</span> <span class="st0">"?q=user"</span><br />
|
||||
<span class="kw3">set</span> curlLogin <span class="kw3">to</span> curlLogin <span class="sy0">&</span> <span class="st0">" -s"</span><br />
|
||||
<span class="kw3">set</span> curlLogin <span class="kw3">to</span> curlLogin <span class="sy0">&</span> <span class="st0">" -c "</span> <span class="sy0">&</span> CookieFile<br />
|
||||
<span class="kw3">set</span> curlLogin <span class="kw3">to</span> curlLogin <span class="sy0">&</span> <span class="st0">" -b "</span> <span class="sy0">&</span> CookieFile<br />
|
||||
<span class="kw3">set</span> curlLogin <span class="kw3">to</span> curlLogin <span class="sy0">&</span> <span class="st0">" -F 'name="</span> <span class="sy0">&</span> DrupalUsername <span class="sy0">&</span> <span class="st0">"'"</span><br />
|
||||
<span class="kw3">set</span> curlLogin <span class="kw3">to</span> curlLogin <span class="sy0">&</span> <span class="st0">" -F 'pass="</span> <span class="sy0">&</span> DrupalPassword <span class="sy0">&</span> <span class="st0">"'"</span><br />
|
||||
<span class="kw3">set</span> curlLogin <span class="kw3">to</span> curlLogin <span class="sy0">&</span> <span class="st0">" -F 'op=Log in'"</span><br />
|
||||
<span class="kw3">set</span> curlLogin <span class="kw3">to</span> curlLogin <span class="sy0">&</span> <span class="st0">" -F 'form_id=user_login'"</span><br />
|
||||
<span class="kw1">do shell script</span> curlLogin<br />
|
||||
<br />
|
||||
<span class="kw3">set</span> curlAddForm <span class="kw3">to</span> <span class="st0">"curl"</span><br />
|
||||
<span class="kw3">set</span> curlAddForm <span class="kw3">to</span> curlAddForm <span class="sy0">&</span> <span class="st0">" "</span> <span class="sy0">&</span> DrupalSite <span class="sy0">&</span> DrupalAddPage<br />
|
||||
<span class="kw3">set</span> curlAddForm <span class="kw3">to</span> curlAddForm <span class="sy0">&</span> <span class="st0">" -s"</span><br />
|
||||
<span class="kw3">set</span> curlAddForm <span class="kw3">to</span> curlAddForm <span class="sy0">&</span> <span class="st0">" -c "</span> <span class="sy0">&</span> CookieFile<br />
|
||||
<span class="kw3">set</span> curlAddForm <span class="kw3">to</span> curlAddForm <span class="sy0">&</span> <span class="st0">" -b "</span> <span class="sy0">&</span> CookieFile<br />
|
||||
<span class="kw3">set</span> tokenSrc <span class="kw3">to</span> <span class="kw1">do shell script</span> curlAddForm<br />
|
||||
<br />
|
||||
<span class="kw3">set</span> token <span class="kw3">to</span> <span class="kw1">do shell script</span> <span class="st0">"echo '"</span> <span class="sy0">&</span> tokenSrc <span class="sy0">&</span> <span class="st0">"' | perl -pe 's/.*edit-"</span> <span class="sy0">&</span> DrupalContentType <span class="sy0">&</span> <span class="st0">"-node-form-form-token<span class="es0">\"</span> *value=<span class="es0">\"</span>([^<span class="es0">\"</span>]*)<span class="es0">\"</span>.*/$1/s';"</span><br />
|
||||
<br />
|
||||
<br />
|
||||
<span class="kw3">tell</span> <span class="kw1">application</span> <span class="st0">"iPhoto"</span><br />
|
||||
<span class="kw1">activate</span><br />
|
||||
<br />
|
||||
<span class="kw3">try</span><br />
|
||||
<span class="kw3">copy</span> <span class="br0">(</span><span class="kw3">my</span> selected_images<span class="br0">(</span><span class="br0">)</span><span class="br0">)</span> <span class="kw3">to</span> these_images<br />
|
||||
<br />
|
||||
<span class="co1">-- Make sure we have one or more image selected, and if we do, then grab the details of each and upload</span><br />
|
||||
<span class="kw3">if</span> these_images <span class="kw3">is</span> <span class="kw1">false</span> <span class="kw2">or</span> <span class="br0">(</span><span class="kw2">the</span> <span class="kw1">count</span> <span class="kw3">of</span> these_images<span class="br0">)</span> <span class="kw3">is</span> <span class="nu0">0</span> <span class="kw3">then</span><br />
|
||||
<span class="kw3">error</span> <span class="st0">"Please select one or more images."</span><br />
|
||||
<span class="kw3">end</span> <span class="kw3">if</span><br />
|
||||
<br />
|
||||
<span class="kw3">repeat</span> <span class="kw3">with</span> this_image <span class="kw3">in</span> these_images<br />
|
||||
<br />
|
||||
<span class="kw3">set</span> this_imagefile <span class="kw3">to</span> <span class="br0">(</span><span class="br0">(</span>image path <span class="kw3">of</span> this_image<span class="br0">)</span> <span class="kw2">as</span> <span class="kw1">POSIX file</span><span class="br0">)</span><br />
|
||||
<span class="kw3">set</span> this_uploadfile <span class="kw3">to</span> <span class="br0">(</span><span class="kw1">POSIX path</span> <span class="kw3">of</span> this_imagefile<span class="br0">)</span><br />
|
||||
<span class="kw3">set</span> this_comment <span class="kw3">to</span> <span class="br0">(</span><span class="kw2">the</span> comment <span class="kw3">of</span> this_image<span class="br0">)</span> <span class="kw2">as</span> <span class="kw1">string</span><br />
|
||||
<span class="kw3">set</span> this_name <span class="kw3">to</span> <span class="kw2">the</span> title <span class="kw3">of</span> this_image<br />
|
||||
<br />
|
||||
<span class="kw3">set</span> curlCreate <span class="kw3">to</span> <span class="st0">"curl"</span><br />
|
||||
<span class="kw3">set</span> curlCreate <span class="kw3">to</span> curlCreate <span class="sy0">&</span> <span class="st0">" "</span> <span class="sy0">&</span> DrupalSite <span class="sy0">&</span> DrupalAddPage<br />
|
||||
<span class="kw3">set</span> curlCreate <span class="kw3">to</span> curlCreate <span class="sy0">&</span> <span class="st0">" -s"</span><br />
|
||||
<span class="kw3">set</span> curlCreate <span class="kw3">to</span> curlCreate <span class="sy0">&</span> <span class="st0">" -c "</span> <span class="sy0">&</span> CookieFile<br />
|
||||
<span class="kw3">set</span> curlCreate <span class="kw3">to</span> curlCreate <span class="sy0">&</span> <span class="st0">" -b "</span> <span class="sy0">&</span> CookieFile<br />
|
||||
<span class="kw3">set</span> curlCreate <span class="kw3">to</span> curlCreate <span class="sy0">&</span> <span class="st0">" -F title="</span> <span class="sy0">&</span> <span class="kw1">quoted form</span> <span class="kw3">of</span> this_name<br />
|
||||
<span class="kw3">set</span> curlCreate <span class="kw3">to</span> curlCreate <span class="sy0">&</span> <span class="st0">" -F field_image[0][fid]=0"</span><br />
|
||||
<span class="kw3">set</span> curlCreate <span class="kw3">to</span> curlCreate <span class="sy0">&</span> <span class="st0">" -F field_image[0][list]=1"</span><br />
|
||||
<span class="kw3">set</span> curlCreate <span class="kw3">to</span> curlCreate <span class="sy0">&</span> <span class="st0">" -F files[field_image_0]=@"</span> <span class="sy0">&</span> <span class="kw1">quoted form</span> <span class="kw3">of</span> this_uploadfile<br />
|
||||
<span class="kw3">set</span> curlCreate <span class="kw3">to</span> curlCreate <span class="sy0">&</span> <span class="st0">" -F body="</span> <span class="sy0">&</span> <span class="kw1">quoted form</span> <span class="kw3">of</span> this_comment<br />
|
||||
<span class="kw3">set</span> curlCreate <span class="kw3">to</span> curlCreate <span class="sy0">&</span> <span class="st0">" -F name="</span> <span class="sy0">&</span> <span class="kw1">quoted form</span> <span class="kw3">of</span> DrupalUsername<br />
|
||||
<span class="kw3">set</span> curlCreate <span class="kw3">to</span> curlCreate <span class="sy0">&</span> <span class="st0">" -F status=1"</span><br />
|
||||
<span class="kw3">set</span> curlCreate <span class="kw3">to</span> curlCreate <span class="sy0">&</span> <span class="st0">" -F revision=1"</span><br />
|
||||
<span class="kw3">set</span> curlCreate <span class="kw3">to</span> curlCreate <span class="sy0">&</span> <span class="st0">" -F op="</span><br />
|
||||
<span class="kw3">set</span> curlCreate <span class="kw3">to</span> curlCreate <span class="sy0">&</span> <span class="st0">" -F form_id="</span> <span class="sy0">&</span> DrupalContentType <span class="sy0">&</span> <span class="st0">"_node_form"</span><br />
|
||||
<span class="kw3">set</span> curlCreate <span class="kw3">to</span> curlCreate <span class="sy0">&</span> <span class="st0">" -F form_token="</span> <span class="sy0">&</span> token<br />
|
||||
<span class="kw1">do shell script</span> curlCreate<br />
|
||||
<br />
|
||||
<span class="kw3">end</span> <span class="kw3">repeat</span><br />
|
||||
<br />
|
||||
<span class="kw3">on</span> <span class="kw3">error</span> error_message <span class="kw1">number</span> error_number<br />
|
||||
<span class="kw3">if</span> <span class="kw2">the</span> error_number <span class="kw3">is</span> <span class="kw2">not</span> <span class="sy0">-</span><span class="nu0">128</span> <span class="kw3">then</span><br />
|
||||
<span class="kw1">display dialog</span> error_message <span class="kw1">buttons</span> <span class="br0">{</span><span class="st0">"Cancel"</span><span class="br0">}</span> default button <span class="nu0">1</span><br />
|
||||
<span class="kw3">end</span> <span class="kw3">if</span><br />
|
||||
<span class="kw3">end</span> <span class="kw3">try</span><br />
|
||||
<br />
|
||||
<span class="kw3">end</span> <span class="kw3">tell</span><br />
|
||||
<br />
|
||||
<span class="kw1">display dialog</span> <span class="st0">"Done."</span> <span class="kw1">buttons</span> <span class="br0">{</span><span class="st0">"Ok"</span><span class="br0">}</span> default button <span class="nu0">1</span><br />
|
||||
<br />
|
||||
<br />
|
||||
<span class="co1">-- Taken right out the "Show Image File" AppleScript on the Apple site:</span><br />
|
||||
<span class="co1">-- http://www.apple.com/applescript/iphoto/</span><br />
|
||||
<span class="kw3">on</span> selected_images<span class="br0">(</span><span class="br0">)</span><br />
|
||||
<span class="kw3">tell</span> <span class="kw1">application</span> <span class="st0">"iPhoto"</span><br />
|
||||
<span class="kw3">try</span><br />
|
||||
<span class="co1">-- get selection</span><br />
|
||||
<span class="kw3">set</span> these_items <span class="kw3">to</span> <span class="kw2">the</span> <span class="kw1">selection</span><br />
|
||||
<span class="co1">-- check for single album selected</span><br />
|
||||
<span class="kw3">if</span> <span class="kw2">the</span> class <span class="kw3">of</span> <span class="kw1">item</span> <span class="nu0">1</span> <span class="kw3">of</span> these_items <span class="kw3">is</span> album <span class="kw3">then</span> <span class="kw3">error</span><br />
|
||||
<span class="co1">-- return the list of selected photos</span><br />
|
||||
<span class="kw3">return</span> these_items<br />
|
||||
<span class="kw3">on</span> <span class="kw3">error</span><br />
|
||||
<span class="kw3">return</span> <span class="kw1">false</span><br />
|
||||
<span class="kw3">end</span> <span class="kw3">try</span><br />
|
||||
<span class="kw3">end</span> <span class="kw3">tell</span><br />
|
||||
<span class="kw3">end</span> selected_images</div></div>
|
||||
|
||||
<p>Just go to iPhoto, select some images and start the script. The images including title and description will be uploaded as new nodes to your Drupal site.</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 id="comments" class="comment-wrapper">
|
||||
<h2 class="title">Comments</h2>
|
||||
|
||||
<a id="comment-158"></a>
|
||||
<div class="comment comment-by-anonymous odd">
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
<span class="submitted">30. June 2010 - 0:22 — <span class="username">Tony</span></span>
|
||||
|
||||
|
||||
|
||||
<h3><a href="index.html#comment-158" class="permalink" rel="bookmark">Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angeze</a></h3>
|
||||
|
||||
<div class="content">
|
||||
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even"><p>Hi-</p>
|
||||
|
||||
<p>Nice job. I've been trying to use your applescript but am getting an error, "the command exited with a non-zero status". My Drupal install has clean URLs on. Do I need to modify the strings in your script to fit, or will the "non-clean" URLs still work?</p>
|
||||
|
||||
<p>Here's the details on my parts:
|
||||
Drupal 6.17
|
||||
iPhoto 7.1.5 (aka iPhoto '08)</p>
|
||||
|
||||
<p>Thanks!</p>
|
||||
</div></div></div> </div>
|
||||
</div>
|
||||
|
||||
<ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
<a id="comment-200"></a>
|
||||
<div class="comment comment-by-anonymous even">
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
<span class="submitted">29. March 2012 - 18:40 — <span class="username">Anonym</span></span>
|
||||
|
||||
|
||||
|
||||
<h3><a href="../200/#comment-200" class="permalink" rel="bookmark">I needed to change reg regex....</a></h3>
|
||||
|
||||
<div class="content">
|
||||
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even"><p>In my Drupal 7.12 i needed to alter your regex line :</p>
|
||||
|
||||
<div class="geshifilter"><div class="text geshifilter-text">set token to do shell script "echo '" & tokenSrc & "' | perl -pe 's/.*edit-" & DrupalContentType & "-node-form-form-token\" *value=\"([^\"]*)\".*/$1/s';"</div></div>
|
||||
|
||||
<p>to:</p>
|
||||
|
||||
<div class="geshifilter"><div class="text geshifilter-text">set token to do shell script "echo '" & tokenSrc & "' | grep form_token | perl -pe 's/.*name=\"form_token\" *value=\"([^\"]*)\".*/$1/s';"</div></div>
|
||||
|
||||
<p>Somehow the name attribute was "form_token" and not "edit-image-node-form-form-token" as your code suggested.</p>
|
||||
|
||||
<p>Now it works great. Thanks for sharing!</p>
|
||||
|
||||
<p>I also added on the fly image resizing. All credits here go to https://discussions.apple.com/thread/2174350?start=0&tstart=0 from where I borrowed the resize code.</p>
|
||||
|
||||
<div class="geshifilter"><div class="text geshifilter-text">set longest_side to 1024<br />
|
||||
<br />
|
||||
set DrupalUsername to "admin"<br />
|
||||
set DrupalPassword to "XXXXXX"<br />
|
||||
set DrupalSite to "http://localhost/~arminhelbach/drupal7/"<br />
|
||||
set DrupalContentType to "image"<br />
|
||||
set DrupalAddPage to "?q=node/add/" & DrupalContentType<br />
|
||||
set CookieFile to "/tmp/curl-cookies.txt"<br />
|
||||
set tmp_path to "/tmp"<br />
|
||||
<br />
|
||||
set curlLogin to "curl"<br />
|
||||
set curlLogin to curlLogin & " " & DrupalSite & "?q=user"<br />
|
||||
set curlLogin to curlLogin & " -s"<br />
|
||||
set curlLogin to curlLogin & " -c " & CookieFile<br />
|
||||
set curlLogin to curlLogin & " -b " & CookieFile<br />
|
||||
set curlLogin to curlLogin & " -F 'name=" & DrupalUsername & "'"<br />
|
||||
set curlLogin to curlLogin & " -F 'pass=" & DrupalPassword & "'"<br />
|
||||
set curlLogin to curlLogin & " -F 'op=Log in'"<br />
|
||||
set curlLogin to curlLogin & " -F 'form_id=user_login'"<br />
|
||||
do shell script curlLogin<br />
|
||||
<br />
|
||||
set curlAddForm to "curl"<br />
|
||||
set curlAddForm to curlAddForm & " " & DrupalSite & DrupalAddPage<br />
|
||||
set curlAddForm to curlAddForm & " -s"<br />
|
||||
set curlAddForm to curlAddForm & " -c " & CookieFile<br />
|
||||
set curlAddForm to curlAddForm & " -b " & CookieFile<br />
|
||||
set tokenSrc to do shell script curlAddForm<br />
|
||||
<br />
|
||||
set token to do shell script "echo '" & tokenSrc & "' | grep form_token | perl -pe 's/.*name=\"form_token\" *value=\"([^\"]*)\".*/$1/s';"<br />
|
||||
<br />
|
||||
tell application "iPhoto"<br />
|
||||
activate<br />
|
||||
<br />
|
||||
try<br />
|
||||
copy (my selected_images()) to these_images<br />
|
||||
<br />
|
||||
-- Make sure we have one or more image selected, and if we do, then grab the details of each and upload<br />
|
||||
if these_images is false or (the count of these_images) is 0 then<br />
|
||||
error "Please select one or more images."<br />
|
||||
end if<br />
|
||||
<br />
|
||||
repeat with this_image in these_images<br />
|
||||
<br />
|
||||
set this_imagefile to ((image path of this_image) as POSIX file)<br />
|
||||
<br />
|
||||
set this_comment to (the comment of this_image) as string<br />
|
||||
set this_name to the title of this_image<br />
|
||||
<br />
|
||||
tell application "Image Events" to set t to PNG<br />
|
||||
copy (my convert_image(this_imagefile as alias, tmp_path, longest_side)) to tmpimagefile<br />
|
||||
set this_uploadfile to (POSIX path of tmpimagefile)<br />
|
||||
<br />
|
||||
set curlCreate to "curl"<br />
|
||||
set curlCreate to curlCreate & " " & DrupalSite & DrupalAddPage<br />
|
||||
set curlCreate to curlCreate & " -s"<br />
|
||||
set curlCreate to curlCreate & " -c " & CookieFile<br />
|
||||
set curlCreate to curlCreate & " -b " & CookieFile<br />
|
||||
set curlCreate to curlCreate & " -F title=" & quoted form of this_name<br />
|
||||
set curlCreate to curlCreate & " -F field_image[und][0][fid]=0"<br />
|
||||
set curlCreate to curlCreate & " -F field_image[und][0][list]=1"<br />
|
||||
set curlCreate to curlCreate & " -F files[field_image_und_0]=@" & quoted form of this_uploadfile<br />
|
||||
set curlCreate to curlCreate & " -F body=" & quoted form of this_comment<br />
|
||||
set curlCreate to curlCreate & " -F name=" & quoted form of DrupalUsername<br />
|
||||
set curlCreate to curlCreate & " -F status=1"<br />
|
||||
set curlCreate to curlCreate & " -F revision=1"<br />
|
||||
set curlCreate to curlCreate & " -F op="<br />
|
||||
set curlCreate to curlCreate & " -F form_id=" & DrupalContentType & "_node_form"<br />
|
||||
set curlCreate to curlCreate & " -F form_token=" & token<br />
|
||||
do shell script curlCreate<br />
|
||||
<br />
|
||||
do shell script "rm '" & this_uploadfile & "'"<br />
|
||||
end repeat<br />
|
||||
<br />
|
||||
on error error_message number error_number<br />
|
||||
if the error_number is not -128 then<br />
|
||||
display dialog error_message buttons {"Cancel"} default button 1<br />
|
||||
end if<br />
|
||||
end try<br />
|
||||
<br />
|
||||
end tell<br />
|
||||
<br />
|
||||
display dialog "Done." buttons {"Ok"} default button 1<br />
|
||||
<br />
|
||||
<br />
|
||||
-- Taken right out the "Show Image File" AppleScript on the Apple site:<br />
|
||||
-- http://www.apple.com/applescript/iphoto/<br />
|
||||
on selected_images()<br />
|
||||
tell application "iPhoto"<br />
|
||||
try<br />
|
||||
-- get selection<br />
|
||||
set these_items to the selection<br />
|
||||
-- check for single album selected<br />
|
||||
if the class of item 1 of these_items is album then error<br />
|
||||
-- return the list of selected photos<br />
|
||||
return these_items<br />
|
||||
on error<br />
|
||||
return false<br />
|
||||
end try<br />
|
||||
end tell<br />
|
||||
end selected_images<br />
|
||||
<br />
|
||||
<br />
|
||||
on convert_image(this_item, target_path, longest_side)<br />
|
||||
tell application "Image Events"<br />
|
||||
try<br />
|
||||
launch<br />
|
||||
-- open the image file<br />
|
||||
set this_image to open this_item<br />
|
||||
tell application "Finder"<br />
|
||||
set new_item to ((target_path) as string) & (name of this_item) & ".jpg"<br />
|
||||
end tell<br />
|
||||
copy dimensions of this_image to {current_width, current_height}<br />
|
||||
if current_width is greater than current_height then<br />
|
||||
set new_height to (longest_side * current_height) / current_width<br />
|
||||
if (new_height * longest_side) < (current_width * current_height) then<br />
|
||||
scale this_image to size longest_side<br />
|
||||
end if<br />
|
||||
else<br />
|
||||
if (new_height * longest_side) < (current_width * current_height) then<br />
|
||||
set new_height to (longest_side * current_width) / current_height<br />
|
||||
scale this_image to size new_height<br />
|
||||
end if<br />
|
||||
end if<br />
|
||||
save this_image in new_item as JPEG<br />
|
||||
return new_item<br />
|
||||
on error msg<br />
|
||||
return msg<br />
|
||||
end try<br />
|
||||
end tell<br />
|
||||
end convert_image</div></div>
|
||||
</div></div></div> </div>
|
||||
</div>
|
||||
|
||||
<ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
|
||||
</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/comment/158 by HTTrack Website Copier/3.x [XR&CO'2014], Sun, 08 Dec 2019 12:05:00 GMT -->
|
||||
</html>
|
||||
@@ -0,0 +1,239 @@
|
||||
<!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/comment/161 by HTTrack Website Copier/3.x [XR&CO'2014], Sun, 08 Dec 2019 12:05:00 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="../../node/228/" />
|
||||
<link rel="shortlink" href="../../node/228/" />
|
||||
<title>Strato HiDrive unter Ubuntu einbinden | 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":"_w5oKCojItlqYM-pMH3YHFa7-MBrmHJIXJ1mO25Zm6I","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-228 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">Strato HiDrive unter Ubuntu einbinden</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-228" class="node node-story node-promoted">
|
||||
|
||||
|
||||
|
||||
<span class="submitted">28. July 2010 - 11:09 — <span class="username">Tilman</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>Mein neues <a href="http://hidrive.strato.com/">HiDrive</a> unter Ubuntu 10.04 einzubinden hat etwas Nerven gekostet. WebDAV geht sofort (z.B. <a href="http://tuxpool.blogspot.com/2009/07/webdav-bug-in-ubuntu-jaunty.html">so</a>), ist aber schweinelahm. SMB über OpenVPN ist fürchterlich einzurichten und mir ist nicht so ganz klar, wie man das VPN vom restlichen Verkehr entkoppelt - man will ja nur die Kommunikation mit dem HiDrive darüber laufen lassen.
|
||||
Die Lösung: SFTP per <a href="http://www.heise.de/ct/hotline/Dateisystem-per-SSH-320860.html">sshfs</a>. Fühlt sich fast an, als wäre es die lokale Festplatte.</p>
|
||||
|
||||
<p>Vorbereitung:</p>
|
||||
|
||||
<div class="geshifilter"><div class="text geshifilter-text">sudo adduser username fuse # Benutzer "username" der Gruppe fuse hinzufügen (wird nach nächstem Login aktiv)<br />
|
||||
sudo mkdir /media/hidrive # Mountpoint anlegen<br />
|
||||
sudo chmod 777 /media/hidrive</div></div>
|
||||
|
||||
<p>mount funktioniert so:</p>
|
||||
|
||||
<div class="geshifilter"><div class="text geshifilter-text">sshfs -o allow_other -o workaround=rename username@sftp.hidrive.strato.com: /media/hidrive</div></div>
|
||||
|
||||
<p>Nur mit workaround=rename kann ich Dateien auf dem HiDrive ersetzen und mit gedit bearbeiten (weil das normalerweise anscheinend eine temporäre Datei schreibt und die dann umbenennt).</p>
|
||||
|
||||
<p>unmount so:</p>
|
||||
|
||||
<div class="geshifilter"><div class="text geshifilter-text">fusermount -u /media/hidrive</div></div>
|
||||
|
||||
<p>Wenn man beim Einloggen nicht immer das Passwort eingeben möchte, kann man auch einen ssh-Key verwenden, eine Anleitung dafür gibt es bei Strato unter www.strato-faq.de/artikel.html?id=2297</p>
|
||||
|
||||
<p>Das Login-Skript sieht dann so aus:</p>
|
||||
|
||||
<div class="geshifilter"><div class="text geshifilter-text">#!/bin/sh<br />
|
||||
sshfs -o IdentityFile=/home/user/.ssh/id_rsa -o allow_other -o workaround=rename username@sftp.hidrive.strato.com: /media/hidrive</div></div>
|
||||
|
||||
<p><br /></p>
|
||||
|
||||
<hr />
|
||||
|
||||
<p><strong>Edit:</strong></p>
|
||||
|
||||
<h3>Nachtrag</h3>
|
||||
|
||||
<p>Wie Jens in den Kommentaren richtig anmerkt, muss man noch die fusermount-Konfiguration anpassen, damit das Einbinden auch für normale user funktioniert. Beim mount bemerkt fusermount sonst auch ganz korrekt:</p>
|
||||
|
||||
<div class="geshifilter"><div class="text geshifilter-text">fusermount: option allow_other only allowed if 'user_allow_other' is set in /etc/fuse.conf</div></div>
|
||||
|
||||
<p>Die Zeile "user_allow_other" ist in /etc/fuse.conf auch schon vorhanden und muss nur wieder einkommentiert werden. Bei mir beschwert sich fusermount unter Ubuntu 12.04 (64 bit) allerdings außerdem noch über die Zugriffsrechte:</p>
|
||||
|
||||
<div class="geshifilter"><div class="text geshifilter-text">fusermount: failed to open /etc/fuse.conf: Permission denied</div></div>
|
||||
|
||||
<p>Sobald ich die Datei per chmod zum Lesen für alle Benutzer freigegeben habe, ist auch dieser Fehler verschwunden. Danach können dann auch normale Benutzer das hidrive mounten.</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 id="comments" class="comment-wrapper">
|
||||
<h2 class="title">Comments</h2>
|
||||
|
||||
<a id="comment-161"></a>
|
||||
<div class="comment comment-by-anonymous odd">
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
<span class="submitted">23. July 2011 - 12:33 — <a href="http://www.andreaswittig.info/" rel="nofollow" class="username">Andreas</a></span>
|
||||
|
||||
|
||||
|
||||
<h3><a href="index.html#comment-161" class="permalink" rel="bookmark">Funktioniert das bei dir</a></h3>
|
||||
|
||||
<div class="content">
|
||||
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even"><p>Funktioniert das bei dir noch? Bei mir kommt nach dem Login "remote host has disconnected".</p>
|
||||
</div></div></div> </div>
|
||||
</div>
|
||||
|
||||
<ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
|
||||
<div class="indented"><a id="comment-162"></a>
|
||||
<div class="comment comment-by-anonymous even">
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
<span class="submitted">20. September 2011 - 14:47 — <a href="http://www.stromanbietertest.com/contact" rel="nofollow" class="username">Stroman</a></span>
|
||||
|
||||
|
||||
|
||||
<h3><a href="../162/#comment-162" class="permalink" rel="bookmark">Bei mir gibt's dasselbe</a></h3>
|
||||
|
||||
<div class="content">
|
||||
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even"><p>Bei mir gibt's dasselbe Problem.</p>
|
||||
</div></div></div> </div>
|
||||
</div>
|
||||
|
||||
<ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
|
||||
<div class="indented"><a id="comment-184"></a>
|
||||
<div class="comment comment-by-anonymous odd">
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
<span class="submitted">17. November 2011 - 21:44 — <span class="username">Anonym</span></span>
|
||||
|
||||
|
||||
|
||||
<h3><a href="../184/#comment-184" class="permalink" rel="bookmark">Also bei mir geht es</a></h3>
|
||||
|
||||
<div class="content">
|
||||
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even"><p>Also bei mir geht es wunderbar :)</p>
|
||||
</div></div></div> </div>
|
||||
</div>
|
||||
|
||||
<ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
</div></div><a id="comment-185"></a>
|
||||
<div class="comment comment-by-anonymous even">
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
<span class="submitted">19. November 2011 - 15:03 — <a href="http://www.stenneken.de/" rel="nofollow" class="username">Jens Stenneken</a></span>
|
||||
|
||||
|
||||
|
||||
<h3><a href="../185/#comment-185" class="permalink" rel="bookmark">Ubuntu 11.10</a></h3>
|
||||
|
||||
<div class="content">
|
||||
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even"><p>Hallo,</p>
|
||||
|
||||
<p>vielen Dank für den Tipp.</p>
|
||||
|
||||
<p>Klappt wunderbar auch unter der neusten Ubuntu Version 11.10 64bit.</p>
|
||||
|
||||
<p>Aber man muss noch die Datei /etc/fuse.conf bearbeitet und:</p>
|
||||
|
||||
<p>user_allow_other hinzufügen.</p>
|
||||
|
||||
<p>Gruß
|
||||
Jens</p>
|
||||
</div></div></div> </div>
|
||||
</div>
|
||||
|
||||
<ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
|
||||
</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/comment/161 by HTTrack Website Copier/3.x [XR&CO'2014], Sun, 08 Dec 2019 12:05:00 GMT -->
|
||||
</html>
|
||||
@@ -0,0 +1,239 @@
|
||||
<!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/comment/162 by HTTrack Website Copier/3.x [XR&CO'2014], Sun, 08 Dec 2019 12:05:00 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="../../node/228/" />
|
||||
<link rel="shortlink" href="../../node/228/" />
|
||||
<title>Strato HiDrive unter Ubuntu einbinden | 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":"tLRp-FwD-fizCrX2nf1kQnAQDFYCpUHVBU-Z5VY2bOs","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-228 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">Strato HiDrive unter Ubuntu einbinden</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-228" class="node node-story node-promoted">
|
||||
|
||||
|
||||
|
||||
<span class="submitted">28. July 2010 - 11:09 — <span class="username">Tilman</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>Mein neues <a href="http://hidrive.strato.com/">HiDrive</a> unter Ubuntu 10.04 einzubinden hat etwas Nerven gekostet. WebDAV geht sofort (z.B. <a href="http://tuxpool.blogspot.com/2009/07/webdav-bug-in-ubuntu-jaunty.html">so</a>), ist aber schweinelahm. SMB über OpenVPN ist fürchterlich einzurichten und mir ist nicht so ganz klar, wie man das VPN vom restlichen Verkehr entkoppelt - man will ja nur die Kommunikation mit dem HiDrive darüber laufen lassen.
|
||||
Die Lösung: SFTP per <a href="http://www.heise.de/ct/hotline/Dateisystem-per-SSH-320860.html">sshfs</a>. Fühlt sich fast an, als wäre es die lokale Festplatte.</p>
|
||||
|
||||
<p>Vorbereitung:</p>
|
||||
|
||||
<div class="geshifilter"><div class="text geshifilter-text">sudo adduser username fuse # Benutzer "username" der Gruppe fuse hinzufügen (wird nach nächstem Login aktiv)<br />
|
||||
sudo mkdir /media/hidrive # Mountpoint anlegen<br />
|
||||
sudo chmod 777 /media/hidrive</div></div>
|
||||
|
||||
<p>mount funktioniert so:</p>
|
||||
|
||||
<div class="geshifilter"><div class="text geshifilter-text">sshfs -o allow_other -o workaround=rename username@sftp.hidrive.strato.com: /media/hidrive</div></div>
|
||||
|
||||
<p>Nur mit workaround=rename kann ich Dateien auf dem HiDrive ersetzen und mit gedit bearbeiten (weil das normalerweise anscheinend eine temporäre Datei schreibt und die dann umbenennt).</p>
|
||||
|
||||
<p>unmount so:</p>
|
||||
|
||||
<div class="geshifilter"><div class="text geshifilter-text">fusermount -u /media/hidrive</div></div>
|
||||
|
||||
<p>Wenn man beim Einloggen nicht immer das Passwort eingeben möchte, kann man auch einen ssh-Key verwenden, eine Anleitung dafür gibt es bei Strato unter www.strato-faq.de/artikel.html?id=2297</p>
|
||||
|
||||
<p>Das Login-Skript sieht dann so aus:</p>
|
||||
|
||||
<div class="geshifilter"><div class="text geshifilter-text">#!/bin/sh<br />
|
||||
sshfs -o IdentityFile=/home/user/.ssh/id_rsa -o allow_other -o workaround=rename username@sftp.hidrive.strato.com: /media/hidrive</div></div>
|
||||
|
||||
<p><br /></p>
|
||||
|
||||
<hr />
|
||||
|
||||
<p><strong>Edit:</strong></p>
|
||||
|
||||
<h3>Nachtrag</h3>
|
||||
|
||||
<p>Wie Jens in den Kommentaren richtig anmerkt, muss man noch die fusermount-Konfiguration anpassen, damit das Einbinden auch für normale user funktioniert. Beim mount bemerkt fusermount sonst auch ganz korrekt:</p>
|
||||
|
||||
<div class="geshifilter"><div class="text geshifilter-text">fusermount: option allow_other only allowed if 'user_allow_other' is set in /etc/fuse.conf</div></div>
|
||||
|
||||
<p>Die Zeile "user_allow_other" ist in /etc/fuse.conf auch schon vorhanden und muss nur wieder einkommentiert werden. Bei mir beschwert sich fusermount unter Ubuntu 12.04 (64 bit) allerdings außerdem noch über die Zugriffsrechte:</p>
|
||||
|
||||
<div class="geshifilter"><div class="text geshifilter-text">fusermount: failed to open /etc/fuse.conf: Permission denied</div></div>
|
||||
|
||||
<p>Sobald ich die Datei per chmod zum Lesen für alle Benutzer freigegeben habe, ist auch dieser Fehler verschwunden. Danach können dann auch normale Benutzer das hidrive mounten.</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 id="comments" class="comment-wrapper">
|
||||
<h2 class="title">Comments</h2>
|
||||
|
||||
<a id="comment-161"></a>
|
||||
<div class="comment comment-by-anonymous odd">
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
<span class="submitted">23. July 2011 - 12:33 — <a href="http://www.andreaswittig.info/" rel="nofollow" class="username">Andreas</a></span>
|
||||
|
||||
|
||||
|
||||
<h3><a href="../161/#comment-161" class="permalink" rel="bookmark">Funktioniert das bei dir</a></h3>
|
||||
|
||||
<div class="content">
|
||||
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even"><p>Funktioniert das bei dir noch? Bei mir kommt nach dem Login "remote host has disconnected".</p>
|
||||
</div></div></div> </div>
|
||||
</div>
|
||||
|
||||
<ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
|
||||
<div class="indented"><a id="comment-162"></a>
|
||||
<div class="comment comment-by-anonymous even">
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
<span class="submitted">20. September 2011 - 14:47 — <a href="http://www.stromanbietertest.com/contact" rel="nofollow" class="username">Stroman</a></span>
|
||||
|
||||
|
||||
|
||||
<h3><a href="index.html#comment-162" class="permalink" rel="bookmark">Bei mir gibt's dasselbe</a></h3>
|
||||
|
||||
<div class="content">
|
||||
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even"><p>Bei mir gibt's dasselbe Problem.</p>
|
||||
</div></div></div> </div>
|
||||
</div>
|
||||
|
||||
<ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
|
||||
<div class="indented"><a id="comment-184"></a>
|
||||
<div class="comment comment-by-anonymous odd">
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
<span class="submitted">17. November 2011 - 21:44 — <span class="username">Anonym</span></span>
|
||||
|
||||
|
||||
|
||||
<h3><a href="../184/#comment-184" class="permalink" rel="bookmark">Also bei mir geht es</a></h3>
|
||||
|
||||
<div class="content">
|
||||
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even"><p>Also bei mir geht es wunderbar :)</p>
|
||||
</div></div></div> </div>
|
||||
</div>
|
||||
|
||||
<ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
</div></div><a id="comment-185"></a>
|
||||
<div class="comment comment-by-anonymous even">
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
<span class="submitted">19. November 2011 - 15:03 — <a href="http://www.stenneken.de/" rel="nofollow" class="username">Jens Stenneken</a></span>
|
||||
|
||||
|
||||
|
||||
<h3><a href="../185/#comment-185" class="permalink" rel="bookmark">Ubuntu 11.10</a></h3>
|
||||
|
||||
<div class="content">
|
||||
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even"><p>Hallo,</p>
|
||||
|
||||
<p>vielen Dank für den Tipp.</p>
|
||||
|
||||
<p>Klappt wunderbar auch unter der neusten Ubuntu Version 11.10 64bit.</p>
|
||||
|
||||
<p>Aber man muss noch die Datei /etc/fuse.conf bearbeitet und:</p>
|
||||
|
||||
<p>user_allow_other hinzufügen.</p>
|
||||
|
||||
<p>Gruß
|
||||
Jens</p>
|
||||
</div></div></div> </div>
|
||||
</div>
|
||||
|
||||
<ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
|
||||
</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/comment/162 by HTTrack Website Copier/3.x [XR&CO'2014], Sun, 08 Dec 2019 12:05:00 GMT -->
|
||||
</html>
|
||||
@@ -0,0 +1,239 @@
|
||||
<!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/comment/184 by HTTrack Website Copier/3.x [XR&CO'2014], Sun, 08 Dec 2019 12:05:00 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="../../node/228/" />
|
||||
<link rel="shortlink" href="../../node/228/" />
|
||||
<title>Strato HiDrive unter Ubuntu einbinden | 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":"R6mErWt1I2xQUM-0n_7wnAFOgaga-6gKD4LLCR0zkOg","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-228 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">Strato HiDrive unter Ubuntu einbinden</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-228" class="node node-story node-promoted">
|
||||
|
||||
|
||||
|
||||
<span class="submitted">28. July 2010 - 11:09 — <span class="username">Tilman</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>Mein neues <a href="http://hidrive.strato.com/">HiDrive</a> unter Ubuntu 10.04 einzubinden hat etwas Nerven gekostet. WebDAV geht sofort (z.B. <a href="http://tuxpool.blogspot.com/2009/07/webdav-bug-in-ubuntu-jaunty.html">so</a>), ist aber schweinelahm. SMB über OpenVPN ist fürchterlich einzurichten und mir ist nicht so ganz klar, wie man das VPN vom restlichen Verkehr entkoppelt - man will ja nur die Kommunikation mit dem HiDrive darüber laufen lassen.
|
||||
Die Lösung: SFTP per <a href="http://www.heise.de/ct/hotline/Dateisystem-per-SSH-320860.html">sshfs</a>. Fühlt sich fast an, als wäre es die lokale Festplatte.</p>
|
||||
|
||||
<p>Vorbereitung:</p>
|
||||
|
||||
<div class="geshifilter"><div class="text geshifilter-text">sudo adduser username fuse # Benutzer "username" der Gruppe fuse hinzufügen (wird nach nächstem Login aktiv)<br />
|
||||
sudo mkdir /media/hidrive # Mountpoint anlegen<br />
|
||||
sudo chmod 777 /media/hidrive</div></div>
|
||||
|
||||
<p>mount funktioniert so:</p>
|
||||
|
||||
<div class="geshifilter"><div class="text geshifilter-text">sshfs -o allow_other -o workaround=rename username@sftp.hidrive.strato.com: /media/hidrive</div></div>
|
||||
|
||||
<p>Nur mit workaround=rename kann ich Dateien auf dem HiDrive ersetzen und mit gedit bearbeiten (weil das normalerweise anscheinend eine temporäre Datei schreibt und die dann umbenennt).</p>
|
||||
|
||||
<p>unmount so:</p>
|
||||
|
||||
<div class="geshifilter"><div class="text geshifilter-text">fusermount -u /media/hidrive</div></div>
|
||||
|
||||
<p>Wenn man beim Einloggen nicht immer das Passwort eingeben möchte, kann man auch einen ssh-Key verwenden, eine Anleitung dafür gibt es bei Strato unter www.strato-faq.de/artikel.html?id=2297</p>
|
||||
|
||||
<p>Das Login-Skript sieht dann so aus:</p>
|
||||
|
||||
<div class="geshifilter"><div class="text geshifilter-text">#!/bin/sh<br />
|
||||
sshfs -o IdentityFile=/home/user/.ssh/id_rsa -o allow_other -o workaround=rename username@sftp.hidrive.strato.com: /media/hidrive</div></div>
|
||||
|
||||
<p><br /></p>
|
||||
|
||||
<hr />
|
||||
|
||||
<p><strong>Edit:</strong></p>
|
||||
|
||||
<h3>Nachtrag</h3>
|
||||
|
||||
<p>Wie Jens in den Kommentaren richtig anmerkt, muss man noch die fusermount-Konfiguration anpassen, damit das Einbinden auch für normale user funktioniert. Beim mount bemerkt fusermount sonst auch ganz korrekt:</p>
|
||||
|
||||
<div class="geshifilter"><div class="text geshifilter-text">fusermount: option allow_other only allowed if 'user_allow_other' is set in /etc/fuse.conf</div></div>
|
||||
|
||||
<p>Die Zeile "user_allow_other" ist in /etc/fuse.conf auch schon vorhanden und muss nur wieder einkommentiert werden. Bei mir beschwert sich fusermount unter Ubuntu 12.04 (64 bit) allerdings außerdem noch über die Zugriffsrechte:</p>
|
||||
|
||||
<div class="geshifilter"><div class="text geshifilter-text">fusermount: failed to open /etc/fuse.conf: Permission denied</div></div>
|
||||
|
||||
<p>Sobald ich die Datei per chmod zum Lesen für alle Benutzer freigegeben habe, ist auch dieser Fehler verschwunden. Danach können dann auch normale Benutzer das hidrive mounten.</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 id="comments" class="comment-wrapper">
|
||||
<h2 class="title">Comments</h2>
|
||||
|
||||
<a id="comment-161"></a>
|
||||
<div class="comment comment-by-anonymous odd">
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
<span class="submitted">23. July 2011 - 12:33 — <a href="http://www.andreaswittig.info/" rel="nofollow" class="username">Andreas</a></span>
|
||||
|
||||
|
||||
|
||||
<h3><a href="../161/#comment-161" class="permalink" rel="bookmark">Funktioniert das bei dir</a></h3>
|
||||
|
||||
<div class="content">
|
||||
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even"><p>Funktioniert das bei dir noch? Bei mir kommt nach dem Login "remote host has disconnected".</p>
|
||||
</div></div></div> </div>
|
||||
</div>
|
||||
|
||||
<ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
|
||||
<div class="indented"><a id="comment-162"></a>
|
||||
<div class="comment comment-by-anonymous even">
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
<span class="submitted">20. September 2011 - 14:47 — <a href="http://www.stromanbietertest.com/contact" rel="nofollow" class="username">Stroman</a></span>
|
||||
|
||||
|
||||
|
||||
<h3><a href="../162/#comment-162" class="permalink" rel="bookmark">Bei mir gibt's dasselbe</a></h3>
|
||||
|
||||
<div class="content">
|
||||
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even"><p>Bei mir gibt's dasselbe Problem.</p>
|
||||
</div></div></div> </div>
|
||||
</div>
|
||||
|
||||
<ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
|
||||
<div class="indented"><a id="comment-184"></a>
|
||||
<div class="comment comment-by-anonymous odd">
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
<span class="submitted">17. November 2011 - 21:44 — <span class="username">Anonym</span></span>
|
||||
|
||||
|
||||
|
||||
<h3><a href="index.html#comment-184" class="permalink" rel="bookmark">Also bei mir geht es</a></h3>
|
||||
|
||||
<div class="content">
|
||||
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even"><p>Also bei mir geht es wunderbar :)</p>
|
||||
</div></div></div> </div>
|
||||
</div>
|
||||
|
||||
<ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
</div></div><a id="comment-185"></a>
|
||||
<div class="comment comment-by-anonymous even">
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
<span class="submitted">19. November 2011 - 15:03 — <a href="http://www.stenneken.de/" rel="nofollow" class="username">Jens Stenneken</a></span>
|
||||
|
||||
|
||||
|
||||
<h3><a href="../185/#comment-185" class="permalink" rel="bookmark">Ubuntu 11.10</a></h3>
|
||||
|
||||
<div class="content">
|
||||
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even"><p>Hallo,</p>
|
||||
|
||||
<p>vielen Dank für den Tipp.</p>
|
||||
|
||||
<p>Klappt wunderbar auch unter der neusten Ubuntu Version 11.10 64bit.</p>
|
||||
|
||||
<p>Aber man muss noch die Datei /etc/fuse.conf bearbeitet und:</p>
|
||||
|
||||
<p>user_allow_other hinzufügen.</p>
|
||||
|
||||
<p>Gruß
|
||||
Jens</p>
|
||||
</div></div></div> </div>
|
||||
</div>
|
||||
|
||||
<ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
|
||||
</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/comment/184 by HTTrack Website Copier/3.x [XR&CO'2014], Sun, 08 Dec 2019 12:05:00 GMT -->
|
||||
</html>
|
||||
@@ -0,0 +1,239 @@
|
||||
<!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/comment/185 by HTTrack Website Copier/3.x [XR&CO'2014], Sun, 08 Dec 2019 12:05:00 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="../../node/228/" />
|
||||
<link rel="shortlink" href="../../node/228/" />
|
||||
<title>Strato HiDrive unter Ubuntu einbinden | 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":"eDnARKb0qG7qixG-gfa2XZHAAtnFxRoe-o1EpIUDPFo","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-228 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">Strato HiDrive unter Ubuntu einbinden</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-228" class="node node-story node-promoted">
|
||||
|
||||
|
||||
|
||||
<span class="submitted">28. July 2010 - 11:09 — <span class="username">Tilman</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>Mein neues <a href="http://hidrive.strato.com/">HiDrive</a> unter Ubuntu 10.04 einzubinden hat etwas Nerven gekostet. WebDAV geht sofort (z.B. <a href="http://tuxpool.blogspot.com/2009/07/webdav-bug-in-ubuntu-jaunty.html">so</a>), ist aber schweinelahm. SMB über OpenVPN ist fürchterlich einzurichten und mir ist nicht so ganz klar, wie man das VPN vom restlichen Verkehr entkoppelt - man will ja nur die Kommunikation mit dem HiDrive darüber laufen lassen.
|
||||
Die Lösung: SFTP per <a href="http://www.heise.de/ct/hotline/Dateisystem-per-SSH-320860.html">sshfs</a>. Fühlt sich fast an, als wäre es die lokale Festplatte.</p>
|
||||
|
||||
<p>Vorbereitung:</p>
|
||||
|
||||
<div class="geshifilter"><div class="text geshifilter-text">sudo adduser username fuse # Benutzer "username" der Gruppe fuse hinzufügen (wird nach nächstem Login aktiv)<br />
|
||||
sudo mkdir /media/hidrive # Mountpoint anlegen<br />
|
||||
sudo chmod 777 /media/hidrive</div></div>
|
||||
|
||||
<p>mount funktioniert so:</p>
|
||||
|
||||
<div class="geshifilter"><div class="text geshifilter-text">sshfs -o allow_other -o workaround=rename username@sftp.hidrive.strato.com: /media/hidrive</div></div>
|
||||
|
||||
<p>Nur mit workaround=rename kann ich Dateien auf dem HiDrive ersetzen und mit gedit bearbeiten (weil das normalerweise anscheinend eine temporäre Datei schreibt und die dann umbenennt).</p>
|
||||
|
||||
<p>unmount so:</p>
|
||||
|
||||
<div class="geshifilter"><div class="text geshifilter-text">fusermount -u /media/hidrive</div></div>
|
||||
|
||||
<p>Wenn man beim Einloggen nicht immer das Passwort eingeben möchte, kann man auch einen ssh-Key verwenden, eine Anleitung dafür gibt es bei Strato unter www.strato-faq.de/artikel.html?id=2297</p>
|
||||
|
||||
<p>Das Login-Skript sieht dann so aus:</p>
|
||||
|
||||
<div class="geshifilter"><div class="text geshifilter-text">#!/bin/sh<br />
|
||||
sshfs -o IdentityFile=/home/user/.ssh/id_rsa -o allow_other -o workaround=rename username@sftp.hidrive.strato.com: /media/hidrive</div></div>
|
||||
|
||||
<p><br /></p>
|
||||
|
||||
<hr />
|
||||
|
||||
<p><strong>Edit:</strong></p>
|
||||
|
||||
<h3>Nachtrag</h3>
|
||||
|
||||
<p>Wie Jens in den Kommentaren richtig anmerkt, muss man noch die fusermount-Konfiguration anpassen, damit das Einbinden auch für normale user funktioniert. Beim mount bemerkt fusermount sonst auch ganz korrekt:</p>
|
||||
|
||||
<div class="geshifilter"><div class="text geshifilter-text">fusermount: option allow_other only allowed if 'user_allow_other' is set in /etc/fuse.conf</div></div>
|
||||
|
||||
<p>Die Zeile "user_allow_other" ist in /etc/fuse.conf auch schon vorhanden und muss nur wieder einkommentiert werden. Bei mir beschwert sich fusermount unter Ubuntu 12.04 (64 bit) allerdings außerdem noch über die Zugriffsrechte:</p>
|
||||
|
||||
<div class="geshifilter"><div class="text geshifilter-text">fusermount: failed to open /etc/fuse.conf: Permission denied</div></div>
|
||||
|
||||
<p>Sobald ich die Datei per chmod zum Lesen für alle Benutzer freigegeben habe, ist auch dieser Fehler verschwunden. Danach können dann auch normale Benutzer das hidrive mounten.</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 id="comments" class="comment-wrapper">
|
||||
<h2 class="title">Comments</h2>
|
||||
|
||||
<a id="comment-161"></a>
|
||||
<div class="comment comment-by-anonymous odd">
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
<span class="submitted">23. July 2011 - 12:33 — <a href="http://www.andreaswittig.info/" rel="nofollow" class="username">Andreas</a></span>
|
||||
|
||||
|
||||
|
||||
<h3><a href="../161/#comment-161" class="permalink" rel="bookmark">Funktioniert das bei dir</a></h3>
|
||||
|
||||
<div class="content">
|
||||
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even"><p>Funktioniert das bei dir noch? Bei mir kommt nach dem Login "remote host has disconnected".</p>
|
||||
</div></div></div> </div>
|
||||
</div>
|
||||
|
||||
<ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
|
||||
<div class="indented"><a id="comment-162"></a>
|
||||
<div class="comment comment-by-anonymous even">
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
<span class="submitted">20. September 2011 - 14:47 — <a href="http://www.stromanbietertest.com/contact" rel="nofollow" class="username">Stroman</a></span>
|
||||
|
||||
|
||||
|
||||
<h3><a href="../162/#comment-162" class="permalink" rel="bookmark">Bei mir gibt's dasselbe</a></h3>
|
||||
|
||||
<div class="content">
|
||||
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even"><p>Bei mir gibt's dasselbe Problem.</p>
|
||||
</div></div></div> </div>
|
||||
</div>
|
||||
|
||||
<ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
|
||||
<div class="indented"><a id="comment-184"></a>
|
||||
<div class="comment comment-by-anonymous odd">
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
<span class="submitted">17. November 2011 - 21:44 — <span class="username">Anonym</span></span>
|
||||
|
||||
|
||||
|
||||
<h3><a href="../184/#comment-184" class="permalink" rel="bookmark">Also bei mir geht es</a></h3>
|
||||
|
||||
<div class="content">
|
||||
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even"><p>Also bei mir geht es wunderbar :)</p>
|
||||
</div></div></div> </div>
|
||||
</div>
|
||||
|
||||
<ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
</div></div><a id="comment-185"></a>
|
||||
<div class="comment comment-by-anonymous even">
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
<span class="submitted">19. November 2011 - 15:03 — <a href="http://www.stenneken.de/" rel="nofollow" class="username">Jens Stenneken</a></span>
|
||||
|
||||
|
||||
|
||||
<h3><a href="index.html#comment-185" class="permalink" rel="bookmark">Ubuntu 11.10</a></h3>
|
||||
|
||||
<div class="content">
|
||||
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even"><p>Hallo,</p>
|
||||
|
||||
<p>vielen Dank für den Tipp.</p>
|
||||
|
||||
<p>Klappt wunderbar auch unter der neusten Ubuntu Version 11.10 64bit.</p>
|
||||
|
||||
<p>Aber man muss noch die Datei /etc/fuse.conf bearbeitet und:</p>
|
||||
|
||||
<p>user_allow_other hinzufügen.</p>
|
||||
|
||||
<p>Gruß
|
||||
Jens</p>
|
||||
</div></div></div> </div>
|
||||
</div>
|
||||
|
||||
<ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
|
||||
</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/comment/185 by HTTrack Website Copier/3.x [XR&CO'2014], Sun, 08 Dec 2019 12:05:00 GMT -->
|
||||
</html>
|
||||
@@ -0,0 +1,441 @@
|
||||
<!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/comment/2 by HTTrack Website Copier/3.x [XR&CO'2014], Sun, 08 Dec 2019 12:05:00 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="../../node/23/" />
|
||||
<link rel="shortlink" href="../../node/23/" />
|
||||
<title>Apache 2.2.2, MySQL 5.0.21, PHP 5.1.4 und Subversion 1.3.1 | 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":"s_zS41wSun4Yc8A1RRh2mwIOBTcbktpudK-ktuUBHYs","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-23 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">Apache 2.2.2, MySQL 5.0.21, PHP 5.1.4 und Subversion 1.3.1</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-23" class="node node-story node-promoted">
|
||||
|
||||
|
||||
|
||||
<span class="submitted">27. May 2006 - 1:47 — <span class="username">Tilman</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>Anmerkung: Dieses Protokoll ist mit besserer Formatierung unter <a href="http://www.siarp.de/installation-log.html">http://www.siarp.de/installation-log.html</a> abgelegt.</p>
|
||||
<div style="font-size: small; text-align: center;">- Ziel: Apache, MySQL, PHP und Subversion auf den Hosteurope vServer unter SuSE 9.1 separat installieren -</div>
|
||||
<h1>siarp Neuinstallation (Kofler/Subversion-Mischung plus ein paar Extras)</h1>
|
||||
<!--break--><h2>MySQL, Apache, PHP 5</h2>
|
||||
<ul><li>
|
||||
Nach Empfehlung von <a href="http://www.kofler.cc/forum/forumthread.php?rootID=3538">http://www.kofler.cc/forum/forumthread.php?rootID=3538</a> deinstalliere ich Apache, PHP und MySQL über yast.<br />
|
||||
Dabei ignoriere ich sämtliche Abhängigkeiten mit irgendwelchen installierten 'frontpage extensions', 'mambo' und vor allem dem Paket 'psa' → Plesk wird kastriert.
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ rcapache2 stop<br />
|
||||
$ yast<br /><em>→ nach 'mysql', 'php' und 'apache' suchen, alles raushauen und neu starten</em>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Ich lege im Home-Verzeichnis von root ein Verzeichnis <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">siarp</span> an, in dem ich herunterladen und entpacken kann. Dahin lade ich die Apache-Quellen, MySQL, PHP und Subversion.
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ cd ~<br /><br />
|
||||
$ md siarp<br />
|
||||
$ cd siarp<br />
|
||||
$ wget http://ftp.wayne.edu/apache/httpd/httpd-2.2.2.tar.gz<br />
|
||||
$ wget http://dev.mysql.com/get/Downloads/MySQL-5.0/MySQL-server-5.0.21-0.glibc23.i386.rpm/from/ftp://ftp.fu-berlin.de/unix/databases/mysql/<br />
|
||||
$ wget http://dev.mysql.com/get/Downloads/MySQL-5.0/MySQL-client-5.0.21-0.glibc23.i386.rpm/from/ftp://ftp.fu-berlin.de/unix/databases/mysql/<br />
|
||||
$ wget http://dev.mysql.com/get/Downloads/MySQL-5.0/MySQL-devel-5.0.21-0.glibc23.i386.rpm/from/ftp://ftp.fu-berlin.de/unix/databases/mysql/<br />
|
||||
$ wget http://dev.mysql.com/get/Downloads/MySQL-5.0/MySQL-shared-5.0.21-0.glibc23.i386.rpm/from/ftp://ftp.fu-berlin.de/unix/databases/mysql/<br />
|
||||
$ wget http://de2.php.net/get/php-5.1.4.tar.gz/from/de3.php.net/mirror
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Dann noch entpacken:
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ gunzip httpd-2.2.2.tar.gz<br />
|
||||
$ gunzip php-5.1.4.tar.gz<br />
|
||||
$ tar -xvf httpd-2.2.2.tar<br />
|
||||
$ tar -xvf php-5.1.4.tar
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
MySQL installieren
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ cd ~/siarp<br />
|
||||
$ rpm -i MySQL*.rpm
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Weiter nach der <a href="http://www.kofler.cc/forum/forumthread.php?rootID=3538">Kofler-Anleitung</a>:
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ wget http://kent.dl.sourceforge.net/sourceforge/libpng/zlib-1.2.3.tar.gz<br />
|
||||
$ wget ftp://xmlsoft.org/libxml2/libxml2-2.6.24.tar.gz<br />
|
||||
$ gunzip zlib-1.2.3.tar.gz<br />
|
||||
$ gunzip libxml2-2.6.24.tar.gz<br />
|
||||
$ tar -xvf zlib-1.2.3.tar<br />
|
||||
$ tar -xvf libxml2-2.6.24.tar
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Installation der Libraries
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ cd zlib-1.2.3/<br />
|
||||
$ ./configure<br />
|
||||
$ make<br />
|
||||
$ make install<br />
|
||||
$ cd ..<br />
|
||||
$ cd libxml2-2.6.24/<br />
|
||||
$ ./configure<br />
|
||||
$ make<br />
|
||||
$ make install<br />
|
||||
$ cd ..
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Apache2 in <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">/usr/local/apache2</span> installieren. Ich habe hier noch ein paar zusätzliche Module aktiviert, WebDAV wird von Subversion benötigt.
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ cd httpd-2.2.2/<br />
|
||||
$ ./configure --prefix=/usr/local/apache2 --enable-so --enable-dav --enable-ssl --enable-alias --enable-dir --enable-deflate<br />
|
||||
$ make<br />
|
||||
$ make install<br />
|
||||
$ cd ..
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
PHP installieren
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ cd php-5.1.4/<br />
|
||||
$ ./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache2/bin/apxs --with-libxml-dir=/usr/local/lib --with-zlib --with-zlib-dir=/usr/local/lib --with-mysql=/usr --with-mysqli=/usr/bin/mysql_config --with-gd --enable-soap --enable-sockets<br />
|
||||
$ make<br />
|
||||
$ make install
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
In die <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">/usr/local/apache2/conf/httpd.conf</span> füge ich in Zeile 55 ein:
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
#siarp (manuell eingefuegt nach php-Installation)<br />
|
||||
AddType application/x-httpd-php .php
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Testlauf
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ /usr/local/apache2/bin/apachectl start<br />
|
||||
$ touch /usr/local/apache2/htdocs/phptest.php
|
||||
</div>
|
||||
<p> Dann in die Datei <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">phptest.php</span> die Zeile <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;"><?php phpinfo(); ?></span> einfügen und speichern. Und siehe: Die PHP-Konfiguration ist <a href="http://www.siarp.de/phptest.php">einsehbar</a>.
|
||||
</p></li>
|
||||
<li>
|
||||
<span style="font-weight: bold;">Aber: Schon verhält er sich komisch!</span> HTML-Seiten, in denen auf ein Bild verwiesen wird, werden nicht ausgeliefert. (Wieder das Dateigrößen-Problem?)<br /><span style="font-weight: bold;">Nach etwas Suchen dann die Lösung:</span> In der <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">httpd.conf</span> muss die Zeile "<span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">EnableSendfile off</span>" aktiviert werden (Z. 360). → Die Sendfile-Unterstützung wurde beim Kompilieren wohl nicht richtig erkannt; ein Klassiker.<br /><span style="font-weight: bold;">Frage:</span> Sollte auch MMAP (Zeile darüber) deaktiviert werden? (Das war der Standard-Trick beim XAMPP.) Da MMAP und Sendfile aber wohl für Performanceverbesserungen stehen (größerer Adressraum, glaube ich), lasse ich zumindest MMAP bis auf Weiteres drin.
|
||||
</li>
|
||||
<li>
|
||||
Weil's bis hierher so schön lief, logge ich mich in Virtuzzo ein, und erstelle vor der Subversion-Installation noch ein Backup.:<br />
|
||||
"May 27, 2006 01:48:45 PM, 580.83 Mb" (SuSE-Apache, -PHP und -MySQL deinstalliert und separat installiert)
|
||||
</li>
|
||||
</ul><h2>Subversion: Installation</h2>
|
||||
<ul><li>
|
||||
Erst mal zurück nach Hause und Subversion herunterladen und entpacken
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ cd ~/siarp<br />
|
||||
$ wget http://subversion.tigris.org/downloads/subversion-1.3.1.tar.gz<br />
|
||||
$ gunzip subversion-1.3.1.tar.gz<br />
|
||||
$ tar -xvf subversion-1.3.1.tar
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Jetzt mit den magischen Parametern installieren. (Im Wesentlichen nach <a href="http://svn.collab.net/repos/svn/trunk/INSTALL">http://svn.collab.net/repos/svn/trunk/INSTALL</a> mit Hilfe von <a href="http://iedb.org/blog/howtos/svn_install_de/">http://iedb.org/blog/howtos/svn_install_de/</a>.)
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ cd subversion-1.3.1/<br />
|
||||
$ ./configure --with-apxs=/usr/local/apache2/bin/apxs --with-apr=/usr/local/apache2 --with-apr-util=/usr/local/apache2 --with-ssl --with-zlib
|
||||
</div>
|
||||
<p> Am Schluss heult <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">configure</span> noch rum, dass keine BerkeleyDB installiert ist. Wunderbar, FSFS ist sowieso moderner. (→ <a href="http://svnbook.red-bean.com/en/1.1/ch05.html#svn-ch-5-sect-1.3.2">http://svnbook.red-bean.com/en/1.1/ch05.html#svn-ch-5-sect-1.3.2</a> und Vergleich unter <a href="http://svnbook.red-bean.com/en/1.2/svn.reposadmin.html#svn.reposadmin.basics.backends">http://svnbook.red-bean.com/en/1.2/svn.reposadmin.html#svn.reposadmin.basics.backends</a>)<br />
|
||||
Und weiter:</p>
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ make<br />
|
||||
$ make install
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Leider will Apache jetzt nicht mehr starten und meldet<br /><span style="color:#707070; font-style: italic;"><br />
|
||||
httpd: Syntax error on line 54 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/mod_dav_svn.so into server: libsvn_repos-1.so.0: cannot open shared object file: No such file or directory<br /></span><br />
|
||||
Aber das kenne ich schon vom XAMPP - Google hilft. Unter <a href="http://svn.haxx.se/users/archive-2004-11/0390.shtml">http://svn.haxx.se/users/archive-2004-11/0390.shtml</a> wird mir empfohlen, in der Datei <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">/etc/ld.so.conf</span> die Zeile <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">/usr/local/lib</span> einzufügen. Da die bereits vorhanden ist und ich ja auf die Libraries vom separat installierten Apache verweisen möchte, versuche ich es mit <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">/usr/local/apache2/lib</span> (weil <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">make install</span> am Schluss ausgiebt, dass die Libraries dorthin installiert wurden). Danach muss die Konfiguration erneuert werden:
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ /sbin/ldconfig
|
||||
</div>
|
||||
<p> Und schon will er wieder.
|
||||
</p></li>
|
||||
</ul><h2>Subversion: Konfiguration</h2>
|
||||
<ul><li>
|
||||
Erste Frage: Wohin mit dem Repository? (Ich habe diese UNIX-Verzeichnisstruktur nie so wirklich verinnerlicht.) Nach einem Blick in <a href="http://de.wikibooks.org/wiki/Linux-Kompendium:_Verzeichnisse_unter_Linux">http://de.wikibooks.org/wiki/Linux-Kompendium:_Verzeichnisse_unter_Linux</a> bin ich nur unwesentlich schlauer und entscheide ich mich für <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">/home/svn-repos</span>.
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ cd /home<br />
|
||||
$ md svn-repos
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Die zweite Frage ist, wofür und wieviele Repositories angelegt werden sollten. Ich beginne mal mit <a href="http://www.siarp.de/svn/siarp">siarp</a>. Subversion arbeitet dabei als Benutzer <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">svn</span>.
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ cd /home/svn-repos<br />
|
||||
$ md siarp<br />
|
||||
$ svnadmin create /home/svn-repos/siarp<br />
|
||||
$ chown -R svn.svn /home/svn-repos/siarp<br />
|
||||
$ chmod -R ug+w /home/svn-repos/siarp<br />
|
||||
$ chmod ug+s /home/svn-repos/siarp /home/svn-repos/siarp/*
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Damit die Repositories etwas schöner gelistet werden, bringt Subversion noch ein Stylesheet für Apache mit, das in die <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">htdocs</span> muss.
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ cd ~/siarp/subversion-1.3.1/tools/xslt/<br />
|
||||
$ md /usr/local/apache2/htdocs/subversion-xslt<br />
|
||||
$ cp * /usr/local/apache2/htdocs/subversion-xslt<br />
|
||||
$ chmod 644 /usr/local/apache2/htdocs/subversion-xslt/*
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Apache muss auf die Repositories zugreifen können. In der Subversion-Installationsanleitung heißt es dazu lapidar:
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
NOTE: Make sure that the user 'nobody' (or whatever UID the httpd process runs as) has permission to read and write the Berkeley DB files! This is a very common problem.
|
||||
</div>
|
||||
<p> Davon weiß ich allerdings nicht, wie man das am sinnvollsten regelt. Auch im <a href="http://svnbook.red-bean.com/en/1.2/svn.serverconfig.httpd.html#svn.serverconfig.httpd.basic">Subversion Handbuch</a> steht nur was von <cite>"There is no single correct way to set up your permissions"</cite>.<br />
|
||||
Die Repositories einfach allgemein freigben? In der schönen (und häufig zitierten) <a href="http://iedb.org/blog/howtos/svn_install_de/">Deadbeef-Anleitung für Apache+Subversion</a> wird einfach der gesamte Apache mit dem svn-User gestartet. Allerdings geht das nur, wenn man den Server <a href="http://svn.haxx.se/users/archive-2004-10/1024.shtml">nicht auf den Standard-Ports betreibt</a>. Meine Lösung wird im Subversion Handbuch zwar nur angedeutet, sollte aber korrekt sein: Dem Apache über die <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">httpd.conf</span> mitteilen, dass er als Nutzer <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">svn</span> agieren soll. Also die Zeilen 70 und 71 ändern auf. (Davor lief Apache als <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">daemon</span>.)</p>
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
User svn<br />
|
||||
Group svn
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Jetzt muss noch Apache das neue Repository in der <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">https.conf</span> bekannt gegeben werden:
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
# siarp Subversion-Anhang<br />
|
||||
<Location /svn/siarp><br />
|
||||
DAV svn<br />
|
||||
SVNPath /home/svn-repos/siarp<br />
|
||||
SVNIndexXSLT "/subversion-xslt/svnindex.xsl"<br />
|
||||
AuthType Basic<br />
|
||||
AuthName "siarp.de repository"<br />
|
||||
AuthUserFile /home/svn-repos/svn-auth-file<br />
|
||||
Require user martin tilman<br />
|
||||
</Location>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Für die Nutzerverwaltung braucht Subversion ein Userfile, das ich unter <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">/home/svn-repos/svn-auth-file</span> anlegen will. Dafür muss ich das htpasswd-Tool vom Apache benutzen:
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ /usr/local/apache2/bin/htpasswd -cm /home/svn-repos/svn-auth-file tilman<br /><span style="color:#707070; font-style: italic;"><br />
|
||||
New password:<br />
|
||||
Re-type new password:<br />
|
||||
Adding password for user tilman<br /></span>
|
||||
</div>
|
||||
<p> <span style="font-weight: bold;">Neue Benutzer</span> fügt man mit dem Befehl <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">/usr/local/apache2/bin/htpasswd -m /home/svn-repos/svn-auth-file <em>benutzername</em></span> hinzu.
|
||||
</p></li>
|
||||
<li>
|
||||
Das war's. Subversion ist unter <a href="http://www.siarp.de/svn/siarp/">http://www.siarp.de/svn/siarp/</a> erreichbar, sobald Apache gestartet ist.
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ /usr/local/apache2/bin/apachectl start
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Als krönenden Abschluss kopiere ich mein Protokoll in <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">htdocs</span>, so dass es unter <a href="http://www.siarp.de/installation-log.html">http://www.siarp.de/installation-log.html</a> erreichbar ist und mache mit Virtuzzo ein Backup ("May 27, 2006 05:41:32 PM, 707.27 Mb").
|
||||
</li>
|
||||
</ul><p><a id="zusammenfassung"></a></p>
|
||||
<h2>Zusammenfassung, To-Do und Fragen</h2>
|
||||
<p>
|
||||
So weit, so gut. Wir haben jetzt Apache mit MySQL und PHP und außerdem ein funktionierendes Subversion. Was muss jetzt noch kommen?
|
||||
</p>
|
||||
<ul><li>Subversion mit SSL nutzen. Dafür habe ich Apache mit --enable-ssl kompiliert, aber noch nix probiert.</li>
|
||||
<li>MySQL testen. Noch nicht gemacht.</li>
|
||||
<li>Eventuell noch etwas Sicherheits-Tuning. MySQL ist noch unkonfiguriert (Passwort) und der Subversion-User ist auch noch ohne Passwort.</li>
|
||||
<li>Noch mal eine schöne "Wie legt man ein Repository an"-Anleitung, die man dann nur noch abarbeiten muss</li>
|
||||
<li>Automatisiertes Backup für Repositories und htdocs. Was noch?</li>
|
||||
<li>Vielleicht sollte Apache nach einem Reboot automatisch starten. Wie das geht steht in der <a href="http://www.kofler.cc/forum/forumthread.php?rootID=3538">Kofler-Anleitung</a>.</li>
|
||||
<li>Noch mal die Frage: Brauchen wir System-Nutzer-Accounts? Oder müssen wir sowieso als root arbeiten, bei dem, was wir tun?</li>
|
||||
</ul><p>
|
||||
Allgemeine Bemerkungen zur Konfiguration
|
||||
</p>
|
||||
<ul><li>Apache wird gestartet mit <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">/usr/local/apache2/bin/apachectl start</span></li>
|
||||
<li>Die Webseite liegt unter <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">/usr/local/apache2/htdocs/</span>, die Repositories unter <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">/home/svn-repos/</span></li>
|
||||
<li>Wir sollten wohl doch für jedes Projekt ein extra Repository anlegen, da sonst das System der Gesamt-Versionsnummer von Subversion keinen Sinn macht</li>
|
||||
</ul><p><a id="backup"></a></p>
|
||||
<h2>Further reading: Backup und Vorsorge</h2>
|
||||
<ul><li>
|
||||
Noch ein paar Überlegungen zum Thema Backup: Virtuzzo geht relativ fix (ca. 20 Min), allerdings sind nur zwei Backups möglich. Also am besten später mal durch ein Backup des komplett eingerichteten Systems ersetzen. Dann hat man immer noch ein Backup für akutes übrig.
|
||||
</li>
|
||||
<li>
|
||||
Im Hosteurope-Hilfesystem wird außerdem <a href="http://reoback.sourceforge.net/">ReoBack</a> empfohlen. Vielleicht bei Gelegenheit mal anschauen.
|
||||
</li>
|
||||
<li>
|
||||
Noch was anderes: Anscheinend kann man (im Gegensatz zu den WebPacks) den Traffic nicht hart limitieren. Bis jetzt hatten wir beim Rumbasteln immer unter 400MB im Monat. Freivolumen ist laut KIS 250GB (die neuen Pakete haben 500GB bei gleichem Preis, das hätten sie ruhig mal rückwirkend upgraden können), das macht also ca. 8GB am Tag. Ich habe jedenfalls erst mal eine Warnbenachrichtigung bei mehr als 2GB am Tag eingerichtet.
|
||||
</li>
|
||||
<li>
|
||||
Hab mich bei der Suche nach einer harten Traffic-Begrenzung nochmal in Plesk eingeloggt. Das ist jetzt wohl wirklich blind und taub, man bekommt keine Server-Optionen mehr angezeigt.
|
||||
</li>
|
||||
</ul><h2>Dank an (Linksammlung)</h2>
|
||||
<ul><li><a href="../../">http://www.siarp.de/</a></li>
|
||||
<!--
|
||||
<li><p><a href="http://80.237.161.173/">http://80.237.161.173/</a></li>
|
||||
<li><a href="https://80.237.161.173:4643/vz/cp">https://80.237.161.173:4643/vz/cp</a></li>
|
||||
<li><a href="http://siarpde.standartimnetz.de/">http://siarpde.standartimnetz.de/</a></li>
|
||||
<p>-->
|
||||
<li><a href="http://www.kofler.cc/forum/forumthread.php?rootID=3538">http://www.kofler.cc/forum/forumthread.php?rootID=3538</a></li>
|
||||
<li><a href="http://www.bananas-playground.net/index.php?p=tutorials&m=svn.scratch#subversion">http://www.bananas-playground.net/index.php?p=tutorials&m=svn.scratch#subversion</a></li>
|
||||
<li><a href="http://svn.collab.net/repos/svn/trunk/INSTALL">http://svn.collab.net/repos/svn/trunk/INSTALL</a></li>
|
||||
<li><a href="http://forum.subversionbuch.de/viewtopic.php?t=62">http://forum.subversionbuch.de/viewtopic.php?t=62</a></li>
|
||||
<li><a href="http://www.apachefriends.org/f/viewtopic.php?t=17636">http://www.apachefriends.org/f/viewtopic.php?t=17636</a></li>
|
||||
<li><a href="http://iedb.org/blog/?page_id=12">http://iedb.org/blog/?page_id=12</a></li>
|
||||
<li><a href="http://dev.mysql.com/tech-resources/articles/4.1/unicode.html">http://dev.mysql.com/tech-resources/articles/4.1/unicode.html</a></li>
|
||||
</ul></div></div></div> </div>
|
||||
|
||||
<div class="clearfix">
|
||||
<div class="links"><ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
|
||||
<div id="comments" class="comment-wrapper">
|
||||
<h2 class="title">Comments</h2>
|
||||
|
||||
<a id="comment-2"></a>
|
||||
<div class="comment comment-by-node-author odd">
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
<span class="submitted">27. May 2006 - 9:47 — <span class="username">Tilman</span></span>
|
||||
|
||||
|
||||
|
||||
<h3><a href="index.html#comment-2" class="permalink" rel="bookmark">Mehrere Repositories mit einem httpd.conf-Eintrag</a></h3>
|
||||
|
||||
<div class="content">
|
||||
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even"><p>Wie gesagt, es muss noch ein Repositories-erstellen-HowTo folgen. Um es zu dokumentieren schon mal die Bemerkung:</p>
|
||||
<p>Man muss nicht unbedingt jedes Repository einzeln in die httpd.conf eintragen, sondern kann dort auch einen SVNParentPath angeben. Alle Repositories, die in diesem Verzeichnis liegen, werden dann automatisch gelistet. Nachteil: Keine getrennte Benutzerverwaltung für die verschiedenen Repositories (soweit mir bekannt --> nochmal prüfen)</p>
|
||||
</div></div></div> </div>
|
||||
</div>
|
||||
|
||||
<ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
<a id="comment-3"></a>
|
||||
<div class="comment comment-by-node-author even">
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
<span class="submitted">27. May 2006 - 10:00 — <span class="username">Tilman</span></span>
|
||||
|
||||
|
||||
|
||||
<h3><a href="../3/#comment-3" class="permalink" rel="bookmark">Weitere Apache-Module</a></h3>
|
||||
|
||||
<div class="content">
|
||||
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even"><p>Sammlung: Module, die vielleicht auch noch schön für'n Apache wären. (Lassen sich durch --enable-so ja nachträglich einbinden.)</p>
|
||||
<p>- mod_deflate<br />
|
||||
Dazu Zitat aus der Subversion-Installationsanleitung:<br />
|
||||
If you have configured mod_deflate to be in the server, you can enable compression support for your repository by adding the following line to your Location block: <span class="geshifilter"><code class="text geshifilter-text">SetOutputFilter DEFLATE</code></span></p>
|
||||
<p>- mod_mime<br />
|
||||
MIME-Zuordnung nach Dateinamenerweiterung</p>
|
||||
<p>- mod_dav_fs<br />
|
||||
Dieses Modul bietet Zugriff auf das _lokale_ Dateisystem, falls gebraucht. So oder so ist WebDAV an sich noch mal einen Blick wert.</p>
|
||||
<p>- mod_vhost_alias<br />
|
||||
Wird's gebraucht? Ich hab noch nicht so die Ahnung von vHost-Konzept.</p>
|
||||
<p>- mod_dir<br />
|
||||
Das habe ich vergessen. Directory-Listings sind mitunter schon ganz praktisch.</p>
|
||||
</div></div></div> </div>
|
||||
</div>
|
||||
|
||||
<ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
<a id="comment-4"></a>
|
||||
<div class="comment comment-by-node-author odd">
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
<span class="submitted">27. May 2006 - 12:51 — <span class="username">Tilman</span></span>
|
||||
|
||||
|
||||
|
||||
<h3><a href="../4/#comment-4" class="permalink" rel="bookmark">PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !</a></h3>
|
||||
|
||||
<div class="content">
|
||||
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even"><p>To do so, start the server, then issue the following commands:<br />
|
||||
/usr/bin/mysqladmin -u root password 'new-password'<br />
|
||||
/usr/bin/mysqladmin -u root -h lvps80-237-161-173.dedicated.hosteurope.de password 'new-password'<br />
|
||||
See the manual for more instructions.</p>
|
||||
</div></div></div> </div>
|
||||
</div>
|
||||
|
||||
<ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
|
||||
</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/comment/2 by HTTrack Website Copier/3.x [XR&CO'2014], Sun, 08 Dec 2019 12:05:00 GMT -->
|
||||
</html>
|
||||
@@ -0,0 +1,452 @@
|
||||
<!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/comment/200 by HTTrack Website Copier/3.x [XR&CO'2014], Sun, 08 Dec 2019 12:05:00 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="../../node/196/" />
|
||||
<link rel="shortlink" href="../../node/196/" />
|
||||
<title>Using AppleScript and cURL to import Content from iPhoto into Drupal | 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":"IC1ywsZovpbd1WJYMdWKTTeTEd0fTbK9UcNI-VmfUy4","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-196 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">Using AppleScript and cURL to import Content from iPhoto into Drupal</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-196" class="node node-story node-promoted">
|
||||
|
||||
|
||||
|
||||
<span class="submitted">7. February 2009 - 23:25 — <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'm using Apple's iPhoto to organize my private photographs and Drupal is what comes to my mind first when there's need for a web-based solution. Having lots of pictures from a recent trip I want to show people I started thinking about some kind of web gallery. Being a developer I need to come up with something fancier than just some stock gallery product like <a href="http://gallery.menalto.com/">Gallery2</a> (actually I don't really know that product so bear with me). I did some research and found some article about different approaches to build photo galleries in Drupal and also a nice <a href="http://blip.tv/file/256997">video tutorial</a>. I've used image module and gallery module before but the flexibility that CCK extended by imagefield and imagecache and views seem to offer is just too tempting.
|
||||
<!--break-->
|
||||
But how would I get my hundreds of pictures imported into my yet-to-be-built gallery site? There are plenty of exporter plug-ins for iPhoto sending pictures to galleries like said Gallery2, Flickr and so on. I did not find much information on how to write a plug-in for iPhoto but I found some <a href="http://ruk.ca/article/2604">AppleScript code</a> that did just an export to Drupal. This one seemed to be very outdated but it was a good start. I started a <a href="http://lists.drupal.org/pipermail/development/2009-February/031849.html">thread on the Drupal developer mailing list</a> which gave me interesting options but I stayed with the concept of using cURL because it's the most flexible and probably the fasted way for my one-time requirement and there are no dependencies. The missing piece was this <a href="http://drupal.org/node/80548">handbook page</a> on d.o.</p>
|
||||
|
||||
<p><em><strong>Note</strong>: The following is a kind of tutorial but the result is just a custom script that needs to be adjusted to your scenario.</em></p>
|
||||
|
||||
<p>AppleScript is probably not the most powerful language but it allows us to call shell scripts. The idea is to get all the image information from iPhoto and then use shell commands to upload to a Drupal site. The first step is to extract the cURL commands from the PHP code from the handbook page so I don't need a separate script. Here are the shell commands to create content on a Drupal site:</p>
|
||||
|
||||
<p>First we log in which means getting a cookie with session data.</p>
|
||||
|
||||
<div class="geshifilter"><div class="bash geshifilter-bash">curl http:<span class="sy0">//</span>localhost<span class="sy0">/</span>drupal<span class="sy0">/</span>?<span class="re2">q</span>=user \<br />
|
||||
<span class="re5">-s</span> \<br />
|
||||
<span class="re5">-c</span> <span class="sy0">/</span>tmp<span class="sy0">/</span>curl-cookies.txt \<br />
|
||||
<span class="re5">-b</span> <span class="sy0">/</span>tmp<span class="sy0">/</span>curl-cookies.txt \<br />
|
||||
<span class="re5">-F</span> <span class="st_h">'name=user'</span> \<br />
|
||||
<span class="re5">-F</span> <span class="st_h">'pass=pass'</span> \<br />
|
||||
<span class="re5">-F</span> <span class="st_h">'form_id=user_login'</span> \<br />
|
||||
<span class="re5">-F</span> <span class="st_h">'op=Log in'</span> \<br />
|
||||
<span class="re5">--output</span> ~<span class="sy0">/</span>response_login.html</div></div>
|
||||
|
||||
<p>This calls the user page with your username and password. Check <span class="geshifilter"><code class="text geshifilter-text">response_login.html</code></span> to see if this has been successful.</p>
|
||||
|
||||
<p>Next we need to get the security token of the content creation form.</p>
|
||||
|
||||
<div class="geshifilter"><div class="bash geshifilter-bash">curl http:<span class="sy0">//</span>localhost<span class="sy0">/</span>drupal<span class="sy0">/</span>?<span class="re2">q</span>=node<span class="sy0">/</span>add<span class="sy0">/</span>image \<br />
|
||||
<span class="re5">-s</span> \<br />
|
||||
<span class="re5">-c</span> <span class="sy0">/</span>tmp<span class="sy0">/</span>curl-cookies.txt \<br />
|
||||
<span class="re5">-b</span> <span class="sy0">/</span>tmp<span class="sy0">/</span>curl-cookies.txt \<br />
|
||||
<span class="re5">--output</span> ~<span class="sy0">/</span>response_create_form.html</div></div>
|
||||
|
||||
<p>I'm using a custom content type called "image" – substitute that with whatever your content type is. <span class="geshifilter"><code class="text geshifilter-text">response_create_form.html</code></span> contains the HTML form to add an image including the security token which we can extract using a perl regular expression:</p>
|
||||
|
||||
<div class="geshifilter"><div class="perl geshifilter-perl"><a href="http://perldoc.perl.org/functions/s.html"><span class="kw3">s</span></a><span class="sy0">/.</span><span class="re0">*edit</span><span class="sy0">-</span>image<span class="sy0">-</span>node<span class="sy0">-</span>form<span class="sy0">-</span>form<span class="sy0">-</span>token<span class="st0">" *value="</span><span class="br0">(</span><span class="br0">[</span><span class="sy0">^</span><span class="st0">"]*)"</span><span class="sy0">.*/</span><span class="co3">$1</span><span class="sy0">/</span><a href="http://perldoc.perl.org/functions/s.html"><span class="kw3">s</span></a></div></div>
|
||||
|
||||
<p>Finally we actually upload our content.</p>
|
||||
|
||||
<div class="geshifilter"><div class="bash geshifilter-bash">curl http:<span class="sy0">//</span>localhost<span class="sy0">/</span>drupal<span class="sy0">/</span>?<span class="re2">q</span>=node<span class="sy0">/</span>add<span class="sy0">/</span>image \<br />
|
||||
<span class="re5">-s</span> \<br />
|
||||
<span class="re5">-c</span> <span class="sy0">/</span>tmp<span class="sy0">/</span>curl-cookies.txt \<br />
|
||||
<span class="re5">-b</span> <span class="sy0">/</span>tmp<span class="sy0">/</span>curl-cookies.txt \<br />
|
||||
<span class="re5">-F</span> <span class="st_h">'title=My Title'</span> \<br />
|
||||
<span class="re5">-F</span> <span class="st_h">'field_image[0][fid]=0'</span> \<br />
|
||||
<span class="re5">-F</span> <span class="st_h">'field_image[0][list]=1'</span> \<br />
|
||||
<span class="re5">-F</span> <span class="st_h">'files[field_image_0]=@/Users/me/myimage.jpg'</span> \<br />
|
||||
<span class="re5">-F</span> <span class="st_h">'body=My content.'</span> \<br />
|
||||
<span class="re5">-F</span> <span class="st_h">'name=Myself'</span> \<br />
|
||||
<span class="re5">-F</span> <span class="st_h">'status=1'</span> \<br />
|
||||
<span class="re5">-F</span> <span class="st_h">'revision=1'</span> \<br />
|
||||
<span class="re5">-F</span> <span class="st_h">'op=Save'</span> \<br />
|
||||
<span class="re5">-F</span> <span class="st_h">'form_id=image_node_form'</span> \<br />
|
||||
<span class="re5">-F</span> <span class="st_h">'form_token=63fe773e820d2a4565720ab3bd0fc991'</span> \</div></div>
|
||||
|
||||
<p>Check your Drupal site – there should be new content. My content type contains an <a href="http://drupal.org/project/imagefield">imagefield</a> that takes the above values. The "@" makes cURL upload the actual file.</p>
|
||||
|
||||
<p>Now to upload all selected images in iPhoto to the Drupal site I merge the snippets above with the AppleScript from iPhotoToDrupal:</p>
|
||||
|
||||
<p><em><strong>Update:</strong> I had an issue with special characters as I entered "'" in iPhoto's description field. I found out about <span class="geshifilter"><code class="applescript geshifilter-applescript"><span class="kw1">quoted form</span> <span class="kw3">of</span> variablename</code></span> which is used to escape strings in AppleScript to use them in shell scripts. This funtion puts the string in single quotes automatically so I couldn't use it like <span class="geshifilter"><code class="applescript geshifilter-applescript"><span class="st0">" -F 'body="</span> <span class="sy0">&</span> <span class="kw1">quoted form</span> <span class="kw3">of</span> this_comment <span class="sy0">&</span> <span class="st0">"'"</span></code></span>. Fortunately it's also possible to quote the value only like <span class="geshifilter"><code class="text geshifilter-text">-F body='xxx'</code></span> so <span class="geshifilter"><code class="applescript geshifilter-applescript"><span class="st0">" -F body="</span> <span class="sy0">&</span> <span class="kw1">quoted form</span> <span class="kw3">of</span> this_comment</code></span> works. Just being at it I replaced it for other variables also. Finally, I added a "Done" dialog.</em></p>
|
||||
|
||||
<div class="geshifilter"><div class="applescript geshifilter-applescript"><span class="kw3">set</span> DrupalUsername <span class="kw3">to</span> <span class="st0">"user"</span><br />
|
||||
<span class="kw3">set</span> DrupalPassword <span class="kw3">to</span> <span class="st0">"pass"</span><br />
|
||||
<span class="kw3">set</span> DrupalSite <span class="kw3">to</span> <span class="st0">"http://localhost/drupal/"</span><br />
|
||||
<span class="kw3">set</span> DrupalContentType <span class="kw3">to</span> <span class="st0">"image"</span><br />
|
||||
<span class="kw3">set</span> DrupalAddPage <span class="kw3">to</span> <span class="st0">"?q=node/add/"</span> <span class="sy0">&</span> DrupalContentType<br />
|
||||
<span class="kw3">set</span> CookieFile <span class="kw3">to</span> <span class="st0">"/tmp/curl-cookies.txt"</span><br />
|
||||
<br />
|
||||
<br />
|
||||
<span class="kw3">set</span> curlLogin <span class="kw3">to</span> <span class="st0">"curl"</span><br />
|
||||
<span class="kw3">set</span> curlLogin <span class="kw3">to</span> curlLogin <span class="sy0">&</span> <span class="st0">" "</span> <span class="sy0">&</span> DrupalSite <span class="sy0">&</span> <span class="st0">"?q=user"</span><br />
|
||||
<span class="kw3">set</span> curlLogin <span class="kw3">to</span> curlLogin <span class="sy0">&</span> <span class="st0">" -s"</span><br />
|
||||
<span class="kw3">set</span> curlLogin <span class="kw3">to</span> curlLogin <span class="sy0">&</span> <span class="st0">" -c "</span> <span class="sy0">&</span> CookieFile<br />
|
||||
<span class="kw3">set</span> curlLogin <span class="kw3">to</span> curlLogin <span class="sy0">&</span> <span class="st0">" -b "</span> <span class="sy0">&</span> CookieFile<br />
|
||||
<span class="kw3">set</span> curlLogin <span class="kw3">to</span> curlLogin <span class="sy0">&</span> <span class="st0">" -F 'name="</span> <span class="sy0">&</span> DrupalUsername <span class="sy0">&</span> <span class="st0">"'"</span><br />
|
||||
<span class="kw3">set</span> curlLogin <span class="kw3">to</span> curlLogin <span class="sy0">&</span> <span class="st0">" -F 'pass="</span> <span class="sy0">&</span> DrupalPassword <span class="sy0">&</span> <span class="st0">"'"</span><br />
|
||||
<span class="kw3">set</span> curlLogin <span class="kw3">to</span> curlLogin <span class="sy0">&</span> <span class="st0">" -F 'op=Log in'"</span><br />
|
||||
<span class="kw3">set</span> curlLogin <span class="kw3">to</span> curlLogin <span class="sy0">&</span> <span class="st0">" -F 'form_id=user_login'"</span><br />
|
||||
<span class="kw1">do shell script</span> curlLogin<br />
|
||||
<br />
|
||||
<span class="kw3">set</span> curlAddForm <span class="kw3">to</span> <span class="st0">"curl"</span><br />
|
||||
<span class="kw3">set</span> curlAddForm <span class="kw3">to</span> curlAddForm <span class="sy0">&</span> <span class="st0">" "</span> <span class="sy0">&</span> DrupalSite <span class="sy0">&</span> DrupalAddPage<br />
|
||||
<span class="kw3">set</span> curlAddForm <span class="kw3">to</span> curlAddForm <span class="sy0">&</span> <span class="st0">" -s"</span><br />
|
||||
<span class="kw3">set</span> curlAddForm <span class="kw3">to</span> curlAddForm <span class="sy0">&</span> <span class="st0">" -c "</span> <span class="sy0">&</span> CookieFile<br />
|
||||
<span class="kw3">set</span> curlAddForm <span class="kw3">to</span> curlAddForm <span class="sy0">&</span> <span class="st0">" -b "</span> <span class="sy0">&</span> CookieFile<br />
|
||||
<span class="kw3">set</span> tokenSrc <span class="kw3">to</span> <span class="kw1">do shell script</span> curlAddForm<br />
|
||||
<br />
|
||||
<span class="kw3">set</span> token <span class="kw3">to</span> <span class="kw1">do shell script</span> <span class="st0">"echo '"</span> <span class="sy0">&</span> tokenSrc <span class="sy0">&</span> <span class="st0">"' | perl -pe 's/.*edit-"</span> <span class="sy0">&</span> DrupalContentType <span class="sy0">&</span> <span class="st0">"-node-form-form-token<span class="es0">\"</span> *value=<span class="es0">\"</span>([^<span class="es0">\"</span>]*)<span class="es0">\"</span>.*/$1/s';"</span><br />
|
||||
<br />
|
||||
<br />
|
||||
<span class="kw3">tell</span> <span class="kw1">application</span> <span class="st0">"iPhoto"</span><br />
|
||||
<span class="kw1">activate</span><br />
|
||||
<br />
|
||||
<span class="kw3">try</span><br />
|
||||
<span class="kw3">copy</span> <span class="br0">(</span><span class="kw3">my</span> selected_images<span class="br0">(</span><span class="br0">)</span><span class="br0">)</span> <span class="kw3">to</span> these_images<br />
|
||||
<br />
|
||||
<span class="co1">-- Make sure we have one or more image selected, and if we do, then grab the details of each and upload</span><br />
|
||||
<span class="kw3">if</span> these_images <span class="kw3">is</span> <span class="kw1">false</span> <span class="kw2">or</span> <span class="br0">(</span><span class="kw2">the</span> <span class="kw1">count</span> <span class="kw3">of</span> these_images<span class="br0">)</span> <span class="kw3">is</span> <span class="nu0">0</span> <span class="kw3">then</span><br />
|
||||
<span class="kw3">error</span> <span class="st0">"Please select one or more images."</span><br />
|
||||
<span class="kw3">end</span> <span class="kw3">if</span><br />
|
||||
<br />
|
||||
<span class="kw3">repeat</span> <span class="kw3">with</span> this_image <span class="kw3">in</span> these_images<br />
|
||||
<br />
|
||||
<span class="kw3">set</span> this_imagefile <span class="kw3">to</span> <span class="br0">(</span><span class="br0">(</span>image path <span class="kw3">of</span> this_image<span class="br0">)</span> <span class="kw2">as</span> <span class="kw1">POSIX file</span><span class="br0">)</span><br />
|
||||
<span class="kw3">set</span> this_uploadfile <span class="kw3">to</span> <span class="br0">(</span><span class="kw1">POSIX path</span> <span class="kw3">of</span> this_imagefile<span class="br0">)</span><br />
|
||||
<span class="kw3">set</span> this_comment <span class="kw3">to</span> <span class="br0">(</span><span class="kw2">the</span> comment <span class="kw3">of</span> this_image<span class="br0">)</span> <span class="kw2">as</span> <span class="kw1">string</span><br />
|
||||
<span class="kw3">set</span> this_name <span class="kw3">to</span> <span class="kw2">the</span> title <span class="kw3">of</span> this_image<br />
|
||||
<br />
|
||||
<span class="kw3">set</span> curlCreate <span class="kw3">to</span> <span class="st0">"curl"</span><br />
|
||||
<span class="kw3">set</span> curlCreate <span class="kw3">to</span> curlCreate <span class="sy0">&</span> <span class="st0">" "</span> <span class="sy0">&</span> DrupalSite <span class="sy0">&</span> DrupalAddPage<br />
|
||||
<span class="kw3">set</span> curlCreate <span class="kw3">to</span> curlCreate <span class="sy0">&</span> <span class="st0">" -s"</span><br />
|
||||
<span class="kw3">set</span> curlCreate <span class="kw3">to</span> curlCreate <span class="sy0">&</span> <span class="st0">" -c "</span> <span class="sy0">&</span> CookieFile<br />
|
||||
<span class="kw3">set</span> curlCreate <span class="kw3">to</span> curlCreate <span class="sy0">&</span> <span class="st0">" -b "</span> <span class="sy0">&</span> CookieFile<br />
|
||||
<span class="kw3">set</span> curlCreate <span class="kw3">to</span> curlCreate <span class="sy0">&</span> <span class="st0">" -F title="</span> <span class="sy0">&</span> <span class="kw1">quoted form</span> <span class="kw3">of</span> this_name<br />
|
||||
<span class="kw3">set</span> curlCreate <span class="kw3">to</span> curlCreate <span class="sy0">&</span> <span class="st0">" -F field_image[0][fid]=0"</span><br />
|
||||
<span class="kw3">set</span> curlCreate <span class="kw3">to</span> curlCreate <span class="sy0">&</span> <span class="st0">" -F field_image[0][list]=1"</span><br />
|
||||
<span class="kw3">set</span> curlCreate <span class="kw3">to</span> curlCreate <span class="sy0">&</span> <span class="st0">" -F files[field_image_0]=@"</span> <span class="sy0">&</span> <span class="kw1">quoted form</span> <span class="kw3">of</span> this_uploadfile<br />
|
||||
<span class="kw3">set</span> curlCreate <span class="kw3">to</span> curlCreate <span class="sy0">&</span> <span class="st0">" -F body="</span> <span class="sy0">&</span> <span class="kw1">quoted form</span> <span class="kw3">of</span> this_comment<br />
|
||||
<span class="kw3">set</span> curlCreate <span class="kw3">to</span> curlCreate <span class="sy0">&</span> <span class="st0">" -F name="</span> <span class="sy0">&</span> <span class="kw1">quoted form</span> <span class="kw3">of</span> DrupalUsername<br />
|
||||
<span class="kw3">set</span> curlCreate <span class="kw3">to</span> curlCreate <span class="sy0">&</span> <span class="st0">" -F status=1"</span><br />
|
||||
<span class="kw3">set</span> curlCreate <span class="kw3">to</span> curlCreate <span class="sy0">&</span> <span class="st0">" -F revision=1"</span><br />
|
||||
<span class="kw3">set</span> curlCreate <span class="kw3">to</span> curlCreate <span class="sy0">&</span> <span class="st0">" -F op="</span><br />
|
||||
<span class="kw3">set</span> curlCreate <span class="kw3">to</span> curlCreate <span class="sy0">&</span> <span class="st0">" -F form_id="</span> <span class="sy0">&</span> DrupalContentType <span class="sy0">&</span> <span class="st0">"_node_form"</span><br />
|
||||
<span class="kw3">set</span> curlCreate <span class="kw3">to</span> curlCreate <span class="sy0">&</span> <span class="st0">" -F form_token="</span> <span class="sy0">&</span> token<br />
|
||||
<span class="kw1">do shell script</span> curlCreate<br />
|
||||
<br />
|
||||
<span class="kw3">end</span> <span class="kw3">repeat</span><br />
|
||||
<br />
|
||||
<span class="kw3">on</span> <span class="kw3">error</span> error_message <span class="kw1">number</span> error_number<br />
|
||||
<span class="kw3">if</span> <span class="kw2">the</span> error_number <span class="kw3">is</span> <span class="kw2">not</span> <span class="sy0">-</span><span class="nu0">128</span> <span class="kw3">then</span><br />
|
||||
<span class="kw1">display dialog</span> error_message <span class="kw1">buttons</span> <span class="br0">{</span><span class="st0">"Cancel"</span><span class="br0">}</span> default button <span class="nu0">1</span><br />
|
||||
<span class="kw3">end</span> <span class="kw3">if</span><br />
|
||||
<span class="kw3">end</span> <span class="kw3">try</span><br />
|
||||
<br />
|
||||
<span class="kw3">end</span> <span class="kw3">tell</span><br />
|
||||
<br />
|
||||
<span class="kw1">display dialog</span> <span class="st0">"Done."</span> <span class="kw1">buttons</span> <span class="br0">{</span><span class="st0">"Ok"</span><span class="br0">}</span> default button <span class="nu0">1</span><br />
|
||||
<br />
|
||||
<br />
|
||||
<span class="co1">-- Taken right out the "Show Image File" AppleScript on the Apple site:</span><br />
|
||||
<span class="co1">-- http://www.apple.com/applescript/iphoto/</span><br />
|
||||
<span class="kw3">on</span> selected_images<span class="br0">(</span><span class="br0">)</span><br />
|
||||
<span class="kw3">tell</span> <span class="kw1">application</span> <span class="st0">"iPhoto"</span><br />
|
||||
<span class="kw3">try</span><br />
|
||||
<span class="co1">-- get selection</span><br />
|
||||
<span class="kw3">set</span> these_items <span class="kw3">to</span> <span class="kw2">the</span> <span class="kw1">selection</span><br />
|
||||
<span class="co1">-- check for single album selected</span><br />
|
||||
<span class="kw3">if</span> <span class="kw2">the</span> class <span class="kw3">of</span> <span class="kw1">item</span> <span class="nu0">1</span> <span class="kw3">of</span> these_items <span class="kw3">is</span> album <span class="kw3">then</span> <span class="kw3">error</span><br />
|
||||
<span class="co1">-- return the list of selected photos</span><br />
|
||||
<span class="kw3">return</span> these_items<br />
|
||||
<span class="kw3">on</span> <span class="kw3">error</span><br />
|
||||
<span class="kw3">return</span> <span class="kw1">false</span><br />
|
||||
<span class="kw3">end</span> <span class="kw3">try</span><br />
|
||||
<span class="kw3">end</span> <span class="kw3">tell</span><br />
|
||||
<span class="kw3">end</span> selected_images</div></div>
|
||||
|
||||
<p>Just go to iPhoto, select some images and start the script. The images including title and description will be uploaded as new nodes to your Drupal site.</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 id="comments" class="comment-wrapper">
|
||||
<h2 class="title">Comments</h2>
|
||||
|
||||
<a id="comment-158"></a>
|
||||
<div class="comment comment-by-anonymous odd">
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
<span class="submitted">30. June 2010 - 0:22 — <span class="username">Tony</span></span>
|
||||
|
||||
|
||||
|
||||
<h3><a href="../158/#comment-158" class="permalink" rel="bookmark">Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angeze</a></h3>
|
||||
|
||||
<div class="content">
|
||||
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even"><p>Hi-</p>
|
||||
|
||||
<p>Nice job. I've been trying to use your applescript but am getting an error, "the command exited with a non-zero status". My Drupal install has clean URLs on. Do I need to modify the strings in your script to fit, or will the "non-clean" URLs still work?</p>
|
||||
|
||||
<p>Here's the details on my parts:
|
||||
Drupal 6.17
|
||||
iPhoto 7.1.5 (aka iPhoto '08)</p>
|
||||
|
||||
<p>Thanks!</p>
|
||||
</div></div></div> </div>
|
||||
</div>
|
||||
|
||||
<ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
<a id="comment-200"></a>
|
||||
<div class="comment comment-by-anonymous even">
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
<span class="submitted">29. March 2012 - 18:40 — <span class="username">Anonym</span></span>
|
||||
|
||||
|
||||
|
||||
<h3><a href="index.html#comment-200" class="permalink" rel="bookmark">I needed to change reg regex....</a></h3>
|
||||
|
||||
<div class="content">
|
||||
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even"><p>In my Drupal 7.12 i needed to alter your regex line :</p>
|
||||
|
||||
<div class="geshifilter"><div class="text geshifilter-text">set token to do shell script "echo '" & tokenSrc & "' | perl -pe 's/.*edit-" & DrupalContentType & "-node-form-form-token\" *value=\"([^\"]*)\".*/$1/s';"</div></div>
|
||||
|
||||
<p>to:</p>
|
||||
|
||||
<div class="geshifilter"><div class="text geshifilter-text">set token to do shell script "echo '" & tokenSrc & "' | grep form_token | perl -pe 's/.*name=\"form_token\" *value=\"([^\"]*)\".*/$1/s';"</div></div>
|
||||
|
||||
<p>Somehow the name attribute was "form_token" and not "edit-image-node-form-form-token" as your code suggested.</p>
|
||||
|
||||
<p>Now it works great. Thanks for sharing!</p>
|
||||
|
||||
<p>I also added on the fly image resizing. All credits here go to https://discussions.apple.com/thread/2174350?start=0&tstart=0 from where I borrowed the resize code.</p>
|
||||
|
||||
<div class="geshifilter"><div class="text geshifilter-text">set longest_side to 1024<br />
|
||||
<br />
|
||||
set DrupalUsername to "admin"<br />
|
||||
set DrupalPassword to "XXXXXX"<br />
|
||||
set DrupalSite to "http://localhost/~arminhelbach/drupal7/"<br />
|
||||
set DrupalContentType to "image"<br />
|
||||
set DrupalAddPage to "?q=node/add/" & DrupalContentType<br />
|
||||
set CookieFile to "/tmp/curl-cookies.txt"<br />
|
||||
set tmp_path to "/tmp"<br />
|
||||
<br />
|
||||
set curlLogin to "curl"<br />
|
||||
set curlLogin to curlLogin & " " & DrupalSite & "?q=user"<br />
|
||||
set curlLogin to curlLogin & " -s"<br />
|
||||
set curlLogin to curlLogin & " -c " & CookieFile<br />
|
||||
set curlLogin to curlLogin & " -b " & CookieFile<br />
|
||||
set curlLogin to curlLogin & " -F 'name=" & DrupalUsername & "'"<br />
|
||||
set curlLogin to curlLogin & " -F 'pass=" & DrupalPassword & "'"<br />
|
||||
set curlLogin to curlLogin & " -F 'op=Log in'"<br />
|
||||
set curlLogin to curlLogin & " -F 'form_id=user_login'"<br />
|
||||
do shell script curlLogin<br />
|
||||
<br />
|
||||
set curlAddForm to "curl"<br />
|
||||
set curlAddForm to curlAddForm & " " & DrupalSite & DrupalAddPage<br />
|
||||
set curlAddForm to curlAddForm & " -s"<br />
|
||||
set curlAddForm to curlAddForm & " -c " & CookieFile<br />
|
||||
set curlAddForm to curlAddForm & " -b " & CookieFile<br />
|
||||
set tokenSrc to do shell script curlAddForm<br />
|
||||
<br />
|
||||
set token to do shell script "echo '" & tokenSrc & "' | grep form_token | perl -pe 's/.*name=\"form_token\" *value=\"([^\"]*)\".*/$1/s';"<br />
|
||||
<br />
|
||||
tell application "iPhoto"<br />
|
||||
activate<br />
|
||||
<br />
|
||||
try<br />
|
||||
copy (my selected_images()) to these_images<br />
|
||||
<br />
|
||||
-- Make sure we have one or more image selected, and if we do, then grab the details of each and upload<br />
|
||||
if these_images is false or (the count of these_images) is 0 then<br />
|
||||
error "Please select one or more images."<br />
|
||||
end if<br />
|
||||
<br />
|
||||
repeat with this_image in these_images<br />
|
||||
<br />
|
||||
set this_imagefile to ((image path of this_image) as POSIX file)<br />
|
||||
<br />
|
||||
set this_comment to (the comment of this_image) as string<br />
|
||||
set this_name to the title of this_image<br />
|
||||
<br />
|
||||
tell application "Image Events" to set t to PNG<br />
|
||||
copy (my convert_image(this_imagefile as alias, tmp_path, longest_side)) to tmpimagefile<br />
|
||||
set this_uploadfile to (POSIX path of tmpimagefile)<br />
|
||||
<br />
|
||||
set curlCreate to "curl"<br />
|
||||
set curlCreate to curlCreate & " " & DrupalSite & DrupalAddPage<br />
|
||||
set curlCreate to curlCreate & " -s"<br />
|
||||
set curlCreate to curlCreate & " -c " & CookieFile<br />
|
||||
set curlCreate to curlCreate & " -b " & CookieFile<br />
|
||||
set curlCreate to curlCreate & " -F title=" & quoted form of this_name<br />
|
||||
set curlCreate to curlCreate & " -F field_image[und][0][fid]=0"<br />
|
||||
set curlCreate to curlCreate & " -F field_image[und][0][list]=1"<br />
|
||||
set curlCreate to curlCreate & " -F files[field_image_und_0]=@" & quoted form of this_uploadfile<br />
|
||||
set curlCreate to curlCreate & " -F body=" & quoted form of this_comment<br />
|
||||
set curlCreate to curlCreate & " -F name=" & quoted form of DrupalUsername<br />
|
||||
set curlCreate to curlCreate & " -F status=1"<br />
|
||||
set curlCreate to curlCreate & " -F revision=1"<br />
|
||||
set curlCreate to curlCreate & " -F op="<br />
|
||||
set curlCreate to curlCreate & " -F form_id=" & DrupalContentType & "_node_form"<br />
|
||||
set curlCreate to curlCreate & " -F form_token=" & token<br />
|
||||
do shell script curlCreate<br />
|
||||
<br />
|
||||
do shell script "rm '" & this_uploadfile & "'"<br />
|
||||
end repeat<br />
|
||||
<br />
|
||||
on error error_message number error_number<br />
|
||||
if the error_number is not -128 then<br />
|
||||
display dialog error_message buttons {"Cancel"} default button 1<br />
|
||||
end if<br />
|
||||
end try<br />
|
||||
<br />
|
||||
end tell<br />
|
||||
<br />
|
||||
display dialog "Done." buttons {"Ok"} default button 1<br />
|
||||
<br />
|
||||
<br />
|
||||
-- Taken right out the "Show Image File" AppleScript on the Apple site:<br />
|
||||
-- http://www.apple.com/applescript/iphoto/<br />
|
||||
on selected_images()<br />
|
||||
tell application "iPhoto"<br />
|
||||
try<br />
|
||||
-- get selection<br />
|
||||
set these_items to the selection<br />
|
||||
-- check for single album selected<br />
|
||||
if the class of item 1 of these_items is album then error<br />
|
||||
-- return the list of selected photos<br />
|
||||
return these_items<br />
|
||||
on error<br />
|
||||
return false<br />
|
||||
end try<br />
|
||||
end tell<br />
|
||||
end selected_images<br />
|
||||
<br />
|
||||
<br />
|
||||
on convert_image(this_item, target_path, longest_side)<br />
|
||||
tell application "Image Events"<br />
|
||||
try<br />
|
||||
launch<br />
|
||||
-- open the image file<br />
|
||||
set this_image to open this_item<br />
|
||||
tell application "Finder"<br />
|
||||
set new_item to ((target_path) as string) & (name of this_item) & ".jpg"<br />
|
||||
end tell<br />
|
||||
copy dimensions of this_image to {current_width, current_height}<br />
|
||||
if current_width is greater than current_height then<br />
|
||||
set new_height to (longest_side * current_height) / current_width<br />
|
||||
if (new_height * longest_side) < (current_width * current_height) then<br />
|
||||
scale this_image to size longest_side<br />
|
||||
end if<br />
|
||||
else<br />
|
||||
if (new_height * longest_side) < (current_width * current_height) then<br />
|
||||
set new_height to (longest_side * current_width) / current_height<br />
|
||||
scale this_image to size new_height<br />
|
||||
end if<br />
|
||||
end if<br />
|
||||
save this_image in new_item as JPEG<br />
|
||||
return new_item<br />
|
||||
on error msg<br />
|
||||
return msg<br />
|
||||
end try<br />
|
||||
end tell<br />
|
||||
end convert_image</div></div>
|
||||
</div></div></div> </div>
|
||||
</div>
|
||||
|
||||
<ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
|
||||
</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/comment/200 by HTTrack Website Copier/3.x [XR&CO'2014], Sun, 08 Dec 2019 12:05:00 GMT -->
|
||||
</html>
|
||||
@@ -0,0 +1,441 @@
|
||||
<!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/comment/3 by HTTrack Website Copier/3.x [XR&CO'2014], Sun, 08 Dec 2019 12:05:00 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="../../node/23/" />
|
||||
<link rel="shortlink" href="../../node/23/" />
|
||||
<title>Apache 2.2.2, MySQL 5.0.21, PHP 5.1.4 und Subversion 1.3.1 | 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":"q_io4Wb_yFosSKWT5RKjEzY-CIduPO1emP_eZn_BwNM","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-23 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">Apache 2.2.2, MySQL 5.0.21, PHP 5.1.4 und Subversion 1.3.1</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-23" class="node node-story node-promoted">
|
||||
|
||||
|
||||
|
||||
<span class="submitted">27. May 2006 - 1:47 — <span class="username">Tilman</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>Anmerkung: Dieses Protokoll ist mit besserer Formatierung unter <a href="http://www.siarp.de/installation-log.html">http://www.siarp.de/installation-log.html</a> abgelegt.</p>
|
||||
<div style="font-size: small; text-align: center;">- Ziel: Apache, MySQL, PHP und Subversion auf den Hosteurope vServer unter SuSE 9.1 separat installieren -</div>
|
||||
<h1>siarp Neuinstallation (Kofler/Subversion-Mischung plus ein paar Extras)</h1>
|
||||
<!--break--><h2>MySQL, Apache, PHP 5</h2>
|
||||
<ul><li>
|
||||
Nach Empfehlung von <a href="http://www.kofler.cc/forum/forumthread.php?rootID=3538">http://www.kofler.cc/forum/forumthread.php?rootID=3538</a> deinstalliere ich Apache, PHP und MySQL über yast.<br />
|
||||
Dabei ignoriere ich sämtliche Abhängigkeiten mit irgendwelchen installierten 'frontpage extensions', 'mambo' und vor allem dem Paket 'psa' → Plesk wird kastriert.
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ rcapache2 stop<br />
|
||||
$ yast<br /><em>→ nach 'mysql', 'php' und 'apache' suchen, alles raushauen und neu starten</em>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Ich lege im Home-Verzeichnis von root ein Verzeichnis <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">siarp</span> an, in dem ich herunterladen und entpacken kann. Dahin lade ich die Apache-Quellen, MySQL, PHP und Subversion.
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ cd ~<br /><br />
|
||||
$ md siarp<br />
|
||||
$ cd siarp<br />
|
||||
$ wget http://ftp.wayne.edu/apache/httpd/httpd-2.2.2.tar.gz<br />
|
||||
$ wget http://dev.mysql.com/get/Downloads/MySQL-5.0/MySQL-server-5.0.21-0.glibc23.i386.rpm/from/ftp://ftp.fu-berlin.de/unix/databases/mysql/<br />
|
||||
$ wget http://dev.mysql.com/get/Downloads/MySQL-5.0/MySQL-client-5.0.21-0.glibc23.i386.rpm/from/ftp://ftp.fu-berlin.de/unix/databases/mysql/<br />
|
||||
$ wget http://dev.mysql.com/get/Downloads/MySQL-5.0/MySQL-devel-5.0.21-0.glibc23.i386.rpm/from/ftp://ftp.fu-berlin.de/unix/databases/mysql/<br />
|
||||
$ wget http://dev.mysql.com/get/Downloads/MySQL-5.0/MySQL-shared-5.0.21-0.glibc23.i386.rpm/from/ftp://ftp.fu-berlin.de/unix/databases/mysql/<br />
|
||||
$ wget http://de2.php.net/get/php-5.1.4.tar.gz/from/de3.php.net/mirror
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Dann noch entpacken:
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ gunzip httpd-2.2.2.tar.gz<br />
|
||||
$ gunzip php-5.1.4.tar.gz<br />
|
||||
$ tar -xvf httpd-2.2.2.tar<br />
|
||||
$ tar -xvf php-5.1.4.tar
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
MySQL installieren
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ cd ~/siarp<br />
|
||||
$ rpm -i MySQL*.rpm
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Weiter nach der <a href="http://www.kofler.cc/forum/forumthread.php?rootID=3538">Kofler-Anleitung</a>:
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ wget http://kent.dl.sourceforge.net/sourceforge/libpng/zlib-1.2.3.tar.gz<br />
|
||||
$ wget ftp://xmlsoft.org/libxml2/libxml2-2.6.24.tar.gz<br />
|
||||
$ gunzip zlib-1.2.3.tar.gz<br />
|
||||
$ gunzip libxml2-2.6.24.tar.gz<br />
|
||||
$ tar -xvf zlib-1.2.3.tar<br />
|
||||
$ tar -xvf libxml2-2.6.24.tar
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Installation der Libraries
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ cd zlib-1.2.3/<br />
|
||||
$ ./configure<br />
|
||||
$ make<br />
|
||||
$ make install<br />
|
||||
$ cd ..<br />
|
||||
$ cd libxml2-2.6.24/<br />
|
||||
$ ./configure<br />
|
||||
$ make<br />
|
||||
$ make install<br />
|
||||
$ cd ..
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Apache2 in <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">/usr/local/apache2</span> installieren. Ich habe hier noch ein paar zusätzliche Module aktiviert, WebDAV wird von Subversion benötigt.
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ cd httpd-2.2.2/<br />
|
||||
$ ./configure --prefix=/usr/local/apache2 --enable-so --enable-dav --enable-ssl --enable-alias --enable-dir --enable-deflate<br />
|
||||
$ make<br />
|
||||
$ make install<br />
|
||||
$ cd ..
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
PHP installieren
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ cd php-5.1.4/<br />
|
||||
$ ./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache2/bin/apxs --with-libxml-dir=/usr/local/lib --with-zlib --with-zlib-dir=/usr/local/lib --with-mysql=/usr --with-mysqli=/usr/bin/mysql_config --with-gd --enable-soap --enable-sockets<br />
|
||||
$ make<br />
|
||||
$ make install
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
In die <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">/usr/local/apache2/conf/httpd.conf</span> füge ich in Zeile 55 ein:
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
#siarp (manuell eingefuegt nach php-Installation)<br />
|
||||
AddType application/x-httpd-php .php
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Testlauf
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ /usr/local/apache2/bin/apachectl start<br />
|
||||
$ touch /usr/local/apache2/htdocs/phptest.php
|
||||
</div>
|
||||
<p> Dann in die Datei <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">phptest.php</span> die Zeile <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;"><?php phpinfo(); ?></span> einfügen und speichern. Und siehe: Die PHP-Konfiguration ist <a href="http://www.siarp.de/phptest.php">einsehbar</a>.
|
||||
</p></li>
|
||||
<li>
|
||||
<span style="font-weight: bold;">Aber: Schon verhält er sich komisch!</span> HTML-Seiten, in denen auf ein Bild verwiesen wird, werden nicht ausgeliefert. (Wieder das Dateigrößen-Problem?)<br /><span style="font-weight: bold;">Nach etwas Suchen dann die Lösung:</span> In der <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">httpd.conf</span> muss die Zeile "<span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">EnableSendfile off</span>" aktiviert werden (Z. 360). → Die Sendfile-Unterstützung wurde beim Kompilieren wohl nicht richtig erkannt; ein Klassiker.<br /><span style="font-weight: bold;">Frage:</span> Sollte auch MMAP (Zeile darüber) deaktiviert werden? (Das war der Standard-Trick beim XAMPP.) Da MMAP und Sendfile aber wohl für Performanceverbesserungen stehen (größerer Adressraum, glaube ich), lasse ich zumindest MMAP bis auf Weiteres drin.
|
||||
</li>
|
||||
<li>
|
||||
Weil's bis hierher so schön lief, logge ich mich in Virtuzzo ein, und erstelle vor der Subversion-Installation noch ein Backup.:<br />
|
||||
"May 27, 2006 01:48:45 PM, 580.83 Mb" (SuSE-Apache, -PHP und -MySQL deinstalliert und separat installiert)
|
||||
</li>
|
||||
</ul><h2>Subversion: Installation</h2>
|
||||
<ul><li>
|
||||
Erst mal zurück nach Hause und Subversion herunterladen und entpacken
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ cd ~/siarp<br />
|
||||
$ wget http://subversion.tigris.org/downloads/subversion-1.3.1.tar.gz<br />
|
||||
$ gunzip subversion-1.3.1.tar.gz<br />
|
||||
$ tar -xvf subversion-1.3.1.tar
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Jetzt mit den magischen Parametern installieren. (Im Wesentlichen nach <a href="http://svn.collab.net/repos/svn/trunk/INSTALL">http://svn.collab.net/repos/svn/trunk/INSTALL</a> mit Hilfe von <a href="http://iedb.org/blog/howtos/svn_install_de/">http://iedb.org/blog/howtos/svn_install_de/</a>.)
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ cd subversion-1.3.1/<br />
|
||||
$ ./configure --with-apxs=/usr/local/apache2/bin/apxs --with-apr=/usr/local/apache2 --with-apr-util=/usr/local/apache2 --with-ssl --with-zlib
|
||||
</div>
|
||||
<p> Am Schluss heult <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">configure</span> noch rum, dass keine BerkeleyDB installiert ist. Wunderbar, FSFS ist sowieso moderner. (→ <a href="http://svnbook.red-bean.com/en/1.1/ch05.html#svn-ch-5-sect-1.3.2">http://svnbook.red-bean.com/en/1.1/ch05.html#svn-ch-5-sect-1.3.2</a> und Vergleich unter <a href="http://svnbook.red-bean.com/en/1.2/svn.reposadmin.html#svn.reposadmin.basics.backends">http://svnbook.red-bean.com/en/1.2/svn.reposadmin.html#svn.reposadmin.basics.backends</a>)<br />
|
||||
Und weiter:</p>
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ make<br />
|
||||
$ make install
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Leider will Apache jetzt nicht mehr starten und meldet<br /><span style="color:#707070; font-style: italic;"><br />
|
||||
httpd: Syntax error on line 54 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/mod_dav_svn.so into server: libsvn_repos-1.so.0: cannot open shared object file: No such file or directory<br /></span><br />
|
||||
Aber das kenne ich schon vom XAMPP - Google hilft. Unter <a href="http://svn.haxx.se/users/archive-2004-11/0390.shtml">http://svn.haxx.se/users/archive-2004-11/0390.shtml</a> wird mir empfohlen, in der Datei <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">/etc/ld.so.conf</span> die Zeile <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">/usr/local/lib</span> einzufügen. Da die bereits vorhanden ist und ich ja auf die Libraries vom separat installierten Apache verweisen möchte, versuche ich es mit <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">/usr/local/apache2/lib</span> (weil <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">make install</span> am Schluss ausgiebt, dass die Libraries dorthin installiert wurden). Danach muss die Konfiguration erneuert werden:
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ /sbin/ldconfig
|
||||
</div>
|
||||
<p> Und schon will er wieder.
|
||||
</p></li>
|
||||
</ul><h2>Subversion: Konfiguration</h2>
|
||||
<ul><li>
|
||||
Erste Frage: Wohin mit dem Repository? (Ich habe diese UNIX-Verzeichnisstruktur nie so wirklich verinnerlicht.) Nach einem Blick in <a href="http://de.wikibooks.org/wiki/Linux-Kompendium:_Verzeichnisse_unter_Linux">http://de.wikibooks.org/wiki/Linux-Kompendium:_Verzeichnisse_unter_Linux</a> bin ich nur unwesentlich schlauer und entscheide ich mich für <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">/home/svn-repos</span>.
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ cd /home<br />
|
||||
$ md svn-repos
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Die zweite Frage ist, wofür und wieviele Repositories angelegt werden sollten. Ich beginne mal mit <a href="http://www.siarp.de/svn/siarp">siarp</a>. Subversion arbeitet dabei als Benutzer <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">svn</span>.
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ cd /home/svn-repos<br />
|
||||
$ md siarp<br />
|
||||
$ svnadmin create /home/svn-repos/siarp<br />
|
||||
$ chown -R svn.svn /home/svn-repos/siarp<br />
|
||||
$ chmod -R ug+w /home/svn-repos/siarp<br />
|
||||
$ chmod ug+s /home/svn-repos/siarp /home/svn-repos/siarp/*
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Damit die Repositories etwas schöner gelistet werden, bringt Subversion noch ein Stylesheet für Apache mit, das in die <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">htdocs</span> muss.
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ cd ~/siarp/subversion-1.3.1/tools/xslt/<br />
|
||||
$ md /usr/local/apache2/htdocs/subversion-xslt<br />
|
||||
$ cp * /usr/local/apache2/htdocs/subversion-xslt<br />
|
||||
$ chmod 644 /usr/local/apache2/htdocs/subversion-xslt/*
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Apache muss auf die Repositories zugreifen können. In der Subversion-Installationsanleitung heißt es dazu lapidar:
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
NOTE: Make sure that the user 'nobody' (or whatever UID the httpd process runs as) has permission to read and write the Berkeley DB files! This is a very common problem.
|
||||
</div>
|
||||
<p> Davon weiß ich allerdings nicht, wie man das am sinnvollsten regelt. Auch im <a href="http://svnbook.red-bean.com/en/1.2/svn.serverconfig.httpd.html#svn.serverconfig.httpd.basic">Subversion Handbuch</a> steht nur was von <cite>"There is no single correct way to set up your permissions"</cite>.<br />
|
||||
Die Repositories einfach allgemein freigben? In der schönen (und häufig zitierten) <a href="http://iedb.org/blog/howtos/svn_install_de/">Deadbeef-Anleitung für Apache+Subversion</a> wird einfach der gesamte Apache mit dem svn-User gestartet. Allerdings geht das nur, wenn man den Server <a href="http://svn.haxx.se/users/archive-2004-10/1024.shtml">nicht auf den Standard-Ports betreibt</a>. Meine Lösung wird im Subversion Handbuch zwar nur angedeutet, sollte aber korrekt sein: Dem Apache über die <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">httpd.conf</span> mitteilen, dass er als Nutzer <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">svn</span> agieren soll. Also die Zeilen 70 und 71 ändern auf. (Davor lief Apache als <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">daemon</span>.)</p>
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
User svn<br />
|
||||
Group svn
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Jetzt muss noch Apache das neue Repository in der <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">https.conf</span> bekannt gegeben werden:
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
# siarp Subversion-Anhang<br />
|
||||
<Location /svn/siarp><br />
|
||||
DAV svn<br />
|
||||
SVNPath /home/svn-repos/siarp<br />
|
||||
SVNIndexXSLT "/subversion-xslt/svnindex.xsl"<br />
|
||||
AuthType Basic<br />
|
||||
AuthName "siarp.de repository"<br />
|
||||
AuthUserFile /home/svn-repos/svn-auth-file<br />
|
||||
Require user martin tilman<br />
|
||||
</Location>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Für die Nutzerverwaltung braucht Subversion ein Userfile, das ich unter <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">/home/svn-repos/svn-auth-file</span> anlegen will. Dafür muss ich das htpasswd-Tool vom Apache benutzen:
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ /usr/local/apache2/bin/htpasswd -cm /home/svn-repos/svn-auth-file tilman<br /><span style="color:#707070; font-style: italic;"><br />
|
||||
New password:<br />
|
||||
Re-type new password:<br />
|
||||
Adding password for user tilman<br /></span>
|
||||
</div>
|
||||
<p> <span style="font-weight: bold;">Neue Benutzer</span> fügt man mit dem Befehl <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">/usr/local/apache2/bin/htpasswd -m /home/svn-repos/svn-auth-file <em>benutzername</em></span> hinzu.
|
||||
</p></li>
|
||||
<li>
|
||||
Das war's. Subversion ist unter <a href="http://www.siarp.de/svn/siarp/">http://www.siarp.de/svn/siarp/</a> erreichbar, sobald Apache gestartet ist.
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ /usr/local/apache2/bin/apachectl start
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Als krönenden Abschluss kopiere ich mein Protokoll in <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">htdocs</span>, so dass es unter <a href="http://www.siarp.de/installation-log.html">http://www.siarp.de/installation-log.html</a> erreichbar ist und mache mit Virtuzzo ein Backup ("May 27, 2006 05:41:32 PM, 707.27 Mb").
|
||||
</li>
|
||||
</ul><p><a id="zusammenfassung"></a></p>
|
||||
<h2>Zusammenfassung, To-Do und Fragen</h2>
|
||||
<p>
|
||||
So weit, so gut. Wir haben jetzt Apache mit MySQL und PHP und außerdem ein funktionierendes Subversion. Was muss jetzt noch kommen?
|
||||
</p>
|
||||
<ul><li>Subversion mit SSL nutzen. Dafür habe ich Apache mit --enable-ssl kompiliert, aber noch nix probiert.</li>
|
||||
<li>MySQL testen. Noch nicht gemacht.</li>
|
||||
<li>Eventuell noch etwas Sicherheits-Tuning. MySQL ist noch unkonfiguriert (Passwort) und der Subversion-User ist auch noch ohne Passwort.</li>
|
||||
<li>Noch mal eine schöne "Wie legt man ein Repository an"-Anleitung, die man dann nur noch abarbeiten muss</li>
|
||||
<li>Automatisiertes Backup für Repositories und htdocs. Was noch?</li>
|
||||
<li>Vielleicht sollte Apache nach einem Reboot automatisch starten. Wie das geht steht in der <a href="http://www.kofler.cc/forum/forumthread.php?rootID=3538">Kofler-Anleitung</a>.</li>
|
||||
<li>Noch mal die Frage: Brauchen wir System-Nutzer-Accounts? Oder müssen wir sowieso als root arbeiten, bei dem, was wir tun?</li>
|
||||
</ul><p>
|
||||
Allgemeine Bemerkungen zur Konfiguration
|
||||
</p>
|
||||
<ul><li>Apache wird gestartet mit <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">/usr/local/apache2/bin/apachectl start</span></li>
|
||||
<li>Die Webseite liegt unter <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">/usr/local/apache2/htdocs/</span>, die Repositories unter <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">/home/svn-repos/</span></li>
|
||||
<li>Wir sollten wohl doch für jedes Projekt ein extra Repository anlegen, da sonst das System der Gesamt-Versionsnummer von Subversion keinen Sinn macht</li>
|
||||
</ul><p><a id="backup"></a></p>
|
||||
<h2>Further reading: Backup und Vorsorge</h2>
|
||||
<ul><li>
|
||||
Noch ein paar Überlegungen zum Thema Backup: Virtuzzo geht relativ fix (ca. 20 Min), allerdings sind nur zwei Backups möglich. Also am besten später mal durch ein Backup des komplett eingerichteten Systems ersetzen. Dann hat man immer noch ein Backup für akutes übrig.
|
||||
</li>
|
||||
<li>
|
||||
Im Hosteurope-Hilfesystem wird außerdem <a href="http://reoback.sourceforge.net/">ReoBack</a> empfohlen. Vielleicht bei Gelegenheit mal anschauen.
|
||||
</li>
|
||||
<li>
|
||||
Noch was anderes: Anscheinend kann man (im Gegensatz zu den WebPacks) den Traffic nicht hart limitieren. Bis jetzt hatten wir beim Rumbasteln immer unter 400MB im Monat. Freivolumen ist laut KIS 250GB (die neuen Pakete haben 500GB bei gleichem Preis, das hätten sie ruhig mal rückwirkend upgraden können), das macht also ca. 8GB am Tag. Ich habe jedenfalls erst mal eine Warnbenachrichtigung bei mehr als 2GB am Tag eingerichtet.
|
||||
</li>
|
||||
<li>
|
||||
Hab mich bei der Suche nach einer harten Traffic-Begrenzung nochmal in Plesk eingeloggt. Das ist jetzt wohl wirklich blind und taub, man bekommt keine Server-Optionen mehr angezeigt.
|
||||
</li>
|
||||
</ul><h2>Dank an (Linksammlung)</h2>
|
||||
<ul><li><a href="../../">http://www.siarp.de/</a></li>
|
||||
<!--
|
||||
<li><p><a href="http://80.237.161.173/">http://80.237.161.173/</a></li>
|
||||
<li><a href="https://80.237.161.173:4643/vz/cp">https://80.237.161.173:4643/vz/cp</a></li>
|
||||
<li><a href="http://siarpde.standartimnetz.de/">http://siarpde.standartimnetz.de/</a></li>
|
||||
<p>-->
|
||||
<li><a href="http://www.kofler.cc/forum/forumthread.php?rootID=3538">http://www.kofler.cc/forum/forumthread.php?rootID=3538</a></li>
|
||||
<li><a href="http://www.bananas-playground.net/index.php?p=tutorials&m=svn.scratch#subversion">http://www.bananas-playground.net/index.php?p=tutorials&m=svn.scratch#subversion</a></li>
|
||||
<li><a href="http://svn.collab.net/repos/svn/trunk/INSTALL">http://svn.collab.net/repos/svn/trunk/INSTALL</a></li>
|
||||
<li><a href="http://forum.subversionbuch.de/viewtopic.php?t=62">http://forum.subversionbuch.de/viewtopic.php?t=62</a></li>
|
||||
<li><a href="http://www.apachefriends.org/f/viewtopic.php?t=17636">http://www.apachefriends.org/f/viewtopic.php?t=17636</a></li>
|
||||
<li><a href="http://iedb.org/blog/?page_id=12">http://iedb.org/blog/?page_id=12</a></li>
|
||||
<li><a href="http://dev.mysql.com/tech-resources/articles/4.1/unicode.html">http://dev.mysql.com/tech-resources/articles/4.1/unicode.html</a></li>
|
||||
</ul></div></div></div> </div>
|
||||
|
||||
<div class="clearfix">
|
||||
<div class="links"><ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
|
||||
<div id="comments" class="comment-wrapper">
|
||||
<h2 class="title">Comments</h2>
|
||||
|
||||
<a id="comment-2"></a>
|
||||
<div class="comment comment-by-node-author odd">
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
<span class="submitted">27. May 2006 - 9:47 — <span class="username">Tilman</span></span>
|
||||
|
||||
|
||||
|
||||
<h3><a href="../2/#comment-2" class="permalink" rel="bookmark">Mehrere Repositories mit einem httpd.conf-Eintrag</a></h3>
|
||||
|
||||
<div class="content">
|
||||
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even"><p>Wie gesagt, es muss noch ein Repositories-erstellen-HowTo folgen. Um es zu dokumentieren schon mal die Bemerkung:</p>
|
||||
<p>Man muss nicht unbedingt jedes Repository einzeln in die httpd.conf eintragen, sondern kann dort auch einen SVNParentPath angeben. Alle Repositories, die in diesem Verzeichnis liegen, werden dann automatisch gelistet. Nachteil: Keine getrennte Benutzerverwaltung für die verschiedenen Repositories (soweit mir bekannt --> nochmal prüfen)</p>
|
||||
</div></div></div> </div>
|
||||
</div>
|
||||
|
||||
<ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
<a id="comment-3"></a>
|
||||
<div class="comment comment-by-node-author even">
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
<span class="submitted">27. May 2006 - 10:00 — <span class="username">Tilman</span></span>
|
||||
|
||||
|
||||
|
||||
<h3><a href="index.html#comment-3" class="permalink" rel="bookmark">Weitere Apache-Module</a></h3>
|
||||
|
||||
<div class="content">
|
||||
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even"><p>Sammlung: Module, die vielleicht auch noch schön für'n Apache wären. (Lassen sich durch --enable-so ja nachträglich einbinden.)</p>
|
||||
<p>- mod_deflate<br />
|
||||
Dazu Zitat aus der Subversion-Installationsanleitung:<br />
|
||||
If you have configured mod_deflate to be in the server, you can enable compression support for your repository by adding the following line to your Location block: <span class="geshifilter"><code class="text geshifilter-text">SetOutputFilter DEFLATE</code></span></p>
|
||||
<p>- mod_mime<br />
|
||||
MIME-Zuordnung nach Dateinamenerweiterung</p>
|
||||
<p>- mod_dav_fs<br />
|
||||
Dieses Modul bietet Zugriff auf das _lokale_ Dateisystem, falls gebraucht. So oder so ist WebDAV an sich noch mal einen Blick wert.</p>
|
||||
<p>- mod_vhost_alias<br />
|
||||
Wird's gebraucht? Ich hab noch nicht so die Ahnung von vHost-Konzept.</p>
|
||||
<p>- mod_dir<br />
|
||||
Das habe ich vergessen. Directory-Listings sind mitunter schon ganz praktisch.</p>
|
||||
</div></div></div> </div>
|
||||
</div>
|
||||
|
||||
<ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
<a id="comment-4"></a>
|
||||
<div class="comment comment-by-node-author odd">
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
<span class="submitted">27. May 2006 - 12:51 — <span class="username">Tilman</span></span>
|
||||
|
||||
|
||||
|
||||
<h3><a href="../4/#comment-4" class="permalink" rel="bookmark">PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !</a></h3>
|
||||
|
||||
<div class="content">
|
||||
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even"><p>To do so, start the server, then issue the following commands:<br />
|
||||
/usr/bin/mysqladmin -u root password 'new-password'<br />
|
||||
/usr/bin/mysqladmin -u root -h lvps80-237-161-173.dedicated.hosteurope.de password 'new-password'<br />
|
||||
See the manual for more instructions.</p>
|
||||
</div></div></div> </div>
|
||||
</div>
|
||||
|
||||
<ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
|
||||
</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/comment/3 by HTTrack Website Copier/3.x [XR&CO'2014], Sun, 08 Dec 2019 12:05:00 GMT -->
|
||||
</html>
|
||||
@@ -0,0 +1,441 @@
|
||||
<!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/comment/4 by HTTrack Website Copier/3.x [XR&CO'2014], Sun, 08 Dec 2019 12:05:00 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="../../node/23/" />
|
||||
<link rel="shortlink" href="../../node/23/" />
|
||||
<title>Apache 2.2.2, MySQL 5.0.21, PHP 5.1.4 und Subversion 1.3.1 | 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":"v1uIcBwTycVTMFNTPPuYvd5tjr82ncBrrAW1dyIanNE","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-23 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">Apache 2.2.2, MySQL 5.0.21, PHP 5.1.4 und Subversion 1.3.1</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-23" class="node node-story node-promoted">
|
||||
|
||||
|
||||
|
||||
<span class="submitted">27. May 2006 - 1:47 — <span class="username">Tilman</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>Anmerkung: Dieses Protokoll ist mit besserer Formatierung unter <a href="http://www.siarp.de/installation-log.html">http://www.siarp.de/installation-log.html</a> abgelegt.</p>
|
||||
<div style="font-size: small; text-align: center;">- Ziel: Apache, MySQL, PHP und Subversion auf den Hosteurope vServer unter SuSE 9.1 separat installieren -</div>
|
||||
<h1>siarp Neuinstallation (Kofler/Subversion-Mischung plus ein paar Extras)</h1>
|
||||
<!--break--><h2>MySQL, Apache, PHP 5</h2>
|
||||
<ul><li>
|
||||
Nach Empfehlung von <a href="http://www.kofler.cc/forum/forumthread.php?rootID=3538">http://www.kofler.cc/forum/forumthread.php?rootID=3538</a> deinstalliere ich Apache, PHP und MySQL über yast.<br />
|
||||
Dabei ignoriere ich sämtliche Abhängigkeiten mit irgendwelchen installierten 'frontpage extensions', 'mambo' und vor allem dem Paket 'psa' → Plesk wird kastriert.
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ rcapache2 stop<br />
|
||||
$ yast<br /><em>→ nach 'mysql', 'php' und 'apache' suchen, alles raushauen und neu starten</em>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Ich lege im Home-Verzeichnis von root ein Verzeichnis <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">siarp</span> an, in dem ich herunterladen und entpacken kann. Dahin lade ich die Apache-Quellen, MySQL, PHP und Subversion.
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ cd ~<br /><br />
|
||||
$ md siarp<br />
|
||||
$ cd siarp<br />
|
||||
$ wget http://ftp.wayne.edu/apache/httpd/httpd-2.2.2.tar.gz<br />
|
||||
$ wget http://dev.mysql.com/get/Downloads/MySQL-5.0/MySQL-server-5.0.21-0.glibc23.i386.rpm/from/ftp://ftp.fu-berlin.de/unix/databases/mysql/<br />
|
||||
$ wget http://dev.mysql.com/get/Downloads/MySQL-5.0/MySQL-client-5.0.21-0.glibc23.i386.rpm/from/ftp://ftp.fu-berlin.de/unix/databases/mysql/<br />
|
||||
$ wget http://dev.mysql.com/get/Downloads/MySQL-5.0/MySQL-devel-5.0.21-0.glibc23.i386.rpm/from/ftp://ftp.fu-berlin.de/unix/databases/mysql/<br />
|
||||
$ wget http://dev.mysql.com/get/Downloads/MySQL-5.0/MySQL-shared-5.0.21-0.glibc23.i386.rpm/from/ftp://ftp.fu-berlin.de/unix/databases/mysql/<br />
|
||||
$ wget http://de2.php.net/get/php-5.1.4.tar.gz/from/de3.php.net/mirror
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Dann noch entpacken:
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ gunzip httpd-2.2.2.tar.gz<br />
|
||||
$ gunzip php-5.1.4.tar.gz<br />
|
||||
$ tar -xvf httpd-2.2.2.tar<br />
|
||||
$ tar -xvf php-5.1.4.tar
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
MySQL installieren
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ cd ~/siarp<br />
|
||||
$ rpm -i MySQL*.rpm
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Weiter nach der <a href="http://www.kofler.cc/forum/forumthread.php?rootID=3538">Kofler-Anleitung</a>:
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ wget http://kent.dl.sourceforge.net/sourceforge/libpng/zlib-1.2.3.tar.gz<br />
|
||||
$ wget ftp://xmlsoft.org/libxml2/libxml2-2.6.24.tar.gz<br />
|
||||
$ gunzip zlib-1.2.3.tar.gz<br />
|
||||
$ gunzip libxml2-2.6.24.tar.gz<br />
|
||||
$ tar -xvf zlib-1.2.3.tar<br />
|
||||
$ tar -xvf libxml2-2.6.24.tar
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Installation der Libraries
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ cd zlib-1.2.3/<br />
|
||||
$ ./configure<br />
|
||||
$ make<br />
|
||||
$ make install<br />
|
||||
$ cd ..<br />
|
||||
$ cd libxml2-2.6.24/<br />
|
||||
$ ./configure<br />
|
||||
$ make<br />
|
||||
$ make install<br />
|
||||
$ cd ..
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Apache2 in <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">/usr/local/apache2</span> installieren. Ich habe hier noch ein paar zusätzliche Module aktiviert, WebDAV wird von Subversion benötigt.
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ cd httpd-2.2.2/<br />
|
||||
$ ./configure --prefix=/usr/local/apache2 --enable-so --enable-dav --enable-ssl --enable-alias --enable-dir --enable-deflate<br />
|
||||
$ make<br />
|
||||
$ make install<br />
|
||||
$ cd ..
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
PHP installieren
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ cd php-5.1.4/<br />
|
||||
$ ./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache2/bin/apxs --with-libxml-dir=/usr/local/lib --with-zlib --with-zlib-dir=/usr/local/lib --with-mysql=/usr --with-mysqli=/usr/bin/mysql_config --with-gd --enable-soap --enable-sockets<br />
|
||||
$ make<br />
|
||||
$ make install
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
In die <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">/usr/local/apache2/conf/httpd.conf</span> füge ich in Zeile 55 ein:
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
#siarp (manuell eingefuegt nach php-Installation)<br />
|
||||
AddType application/x-httpd-php .php
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Testlauf
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ /usr/local/apache2/bin/apachectl start<br />
|
||||
$ touch /usr/local/apache2/htdocs/phptest.php
|
||||
</div>
|
||||
<p> Dann in die Datei <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">phptest.php</span> die Zeile <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;"><?php phpinfo(); ?></span> einfügen und speichern. Und siehe: Die PHP-Konfiguration ist <a href="http://www.siarp.de/phptest.php">einsehbar</a>.
|
||||
</p></li>
|
||||
<li>
|
||||
<span style="font-weight: bold;">Aber: Schon verhält er sich komisch!</span> HTML-Seiten, in denen auf ein Bild verwiesen wird, werden nicht ausgeliefert. (Wieder das Dateigrößen-Problem?)<br /><span style="font-weight: bold;">Nach etwas Suchen dann die Lösung:</span> In der <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">httpd.conf</span> muss die Zeile "<span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">EnableSendfile off</span>" aktiviert werden (Z. 360). → Die Sendfile-Unterstützung wurde beim Kompilieren wohl nicht richtig erkannt; ein Klassiker.<br /><span style="font-weight: bold;">Frage:</span> Sollte auch MMAP (Zeile darüber) deaktiviert werden? (Das war der Standard-Trick beim XAMPP.) Da MMAP und Sendfile aber wohl für Performanceverbesserungen stehen (größerer Adressraum, glaube ich), lasse ich zumindest MMAP bis auf Weiteres drin.
|
||||
</li>
|
||||
<li>
|
||||
Weil's bis hierher so schön lief, logge ich mich in Virtuzzo ein, und erstelle vor der Subversion-Installation noch ein Backup.:<br />
|
||||
"May 27, 2006 01:48:45 PM, 580.83 Mb" (SuSE-Apache, -PHP und -MySQL deinstalliert und separat installiert)
|
||||
</li>
|
||||
</ul><h2>Subversion: Installation</h2>
|
||||
<ul><li>
|
||||
Erst mal zurück nach Hause und Subversion herunterladen und entpacken
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ cd ~/siarp<br />
|
||||
$ wget http://subversion.tigris.org/downloads/subversion-1.3.1.tar.gz<br />
|
||||
$ gunzip subversion-1.3.1.tar.gz<br />
|
||||
$ tar -xvf subversion-1.3.1.tar
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Jetzt mit den magischen Parametern installieren. (Im Wesentlichen nach <a href="http://svn.collab.net/repos/svn/trunk/INSTALL">http://svn.collab.net/repos/svn/trunk/INSTALL</a> mit Hilfe von <a href="http://iedb.org/blog/howtos/svn_install_de/">http://iedb.org/blog/howtos/svn_install_de/</a>.)
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ cd subversion-1.3.1/<br />
|
||||
$ ./configure --with-apxs=/usr/local/apache2/bin/apxs --with-apr=/usr/local/apache2 --with-apr-util=/usr/local/apache2 --with-ssl --with-zlib
|
||||
</div>
|
||||
<p> Am Schluss heult <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">configure</span> noch rum, dass keine BerkeleyDB installiert ist. Wunderbar, FSFS ist sowieso moderner. (→ <a href="http://svnbook.red-bean.com/en/1.1/ch05.html#svn-ch-5-sect-1.3.2">http://svnbook.red-bean.com/en/1.1/ch05.html#svn-ch-5-sect-1.3.2</a> und Vergleich unter <a href="http://svnbook.red-bean.com/en/1.2/svn.reposadmin.html#svn.reposadmin.basics.backends">http://svnbook.red-bean.com/en/1.2/svn.reposadmin.html#svn.reposadmin.basics.backends</a>)<br />
|
||||
Und weiter:</p>
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ make<br />
|
||||
$ make install
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Leider will Apache jetzt nicht mehr starten und meldet<br /><span style="color:#707070; font-style: italic;"><br />
|
||||
httpd: Syntax error on line 54 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/mod_dav_svn.so into server: libsvn_repos-1.so.0: cannot open shared object file: No such file or directory<br /></span><br />
|
||||
Aber das kenne ich schon vom XAMPP - Google hilft. Unter <a href="http://svn.haxx.se/users/archive-2004-11/0390.shtml">http://svn.haxx.se/users/archive-2004-11/0390.shtml</a> wird mir empfohlen, in der Datei <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">/etc/ld.so.conf</span> die Zeile <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">/usr/local/lib</span> einzufügen. Da die bereits vorhanden ist und ich ja auf die Libraries vom separat installierten Apache verweisen möchte, versuche ich es mit <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">/usr/local/apache2/lib</span> (weil <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">make install</span> am Schluss ausgiebt, dass die Libraries dorthin installiert wurden). Danach muss die Konfiguration erneuert werden:
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ /sbin/ldconfig
|
||||
</div>
|
||||
<p> Und schon will er wieder.
|
||||
</p></li>
|
||||
</ul><h2>Subversion: Konfiguration</h2>
|
||||
<ul><li>
|
||||
Erste Frage: Wohin mit dem Repository? (Ich habe diese UNIX-Verzeichnisstruktur nie so wirklich verinnerlicht.) Nach einem Blick in <a href="http://de.wikibooks.org/wiki/Linux-Kompendium:_Verzeichnisse_unter_Linux">http://de.wikibooks.org/wiki/Linux-Kompendium:_Verzeichnisse_unter_Linux</a> bin ich nur unwesentlich schlauer und entscheide ich mich für <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">/home/svn-repos</span>.
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ cd /home<br />
|
||||
$ md svn-repos
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Die zweite Frage ist, wofür und wieviele Repositories angelegt werden sollten. Ich beginne mal mit <a href="http://www.siarp.de/svn/siarp">siarp</a>. Subversion arbeitet dabei als Benutzer <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">svn</span>.
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ cd /home/svn-repos<br />
|
||||
$ md siarp<br />
|
||||
$ svnadmin create /home/svn-repos/siarp<br />
|
||||
$ chown -R svn.svn /home/svn-repos/siarp<br />
|
||||
$ chmod -R ug+w /home/svn-repos/siarp<br />
|
||||
$ chmod ug+s /home/svn-repos/siarp /home/svn-repos/siarp/*
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Damit die Repositories etwas schöner gelistet werden, bringt Subversion noch ein Stylesheet für Apache mit, das in die <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">htdocs</span> muss.
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ cd ~/siarp/subversion-1.3.1/tools/xslt/<br />
|
||||
$ md /usr/local/apache2/htdocs/subversion-xslt<br />
|
||||
$ cp * /usr/local/apache2/htdocs/subversion-xslt<br />
|
||||
$ chmod 644 /usr/local/apache2/htdocs/subversion-xslt/*
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Apache muss auf die Repositories zugreifen können. In der Subversion-Installationsanleitung heißt es dazu lapidar:
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
NOTE: Make sure that the user 'nobody' (or whatever UID the httpd process runs as) has permission to read and write the Berkeley DB files! This is a very common problem.
|
||||
</div>
|
||||
<p> Davon weiß ich allerdings nicht, wie man das am sinnvollsten regelt. Auch im <a href="http://svnbook.red-bean.com/en/1.2/svn.serverconfig.httpd.html#svn.serverconfig.httpd.basic">Subversion Handbuch</a> steht nur was von <cite>"There is no single correct way to set up your permissions"</cite>.<br />
|
||||
Die Repositories einfach allgemein freigben? In der schönen (und häufig zitierten) <a href="http://iedb.org/blog/howtos/svn_install_de/">Deadbeef-Anleitung für Apache+Subversion</a> wird einfach der gesamte Apache mit dem svn-User gestartet. Allerdings geht das nur, wenn man den Server <a href="http://svn.haxx.se/users/archive-2004-10/1024.shtml">nicht auf den Standard-Ports betreibt</a>. Meine Lösung wird im Subversion Handbuch zwar nur angedeutet, sollte aber korrekt sein: Dem Apache über die <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">httpd.conf</span> mitteilen, dass er als Nutzer <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">svn</span> agieren soll. Also die Zeilen 70 und 71 ändern auf. (Davor lief Apache als <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">daemon</span>.)</p>
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
User svn<br />
|
||||
Group svn
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Jetzt muss noch Apache das neue Repository in der <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">https.conf</span> bekannt gegeben werden:
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
# siarp Subversion-Anhang<br />
|
||||
<Location /svn/siarp><br />
|
||||
DAV svn<br />
|
||||
SVNPath /home/svn-repos/siarp<br />
|
||||
SVNIndexXSLT "/subversion-xslt/svnindex.xsl"<br />
|
||||
AuthType Basic<br />
|
||||
AuthName "siarp.de repository"<br />
|
||||
AuthUserFile /home/svn-repos/svn-auth-file<br />
|
||||
Require user martin tilman<br />
|
||||
</Location>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Für die Nutzerverwaltung braucht Subversion ein Userfile, das ich unter <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">/home/svn-repos/svn-auth-file</span> anlegen will. Dafür muss ich das htpasswd-Tool vom Apache benutzen:
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ /usr/local/apache2/bin/htpasswd -cm /home/svn-repos/svn-auth-file tilman<br /><span style="color:#707070; font-style: italic;"><br />
|
||||
New password:<br />
|
||||
Re-type new password:<br />
|
||||
Adding password for user tilman<br /></span>
|
||||
</div>
|
||||
<p> <span style="font-weight: bold;">Neue Benutzer</span> fügt man mit dem Befehl <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">/usr/local/apache2/bin/htpasswd -m /home/svn-repos/svn-auth-file <em>benutzername</em></span> hinzu.
|
||||
</p></li>
|
||||
<li>
|
||||
Das war's. Subversion ist unter <a href="http://www.siarp.de/svn/siarp/">http://www.siarp.de/svn/siarp/</a> erreichbar, sobald Apache gestartet ist.
|
||||
<div style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">
|
||||
$ /usr/local/apache2/bin/apachectl start
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
Als krönenden Abschluss kopiere ich mein Protokoll in <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">htdocs</span>, so dass es unter <a href="http://www.siarp.de/installation-log.html">http://www.siarp.de/installation-log.html</a> erreichbar ist und mache mit Virtuzzo ein Backup ("May 27, 2006 05:41:32 PM, 707.27 Mb").
|
||||
</li>
|
||||
</ul><p><a id="zusammenfassung"></a></p>
|
||||
<h2>Zusammenfassung, To-Do und Fragen</h2>
|
||||
<p>
|
||||
So weit, so gut. Wir haben jetzt Apache mit MySQL und PHP und außerdem ein funktionierendes Subversion. Was muss jetzt noch kommen?
|
||||
</p>
|
||||
<ul><li>Subversion mit SSL nutzen. Dafür habe ich Apache mit --enable-ssl kompiliert, aber noch nix probiert.</li>
|
||||
<li>MySQL testen. Noch nicht gemacht.</li>
|
||||
<li>Eventuell noch etwas Sicherheits-Tuning. MySQL ist noch unkonfiguriert (Passwort) und der Subversion-User ist auch noch ohne Passwort.</li>
|
||||
<li>Noch mal eine schöne "Wie legt man ein Repository an"-Anleitung, die man dann nur noch abarbeiten muss</li>
|
||||
<li>Automatisiertes Backup für Repositories und htdocs. Was noch?</li>
|
||||
<li>Vielleicht sollte Apache nach einem Reboot automatisch starten. Wie das geht steht in der <a href="http://www.kofler.cc/forum/forumthread.php?rootID=3538">Kofler-Anleitung</a>.</li>
|
||||
<li>Noch mal die Frage: Brauchen wir System-Nutzer-Accounts? Oder müssen wir sowieso als root arbeiten, bei dem, was wir tun?</li>
|
||||
</ul><p>
|
||||
Allgemeine Bemerkungen zur Konfiguration
|
||||
</p>
|
||||
<ul><li>Apache wird gestartet mit <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">/usr/local/apache2/bin/apachectl start</span></li>
|
||||
<li>Die Webseite liegt unter <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">/usr/local/apache2/htdocs/</span>, die Repositories unter <span style="font-family: 'Courier New', monospace; margin-top: 0.5ex; margin-bottom: 0.5ex;">/home/svn-repos/</span></li>
|
||||
<li>Wir sollten wohl doch für jedes Projekt ein extra Repository anlegen, da sonst das System der Gesamt-Versionsnummer von Subversion keinen Sinn macht</li>
|
||||
</ul><p><a id="backup"></a></p>
|
||||
<h2>Further reading: Backup und Vorsorge</h2>
|
||||
<ul><li>
|
||||
Noch ein paar Überlegungen zum Thema Backup: Virtuzzo geht relativ fix (ca. 20 Min), allerdings sind nur zwei Backups möglich. Also am besten später mal durch ein Backup des komplett eingerichteten Systems ersetzen. Dann hat man immer noch ein Backup für akutes übrig.
|
||||
</li>
|
||||
<li>
|
||||
Im Hosteurope-Hilfesystem wird außerdem <a href="http://reoback.sourceforge.net/">ReoBack</a> empfohlen. Vielleicht bei Gelegenheit mal anschauen.
|
||||
</li>
|
||||
<li>
|
||||
Noch was anderes: Anscheinend kann man (im Gegensatz zu den WebPacks) den Traffic nicht hart limitieren. Bis jetzt hatten wir beim Rumbasteln immer unter 400MB im Monat. Freivolumen ist laut KIS 250GB (die neuen Pakete haben 500GB bei gleichem Preis, das hätten sie ruhig mal rückwirkend upgraden können), das macht also ca. 8GB am Tag. Ich habe jedenfalls erst mal eine Warnbenachrichtigung bei mehr als 2GB am Tag eingerichtet.
|
||||
</li>
|
||||
<li>
|
||||
Hab mich bei der Suche nach einer harten Traffic-Begrenzung nochmal in Plesk eingeloggt. Das ist jetzt wohl wirklich blind und taub, man bekommt keine Server-Optionen mehr angezeigt.
|
||||
</li>
|
||||
</ul><h2>Dank an (Linksammlung)</h2>
|
||||
<ul><li><a href="../../">http://www.siarp.de/</a></li>
|
||||
<!--
|
||||
<li><p><a href="http://80.237.161.173/">http://80.237.161.173/</a></li>
|
||||
<li><a href="https://80.237.161.173:4643/vz/cp">https://80.237.161.173:4643/vz/cp</a></li>
|
||||
<li><a href="http://siarpde.standartimnetz.de/">http://siarpde.standartimnetz.de/</a></li>
|
||||
<p>-->
|
||||
<li><a href="http://www.kofler.cc/forum/forumthread.php?rootID=3538">http://www.kofler.cc/forum/forumthread.php?rootID=3538</a></li>
|
||||
<li><a href="http://www.bananas-playground.net/index.php?p=tutorials&m=svn.scratch#subversion">http://www.bananas-playground.net/index.php?p=tutorials&m=svn.scratch#subversion</a></li>
|
||||
<li><a href="http://svn.collab.net/repos/svn/trunk/INSTALL">http://svn.collab.net/repos/svn/trunk/INSTALL</a></li>
|
||||
<li><a href="http://forum.subversionbuch.de/viewtopic.php?t=62">http://forum.subversionbuch.de/viewtopic.php?t=62</a></li>
|
||||
<li><a href="http://www.apachefriends.org/f/viewtopic.php?t=17636">http://www.apachefriends.org/f/viewtopic.php?t=17636</a></li>
|
||||
<li><a href="http://iedb.org/blog/?page_id=12">http://iedb.org/blog/?page_id=12</a></li>
|
||||
<li><a href="http://dev.mysql.com/tech-resources/articles/4.1/unicode.html">http://dev.mysql.com/tech-resources/articles/4.1/unicode.html</a></li>
|
||||
</ul></div></div></div> </div>
|
||||
|
||||
<div class="clearfix">
|
||||
<div class="links"><ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
|
||||
<div id="comments" class="comment-wrapper">
|
||||
<h2 class="title">Comments</h2>
|
||||
|
||||
<a id="comment-2"></a>
|
||||
<div class="comment comment-by-node-author odd">
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
<span class="submitted">27. May 2006 - 9:47 — <span class="username">Tilman</span></span>
|
||||
|
||||
|
||||
|
||||
<h3><a href="../2/#comment-2" class="permalink" rel="bookmark">Mehrere Repositories mit einem httpd.conf-Eintrag</a></h3>
|
||||
|
||||
<div class="content">
|
||||
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even"><p>Wie gesagt, es muss noch ein Repositories-erstellen-HowTo folgen. Um es zu dokumentieren schon mal die Bemerkung:</p>
|
||||
<p>Man muss nicht unbedingt jedes Repository einzeln in die httpd.conf eintragen, sondern kann dort auch einen SVNParentPath angeben. Alle Repositories, die in diesem Verzeichnis liegen, werden dann automatisch gelistet. Nachteil: Keine getrennte Benutzerverwaltung für die verschiedenen Repositories (soweit mir bekannt --> nochmal prüfen)</p>
|
||||
</div></div></div> </div>
|
||||
</div>
|
||||
|
||||
<ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
<a id="comment-3"></a>
|
||||
<div class="comment comment-by-node-author even">
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
<span class="submitted">27. May 2006 - 10:00 — <span class="username">Tilman</span></span>
|
||||
|
||||
|
||||
|
||||
<h3><a href="../3/#comment-3" class="permalink" rel="bookmark">Weitere Apache-Module</a></h3>
|
||||
|
||||
<div class="content">
|
||||
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even"><p>Sammlung: Module, die vielleicht auch noch schön für'n Apache wären. (Lassen sich durch --enable-so ja nachträglich einbinden.)</p>
|
||||
<p>- mod_deflate<br />
|
||||
Dazu Zitat aus der Subversion-Installationsanleitung:<br />
|
||||
If you have configured mod_deflate to be in the server, you can enable compression support for your repository by adding the following line to your Location block: <span class="geshifilter"><code class="text geshifilter-text">SetOutputFilter DEFLATE</code></span></p>
|
||||
<p>- mod_mime<br />
|
||||
MIME-Zuordnung nach Dateinamenerweiterung</p>
|
||||
<p>- mod_dav_fs<br />
|
||||
Dieses Modul bietet Zugriff auf das _lokale_ Dateisystem, falls gebraucht. So oder so ist WebDAV an sich noch mal einen Blick wert.</p>
|
||||
<p>- mod_vhost_alias<br />
|
||||
Wird's gebraucht? Ich hab noch nicht so die Ahnung von vHost-Konzept.</p>
|
||||
<p>- mod_dir<br />
|
||||
Das habe ich vergessen. Directory-Listings sind mitunter schon ganz praktisch.</p>
|
||||
</div></div></div> </div>
|
||||
</div>
|
||||
|
||||
<ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
<a id="comment-4"></a>
|
||||
<div class="comment comment-by-node-author odd">
|
||||
|
||||
<div class="clearfix">
|
||||
|
||||
<span class="submitted">27. May 2006 - 12:51 — <span class="username">Tilman</span></span>
|
||||
|
||||
|
||||
|
||||
<h3><a href="index.html#comment-4" class="permalink" rel="bookmark">PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !</a></h3>
|
||||
|
||||
<div class="content">
|
||||
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even"><p>To do so, start the server, then issue the following commands:<br />
|
||||
/usr/bin/mysqladmin -u root password 'new-password'<br />
|
||||
/usr/bin/mysqladmin -u root -h lvps80-237-161-173.dedicated.hosteurope.de password 'new-password'<br />
|
||||
See the manual for more instructions.</p>
|
||||
</div></div></div> </div>
|
||||
</div>
|
||||
|
||||
<ul class="links inline"><li class="comment_forbidden first last"></li>
|
||||
</ul></div>
|
||||
|
||||
</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/comment/4 by HTTrack Website Copier/3.x [XR&CO'2014], Sun, 08 Dec 2019 12:05:00 GMT -->
|
||||
</html>
|
||||
Reference in New Issue
Block a user