<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://dev1galaxy.org/extern.php?action=feed&amp;tid=2265&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / Local Mirror Package Caching using approx and xinetd]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=2265</link>
		<description><![CDATA[The most recent posts in Local Mirror Package Caching using approx and xinetd.]]></description>
		<lastBuildDate>Thu, 02 Aug 2018 02:48:45 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: Local Mirror Package Caching using approx and xinetd]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=11086#p11086</link>
			<description><![CDATA[<p>Update:<br /> The weekly cron script is simple and tweakable .<br /> A 1000 days _may_ be too long or maybe not.</p><p> It is simply <strong>a couple of transparent&#160; find commands</strong>.</p><p>It would also make a great template for other runs or even uses by other services.</p><p>The version below has&#160; modified&#160; comments</p><p>see:&#160; <span class="bbc">/etc/cron.weekly/approx </span></p><div class="codebox"><pre><code>#!/bin/sh
# /etc/cron.weekly/approx
# Remove old files from the approx(8) cache

# Location of the cache
cache=/var/cache/approx

# Maximum age of files to keep, in days
max_age=1000

# Delete  _files_  modified   +more than &quot;max_age&quot; days ago 
# and _print_ the activity noise to cron so it can tell somebody if needs be.

find $cache -type f -mtime +$max_age -delete -print

# Remove empty files and directories

find $cache -empty -delete</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (PeteGozz)]]></author>
			<pubDate>Thu, 02 Aug 2018 02:48:45 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=11086#p11086</guid>
		</item>
		<item>
			<title><![CDATA[Re: Local Mirror Package Caching using approx and xinetd]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=10981#p10981</link>
			<description><![CDATA[<div class="quotebox"><cite>golinux wrote:</cite><blockquote><div><div class="quotebox"><cite>PeteGozz wrote:</cite><blockquote><div><p>Hi<br />Um yeah lost my password <img src="https://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p></div></blockquote></div><p>For future reference . . . all you have to do is ping one of the admins to get a new one.</p><div class="quotebox"><cite>PeteGozz wrote:</cite><blockquote><div><p>Thought I would/should contribute some tested configs I have here.<br />The spin offs just from this one could probably fill a small book.</p></div></blockquote></div><p>Your contributions are always welcome.&#160; Don&#039;t be a stranger . . .</p></div></blockquote></div><p>I will try not to be.</p>]]></description>
			<author><![CDATA[dummy@example.com (PeteGozz)]]></author>
			<pubDate>Mon, 30 Jul 2018 03:25:43 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=10981#p10981</guid>
		</item>
		<item>
			<title><![CDATA[Re: Local Mirror Package Caching using approx and xinetd]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=10980#p10980</link>
			<description><![CDATA[<div class="quotebox"><cite>PeteGozz wrote:</cite><blockquote><div><p>Hi<br />Um yeah lost my password <img src="https://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p></div></blockquote></div><p>For future reference . . . all you have to do is ping one of the admins to get a new one.</p><div class="quotebox"><cite>PeteGozz wrote:</cite><blockquote><div><p>Thought I would/should contribute some tested configs I have here.<br />The spin offs just from this one could probably fill a small book.</p></div></blockquote></div><p>Your contributions are always welcome.&#160; Don&#039;t be a stranger . . .</p>]]></description>
			<author><![CDATA[dummy@example.com (golinux)]]></author>
			<pubDate>Mon, 30 Jul 2018 01:14:53 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=10980#p10980</guid>
		</item>
		<item>
			<title><![CDATA[Re: Local Mirror Package Caching using approx and xinetd]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=10979#p10979</link>
			<description><![CDATA[<p>Hi<br />Um yeah lost my password <img src="https://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>Thought I would/should contribute some tested configs I have here.<br />The spin offs just from this one could probably fill a small book.</p>]]></description>
			<author><![CDATA[dummy@example.com (PeteGozz)]]></author>
			<pubDate>Mon, 30 Jul 2018 01:10:39 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=10979#p10979</guid>
		</item>
		<item>
			<title><![CDATA[Re: Local Mirror Package Caching using approx and xinetd]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=10978#p10978</link>
			<description><![CDATA[<p>WOW!&#160; Nice to see you PeteGozz.&#160; It&#039;s been way too long . . .</p>]]></description>
			<author><![CDATA[dummy@example.com (golinux)]]></author>
			<pubDate>Mon, 30 Jul 2018 01:03:29 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=10978#p10978</guid>
		</item>
		<item>
			<title><![CDATA[Re: Local Mirror Package Caching using approx and xinetd]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=10977#p10977</link>
			<description><![CDATA[<p>There are other good options as well.<br /> squid&#160; and&#160; apt-cacher-ng</p><p> This approach works reasonably well for my home LAN <br /> AND builds sane mirrors that are amenable to dpkg / apt / file:://&#160; </p><p>(system tools)</p>]]></description>
			<author><![CDATA[dummy@example.com (PeteGozz)]]></author>
			<pubDate>Mon, 30 Jul 2018 01:01:19 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=10977#p10977</guid>
		</item>
		<item>
			<title><![CDATA[Local Mirror Package Caching using approx and xinetd]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=10976#p10976</link>
			<description><![CDATA[<p>This Walk through documents setting up a HTTP based proxy using<br /><strong>*approx_ and xinetd_*.</strong></p><p>Features of this approach include::</p><p>&#160; - Reliable and _low_ maintenance <br />&#160; - Small and light <br />&#160; - efficient enough for enterprise level deployment.<br />&#160; &#160; Should scale up to 100&#039;s of LAN clients including virtuals<br />&#160; &#160; (depends on hardware and bandwidth)</p><p>&#160; - Tunable access by network space and optionally time of day. (xinetd)<br />&#160; &#160; No need to worry your iptables or other filtering.<br />&#160; - Tunable system loads. (xinetd)<br />&#160; &#160; <br />&#160; - A simply structured *pool based mirror*&#160; under /var/cache/approx&#160; (default).<br />&#160; - Readily and cleanly supports other Debian type systems<br />&#160; &#160; and 3rd party repositories<br />&#160; <br />&#160; - Low standby resource demand (xinetd)<br />&#160; - Fast start up and shutdown. (xinetd)</p><p>&#160; - Logs flexibly. To file or syslog. ( approx and / or xinetd )</p><p>&#160; - flexible client side configurations</p><p>Downsides::</p><p>&#160; - For simple use its easier to modify the clients apt sources.list (s)<br />&#160; - NOT a single apt install (and walk away)<br />&#160; - _You_ have to create a new config file for xinetd</p><h5>The Process ::</h5><p>With *minimal examples*&#160; (for some version of clarity.)</p><p>_All network addressing / names etc will need to be adapted to your LAN_.<br /> (so don&#039;t just cut and paste)</p><div class="codebox"><pre><code># apt-get install xinetd approx</code></pre></div><p> 1. edit the servers /etc/approx/approx.conf<br />&#160; &#160; &#160;(this is a minimal example)<br /> ::<br />&#160; &#160; </p><div class="codebox"><pre><code>devuan http://deb.devuan.org/merged </code></pre></div><p> 2. edit a clients /etc/apt/sources.list.d/01-stable.list<br />&#160; &#160; (? disable the rest while you test ?)<br />&#160; &#160; *The client can be the same machine as the server.*<br />&#160; &#160; <br /> ::<br />&#160; &#160; </p><div class="codebox"><pre><code>deb http://10.1.1.10:9999/devuan stable  main contrib non-free</code></pre></div><p> 3. create xinetd approx service description&#160; file at ::<br />&#160; <br />&#160; /etc/xinetd.d/approx</p><p>A somewhat more than minimal example.<br />&#160; &#160; <br /> ::</p><div class="codebox"><pre><code>   # /etc/xinetd.d/approx
    service approx
    {
    id           = approx
    disable      = no
    bind         = 10.1.1.10    
    port         = 9999
    only_from    = 127.0.0.1/8 10.1.1.1/8 
    protocol     = tcp
    socket_type  = stream
    wait         = no
    user         = approx
    server       = /usr/sbin/approx
    }</code></pre></div><p>4. Restart xinetd</p><p>::<br />&#160; &#160;</p><div class="codebox"><pre><code>root@yours~#  /etc/init.d/xinetd  restart</code></pre></div><p>&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; (or)</p><p>&#160; &#160;root@yours~#&#160; service xinetd restart </p><p>check xinetd has enabled your new service ::</p><p>&#160; &#160; </p><div class="codebox"><pre><code>you@yours~$  netstat -tan | grep 9999</code></pre></div><p>&#160; &#160; <br />A simple test if you have netcat onboard.</p><p>&#160; &#160; </p><div class="codebox"><pre><code>you@yours~$  nc 10.1.1.10 9999</code></pre></div><p>&#160; &#160; &#160; &#160;<span class="bbu"> &quot;get foo&quot;</span></p><p>&#160; &#160; &#160; &#160; <strong>HTTP/1.1 400 Bad Request<br />&#160; &#160; &#160; &#160; Server: approx/5.10 Ocamlnet/4.1.2</strong></p><p>(yes that *nc get*&#160; is deliberately broken)</p><p>&#160; &#160;</p><div class="codebox"><pre><code> you@yours~$  CTL c </code></pre></div><p>&#160; &#160; to close the &quot;conversation&quot;.</p><p>5. check default logging (and any errors like the one above)</p><p>::</p><div class="codebox"><pre><code>  $ tail -f /var/log/daemonlog</code></pre></div><p>something like: *Nethttpd: Bad request line*</p><p>6. simple test from the configured client</p><p>::<br />&#160; &#160;</p><div class="codebox"><pre><code># apt-get update</code></pre></div><p>Operations::</p><p>&#160; &#160; see:&#160; &#160; /var/cache/approx/&#160; &#160; &#160;(your new pool(s) of packages)<br />&#160; &#160; see:&#160; &#160;/var/log/daemon.log&#160; &#160; (default logging)<br />&#160; &#160; see:&#160; &#160;service xinetd status</p><p>References::</p><p>&#160; &#160; see:&#160; /usr/share/doc/approx/examples<br />&#160; &#160; see:&#160; /usr/share/doc/xinetd/examples<br />&#160; &#160; $ apropos approx<br />&#160; &#160; $ apropos xinetd </p><p>Longer Verbose version at::</p><p><a href="https://wombatsandemus.blogspot.com/2018/07/a-local-devuan-package-mirror-with.html" rel="nofollow">https://wombatsandemus.blogspot.com/201 … -with.html</a><br />(yeah sorry)</p><p><em>ASIDE::</em></p><p><em>Basic testing and checking of the <strong>approx-import</strong> tool&#160; seems to be OK.<br />As do the devuan &quot;passthroughs to debian&quot;&#160; at the repository.</em><br />Though this requires another doc or two.</p>]]></description>
			<author><![CDATA[dummy@example.com (PeteGozz)]]></author>
			<pubDate>Mon, 30 Jul 2018 00:55:38 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=10976#p10976</guid>
		</item>
	</channel>
</rss>
