<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>sebyte dot org &#187; Debian HOWTOs</title>
	<atom:link href="http://sebyte.org/?feed=rss2&#038;cat=3" rel="self" type="application/rss+xml" />
	<link>http://sebyte.org</link>
	<description></description>
	<lastBuildDate>Wed, 26 Aug 2009 17:54:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>WordPress blog posting with local POP3 mail</title>
		<link>http://sebyte.org/?p=38</link>
		<comments>http://sebyte.org/?p=38#comments</comments>
		<pubDate>Sun, 15 Mar 2009 18:00:54 +0000</pubDate>
		<dc:creator>sebyte</dc:creator>
				<category><![CDATA[Debian HOWTOs]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://sebyte.org/?p=38</guid>
		<description><![CDATA[

This article describes how to set up popa3d (a POP3 mail  server daemon process) and create a user account (in Debian Lenny) solely for the purposes of blog posting.


0 &#8211; A preliminary note about popa3d

popa3d is a more or less zero-configuration *nix POP3 daemon process that will serve up any mail found in the [...]]]></description>
			<content:encoded><![CDATA[<!-- WordPress blog posting with local POP3 mail -->

<p>This article describes how to set up <code>popa3d</code> (a POP3 mail  server daemon process) and create a user account (in Debian Lenny) solely for the purposes of blog posting.</p>

<dl>
<dt>0 &#8211; A preliminary note about <code>popa3d</code></dt>
<dd>
<p><code>popa3d</code> is a more or less zero-configuration *nix POP3 daemon process that will serve up any mail found in the spool file belonging to any user account (apart from the <code>root</code> account) if the correct user account password is provided.</p>

<p>If you don&#8217;t want all your user accounts&#8217; mail spool files to be POP3 enabled, then <code>popa3d</code> is not for you.</p>
</dd>

<dt>1 &#8211; Install <code>popa3d</code></dt>
<dd>
<p><code># apt-get install popa3d</code></p>

<p>Answer &#8216;yes&#8217; when asked whether you would like to run <code>popa3d</code> in standalone mode.</p>

<p>You can now start, restart and stop <code>popa3d</code> using the init script provided:</p>

<p><code># /etc/init.d/popa3d {start|restart|stop}</code></p>

<p>If you want to disable <code>popa3d</code> permanently (so that it isn&#8217;t started at boot time) it is sufficient to simply edit <code>/etc/default/popa3d</code> to read:</p>

<p><code>RUN_STANDALONE=no</code></p>

<p><em>Important tip:</em>&nbsp; <code>popa3d</code>&#8217;s other mode of operation is as an internet &#8217;service&#8217;.&nbsp; For <code>popa3d</code> to work in this mode you must also edit <code>/etc/inetd.conf</code>.</p>
</dd>

<dt>2 &#8211; Create a user account for your WordPress blog posts</dt>
<dd>
<p>We now need to create a user account, with a name that should be very hard to guess because WordPress will retrieve (and treat as blog posts &#8216;pending&#8217;) any and all mail it finds in the specified mailbox (when instructed to do so ).&nbsp; Ideally you should create an account called something like <code>jhuwe7KJ23h</code> but for the purposes of this article we will call the account <code>obscure</code>.</p>

<p>We know that <code>popa3d</code> won&#8217;t serve mail that has been delivered to the <code>root</code> account, nor will it serve mail delivered to an ordinary user account unless the correct user account password is provided, but there also happens to be a third security measure which isn&#8217;t documented &#8211; it won&#8217;t serve mail delivered to a user account if the user doesn&#8217;t have write access to their home directory.</p>

<p>So, we have to create a user account (with an obscure name) that provides write access to its home directory, but we don&#8217;t want to allow logins, we don&#8217;t want it intermingling with ordinary user login accounts and we don&#8217;t want an unused sub-directory of <code>/home</code> lying around either, especially not if we&#8217;re going to provide a number of these accounts for a number of WordPress blogs we may be hosting.</p>

<p>Now, when popa3d is installed (on a Debian system) a number of things happen behind the scenes&#8230;</p>

<ul>
<li>a system user <code>popa3d</code> is created</li>
<li>a system group <code>popa3d</code> is created</li>
<li>user <code>popa3d</code>&#8217;s home directory <code>/var/lib/popa3d</code> is created (with owner <code>root</code> and group <code>root</code>)</li>
</ul>

<p>&#8230;so we&#8217;re going to give user <code>obscure</code> a UID which keeps her well out of the way of ordinary login accounts, make her a member of the <code>popa3d</code> group, make <code>/var/lib/popa3d</code> her home directory and deny her a shell (thus preventing logins), like so:</p>

<pre><code># useradd -c "POP3 mail account" -u 65501 -g popa3d \
          -d /var/lib/popa3d -s /bin/false obscure
</code></pre>

<p>And we now have to give her a password:</p>

<pre><code># passwd obscure
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully
</code></pre>

<p>One final thing remains for us to do &#8211; make user <code>popa3d</code> the owner and group owner of directory <code>/var/lib/popa3d</code> and give members of group <code>popa3d</code> write access to it:</p>

<pre><code># chown popa3d:popa3d /var/lib/popa3d
# chmod g+w /var/lib/popa3d
</code></pre>
</dd>

<dt>3 &#8211; Check everything is working with <code>telnet</code></dt>
<dd>
<p>Fire up your command line telnet client:</p>

<pre><code>telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
+OK
</code></pre>

<p>If you get the &#8216;OK&#8217; <code>popa3d</code> is up and running and waiting for client requests.</p>
</dd>
</dl>
]]></content:encoded>
			<wfw:commentRss>http://sebyte.org/?feed=rss2&amp;p=38</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Build the PostgreSQL manual in Info format</title>
		<link>http://sebyte.org/?p=36</link>
		<comments>http://sebyte.org/?p=36#comments</comments>
		<pubDate>Sun, 15 Mar 2009 17:41:29 +0000</pubDate>
		<dc:creator>sebyte</dc:creator>
				<category><![CDATA[Debian HOWTOs]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[postgresql]]></category>

		<guid isPermaLink="false">http://sebyte.org/?p=36</guid>
		<description><![CDATA[

Here&#8217;s a step-by-step guide to building the PostgreSQL manual in Info
format on a Debian Lenny box:


1 &#8211; Install a few extra packages

The PostgreSQL manual is in Docbook format, so&#8230;

$ sudo apt-get install bzip2 docbook-dsssl docbook2x opensp



2 &#8211; Grab the PostgreSQL source, unpack and configure it

Change ~/workspace/src to suit your needs.

$ cd ~/workspace/src
$ apt-get source postgresql
$ [...]]]></description>
			<content:encoded><![CDATA[<!-- Build the PostgreSQL manual in Info format -->

<p>Here&#8217;s a step-by-step guide to building the PostgreSQL manual in Info
format on a Debian Lenny box:</p>

<dl>
<dt>1 &#8211; Install a few extra packages</dt>
<dd>
<p>The PostgreSQL manual is in Docbook format, so&#8230;</p>

<pre><code>$ sudo apt-get install bzip2 docbook-dsssl docbook2x opensp
</code></pre>
</dd>

<dt>2 &#8211; Grab the PostgreSQL source, unpack and configure it</dt>
<dd>
<p>Change <code>~/workspace/src</code> to suit your needs.</p>

<pre><code>$ cd ~/workspace/src
$ apt-get source postgresql
$ cd postgresql-8.3-8.3.5
$ bunzip2 postgresql-8.3-8.3.5.tar.bz2
$ tar -xf postgresql-8.3-8.3.5.tar
## this next operation is not strictly necessary but...
$ sudo chown -R sebyte:sebyte postgresql-8.3.5  # change user/group name to suit
$ cd postgresql-8.3.5
$ ./configure
[...]
</code></pre>
</dd>

<dt>3 &#8211; Edit one of the Makefiles included in the source</dt>
<dd>
<p>We need to tell a program called <code>osx</code> to ignore any errors by editing the relevant Makefile using your favourite text editor.</p>

<pre><code>$ cd doc/src/sgml
$ emacs -Q Makefile

## change line 227 to read:
##
##  $(OSX) -E0 -x lower $&amp;lt; | \
##          ^
##          |___ add this switch
</code></pre>

<p>While you are about it, you may also decide to edit the Makefile so that the resulting Info manual utilises the full width of your screen.  (This greatly improves the look of tables within the manual, of which there are many).</p>

<pre><code>## change line 263 to read:
##
## $(MAEKINFO) --fill-column 184 --enable-encoding --no-split --no-validate $&amp;lt; -o $@
##                            ^
## specify number of columns _|
</code></pre>
</dd>

<dt>4 &#8211; That&#8217;s it.  You&#8217;re ready to roll.</dt>
<dd>
<p>Complete the process by running <code>make</code>:</p>

<pre><code># make postgres.info
[...]
# ls -l postgres.info
-rw-rw-r-- 1 sebyte sebyte 4939332 Jan 24 15:33 postgres.info
</code></pre>
</dd>
</dl>

<p>Job done <img src='http://sebyte.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

<p>When I did it, &#8216;osx&#8217; generated 108,484 errors, all of which were ignored, and there were 14 other warnings in the output, but the resulting Info manual is fine.</p>
]]></content:encoded>
			<wfw:commentRss>http://sebyte.org/?feed=rss2&amp;p=36</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing WordPress on a Debian box, with lighttpd serving up the goods</title>
		<link>http://sebyte.org/?p=27</link>
		<comments>http://sebyte.org/?p=27#comments</comments>
		<pubDate>Wed, 04 Feb 2009 11:40:59 +0000</pubDate>
		<dc:creator>sebyte</dc:creator>
				<category><![CDATA[Debian HOWTOs]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://sebyte.org/?p=27</guid>
		<description><![CDATA[

Apache users can simply install the Debian wordpress package.&#160; lighttpd users can&#8217;t do this because Apache is one of the wordpress package dependencies.


1 &#8211; Install MySQL

According to the WordPress developers, moves are being made to port WordPress to PostgreSQL (and the sooner the better) but for the time being we have to make do with [...]]]></description>
			<content:encoded><![CDATA[<!-- Installing WordPress on a Debian box, with lighttpd serving up the goods -->

<p>Apache users can simply install the Debian <code>wordpress</code> package.&nbsp; lighttpd users can&#8217;t do this because Apache is one of the <code>wordpress</code> package dependencies.</p>

<dl>
<dt>1 &#8211; Install MySQL</dt>
<dd>
<p><a href="http://codex.wordpress.org/Using_Alternative_Databases">According to the WordPress developers</a>, moves are being made to port WordPress to <a href="http://www.postgresql.org">PostgreSQL</a> (and the sooner the better) but for the time being we have to make do with MySQL, memory hog that it is:</p>

<pre><code># apt-get install mysql-server-5.0
</code></pre>

<p><em>Important tip:</em>&nbsp; Don&#8217;t install the meta-package <code>mysql-server</code> if you don&#8217;t want your MySQL installation automatically upgraded when you run <code>apt-get upgrade</code> at some point in the future.&nbsp; (You can of course delete <code>mysql-server</code> after it&#8217;s pulled in the latest version but then <code>apt-get autoremove</code> will include your MySQL installation in its list of packages which were automatically installed and are no longer required).</p>
</dd>

<dt>2 &#8211; Create a MySQL database for your WordPress blog</dt>
<dd>
<p>The easiest way to do this is with the MySQL client, called simply <code>mysql</code>.</p>

<pre><code># mysql -u adminusername -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 5340 to server version: 3.23.54
Type 'help;' or 'h' for help. Type 'c' to clear the buffer.
mysql&gt; CREATE DATABASE databasename;
Query OK, 1 row affected (0.00 sec)
mysql&gt; GRANT ALL PRIVILEGES ON databasename.*
-&gt; TO "wordpressusername"@"hostname"
-&gt; IDENTIFIED BY "password";
Query OK, 0 rows affected (0.00 sec)
mysql&gt; FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.01 sec)
mysql&gt; EXIT Bye
#
</code></pre>
</dd>

<dt>3 &#8211; Install PHP</dt>
<dd>
<p>There are three server-side versions of the PHP5 interpreter available as Debian packages.&nbsp;  We only want the &#8216;CGI&#8217; version (and the MySQL PHP module).</p>

<pre><code># apt-get install php5-cgi php5-mysql
</code></pre>
</dd>

<dt>4 &#8211; Grab a copy of WordPress and configure it</dt>
<dd>
<p>Install Subversion if necessary (<code>apt-get install subversion</code>), <code>cd</code> to the document root of your website and run the command:</p>

<pre><code># svn co http://svn.automattic.com/wordpress/tags/2.7 wordpress
</code></pre>

<p>Make the sample config file your actual config file:</p>

<pre><code># mv wordpress/wp-config-sample.php wordpress/wp-config.php
</code></pre>

<p>Edit the database section of wp-config.php to reflect your choices in step 2.</p>
</dd>

<dt>5 &#8211; Configure lighttpd</dt>
<dd>
<p>Open <code>/etc/lighttpd.conf</code> and ensure the following lines are included:</p>

<pre><code>server.modules += ( "mod_cgi" )
$HTTP["url"] =~ "^/wordpress/" { 
  cgi.assign = ( ".php" =&gt; "/usr/bin/php-cgi" )
}
</code></pre>

<p>This tells lighttpd to treat the <code>wordpress</code> subdirectory of your document root as a CGI executable directory.</p>

<p>If you want to hide the <code>wordpress</code> subdirectory in your blog&#8217;s URLs, ensure the following lines are included in your <code>/etc/lighttpd.conf</code> as well:</p>

<pre><code>server.modules += ( "mod_rewrite" )
$HTTP["host"] =~ "^example.org$" {
  url.rewrite-once = ( "^/(.*)" =&gt; "/wordpress/$1" )
}
</code></pre>

<p>If there are some files or directories under your document root for which page requests shouldn&#8217;t be rewritten, alter the <code>url.rewrite-once</code> line above as in this example:</p>

<pre><code>url.rewrite-once = ( "^/((?!(sitemap.xml$|robots.txt$|images/)).*)"
                     =&gt; "/wordpress/$1" )
</code></pre>

<p>And while we&#8217;re at it, and assuming your DNS records are set up appropriately, why not dispense with the visionary, but entirely unnecessary <code>www</code> in page requests that include it?</p>

<pre><code>server.modules += ( "mod_redirect" )
$HTTP["host"] =~ "^www.example.org$" {
  url.redirect = ( "^/(.*)" =&gt; "http://example.org/$1" )
}
</code></pre>

<p>Don&#8217;t forget to restart <code>lighttpd</code> after making your changes:</p>

<pre><code># /etc/init.d/lighttpd restart
</code></pre>
</dd>

<dt>6 &#8211; Complete the installation</dt>
<dd>
<p>Visit <code>http://example.org/wp-admin/install.php</code> in your browser (or 
<code>http://example.org/wordpress/wp-admin/install.php</code> if you&#8217;ve chosen <em>not</em> to hide the <code>wordpress</code> subdirectory as described above), give your blog a title, enter an email address and login.</p>

<p>&nbsp;</p>
</dd>
</dl>

<p>Hope this helps.&nbsp; Feel free to comment on what you have read.</p>
]]></content:encoded>
			<wfw:commentRss>http://sebyte.org/?feed=rss2&amp;p=27</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
