<?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>SourceFreedom.com</title>
	<atom:link href="http://sourcefreedom.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://sourcefreedom.com</link>
	<description>Open-Source Software As A Service</description>
	<lastBuildDate>Mon, 25 Feb 2013 18:05:30 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
<image>
<link>http://sourcefreedom.com</link>
<url>http://sourcefreedom.com/wp-content/plugins/maxblogpress-favicon/icons/favicon-31.ico</url>
<title>SourceFreedom.com</title>
</image>
		<item>
		<title>Virtual Web Servers: Apache2 on Debian</title>
		<link>http://sourcefreedom.com/virtual-servers-on-apache2-on-d/</link>
		<comments>http://sourcefreedom.com/virtual-servers-on-apache2-on-d/#comments</comments>
		<pubDate>Sat, 03 Nov 2012 14:40:37 +0000</pubDate>
		<dc:creator>Wolf Halton</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Website Development]]></category>

		<guid isPermaLink="false">http://sourcefreedom.com/?p=321</guid>
		<description><![CDATA[This is a short How-To about setting up multiple domain names, or sub-domains on Debian Squeeze using Apache 2.2 The following is the actual configurations of a working server with 2 subdomains on it. It throws an error that does not stop it from working. #=======snippet from apache2.conf # Include generic snippets of statements Include [...]]]></description>
				<content:encoded><![CDATA[<p>This is a short How-To about setting up multiple domain names, or sub-domains on Debian Squeeze using Apache 2.2<br />
The following is the actual configurations of a working server with 2 subdomains on it.<br />
It throws an error that does not stop it from working.</p>
<p><code><br />
#=======snippet from apache2.conf</p>
<p># Include generic snippets of statements<br />
Include conf.d/</p>
<p>#=======Contents of conf.d directory=======================<br />
wolf@SERVER-01:/etc/apache2/conf.d$ ls<br />
charset  localized-error-pages  other-vhosts-access-log  security  virtual.conf</p>
<p>#=======Configuration of virtual.conf=======================</p>
<p>wolf@SERVER-01:/etc/apache2/conf.d$ cat virtual.conf<br />
# running virtual hosts<br />
#<br />
NameVirtualHost *</p>
<p>#======Contents of the sites-available directory============ </p>
<p>wolf@SERVER-01:/etc/apache2/sites-available$ ls<br />
default  default-ssl  legacy</p>
<p>#======Configuration for dev.example.net====================</p>
<p>wolf@SERVER-01:/etc/apache2/sites-available$ cat default<br />
<VirtualHost *><br />
	ServerAdmin wolf.halton@ lyrasis.org<br />
	ServerName dev.example.net<br />
	ServerAlias www.dev.example.net</p>
<p>	DocumentRoot /var/www/http/<br />
	<Directory /><br />
		Options FollowSymLinks<br />
		AllowOverride All<br />
	</Directory><br />
	<Directory /var/www/http/><br />
		Options Indexes FollowSymLinks MultiViews<br />
		AllowOverride All<br />
		Order allow,deny<br />
		allow from all<br />
	</Directory></p>
<p>	ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/<br />
	<Directory "/usr/lib/cgi-bin"><br />
		AllowOverride None<br />
		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch<br />
		Order allow,deny<br />
		Allow from all<br />
	</Directory></p>
<p>	ErrorLog /var/log/apache2/error.log</p>
<p>	# Possible values include: debug, info, notice, warn, error, crit,<br />
	# alert, emerg.<br />
	LogLevel warn</p>
<p>	CustomLog /var/log/apache2/access.log combined</p>
<p>    Alias /doc/ "/usr/share/doc/"<br />
    <Directory "/usr/share/doc/"><br />
        Options Indexes MultiViews FollowSymLinks<br />
        AllowOverride None<br />
        Order deny,allow<br />
        Deny from all<br />
        Allow from 127.0.0.0/255.0.0.0 ::1/128<br />
    </Directory></p>
<p></VirtualHost></p>
<p>#========Configuration for legacy.example.net======================<br />
wolf@SERVER-01:/etc/apache2/sites-available$ cat legacy<br />
# This is the settings file for the legacy.example.net site</p>
<p><VirtualHost *><br />
        ServerAdmin wolf.halton@ lyrasis.org<br />
        ServerName  www.legacy.example.net<br />
        ServerAlias legacy.example.net</p>
<p>        # Indexes + Directory Root.<br />
        DirectoryIndex index.html<br />
        DocumentRoot /var/www/legacy/htdocs/</p>
<p>        # CGI Directory<br />
        ScriptAlias /cgi-bin/ /var/www/legacy/cgi-bin/<br />
        <Location /cgi-bin><br />
                Options +ExecCGI<br />
        </Location></p>
<p>        # Logfiles<br />
        ErrorLog  /var/www/legacy/logs/error.log<br />
        CustomLog /var/www/legacy/logs/access.log combined<br />
</VirtualHost><br />
</code> </p>
]]></content:encoded>
			<wfw:commentRss>http://sourcefreedom.com/virtual-servers-on-apache2-on-d/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nagios Plugins 1.4.16 Installation Notes</title>
		<link>http://sourcefreedom.com/nagios-plugins-1-4-16-installation-notes/</link>
		<comments>http://sourcefreedom.com/nagios-plugins-1-4-16-installation-notes/#comments</comments>
		<pubDate>Sun, 21 Oct 2012 16:15:29 +0000</pubDate>
		<dc:creator>Wolf Halton</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Nagios]]></category>

		<guid isPermaLink="false">http://sourcefreedom.com/?p=307</guid>
		<description><![CDATA[Even simple things are hard when you have never done them. There is a pretty good How-to at http://nagios.sourceforge.net/docs/3_0/quickstart-ubuntu.html for installing Nagios, and plugins, generally. I use Debian, so there may be a few minor differences between an Ubuntu install and my installation on Debian. Mostly I wanted to add a few notes about issues [...]]]></description>
				<content:encoded><![CDATA[<p>Even simple things are hard when you have never done them.<br />
There is a pretty good How-to at <a href="http://nagios.sourceforge.net/docs/3_0/quickstart-ubuntu.htm" title="Install Nagios on Ubuntu" target="_blank">http://nagios.sourceforge.net/docs/3_0/quickstart-ubuntu.htm</a>l for installing Nagios, and plugins, generally. I use Debian, so there may be a few minor differences between an Ubuntu install and my installation on Debian.  Mostly I wanted to add a few notes about issues I run into when adding a remote server to the nagios family.  You have to do a few things that are not in the instructions.<br />
Before you begin, make sure you have a C-language compiler installed as well as &#8216;make.&#8217;<br />
<code># aptitude install gcc make</code><br />
also, your ssl_version in Nagios-Plugins will fail if you do not have libssl-dev installed.<br />
<code># aptitude install libssl-dev</code><br />
Your make will continue to fail in an unhelpful manner if you do not now re-run your configure command.<br />
<code>[nagios-plugins-src-dir]$ ./configure --with-nagios-user=nagios --with-nagios-group=nagios</code><br />
Then run make and it will run properly.<br />
<code>[nagios-plugins-src-dir]$ make</code><br />
Run make install as root.<br />
<code>[nagios-plugins-src-dir]# make install<br />
Change ownership of the nagios-installation directory to nagios.<br />
<code># chown -R nagios:nagios /usr/local/nagios</code><br />
The plugins live in the /usr/local/nagios/libexec folder.</p>
<p>Make sure your nagios@nagiosserver can shell into the nagios@remote-server without a pass-phrase or it will not be able to run "command_over_ssl." I am not yet running the NRE as I understand ssl well enough to use it.</p>
<p>Thanks to Dave Bonnell for the libssl-dev suggestion <a href="http://sourceforge.net/mailarchive/message.php?msg_id=29576799 " target="_blank">http://sourceforge.net/mailarchive/message.php?msg_id=29576799</a> </p>
<p>Make sure you ssh into each remote server as nagios@nagiosserver to get past the "Add this server to known hosts" dialog, otherwise nagios will not be able to send test requests automatically.</p>
]]></content:encoded>
			<wfw:commentRss>http://sourcefreedom.com/nagios-plugins-1-4-16-installation-notes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Nagios: Monitor Remote Disk Free Space</title>
		<link>http://sourcefreedom.com/nagios-monitor-remote-disk-free-space/</link>
		<comments>http://sourcefreedom.com/nagios-monitor-remote-disk-free-space/#comments</comments>
		<pubDate>Mon, 19 Mar 2012 22:00:58 +0000</pubDate>
		<dc:creator>Wolf Halton</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Network Services]]></category>
		<category><![CDATA[advanced Nagios]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[Nagios Disk checking]]></category>
		<category><![CDATA[network monitoring]]></category>

		<guid isPermaLink="false">http://sourcefreedom.com/?p=289</guid>
		<description><![CDATA[I was working with Nagios-3.3.1, which I love because it shows me everything I want to know and is easier than Zabbix to set up. Yes, I had to write a shell script to make the config file-generation faster and less troublesome, but after I got that part done, I really started to see a [...]]]></description>
				<content:encoded><![CDATA[<p>I was working with <a href="http://nagios.org">Nagios-3.3.1</a>, which I love because it shows me everything I want to know and is easier than <a href="http://zabbix.com">Zabbix</a> to set up.</p>
<p>Yes, I had to write a shell script to make the config file-generation faster and less troublesome, but after I got that part done, I really started to see a great system.  Nagios sends emails to me when it has an issue, like being unable to access a given server for a test or if the web server is down.  All of this went up in a relatively simple way.  Not as easy as Pandora FMS but still pretty simple, if you consider command-line configuration files simple to edit.<span id="more-289"></span></p>
<p>A little while ago, I got back from a weekend, during which Nagios had not sent any alerts or notices, and discovered two web-servers in my test network were locked up.  They both were running a particular application that filled their hard drives with 4GB files.  Nagios should have been able to sort this out.</p>
<h2>What Happened?!?</h2>
<p>What I discovered is that Nagios though t they both had 15GB free and were neither in alert status. It appeared that the service-checker I had set to check the drives was checking only the Nagios server&#8217;s drive. It was about 15GB free, thanks. I dug into the details of the issue and discovered that the service-checker I had chosen was never intended to read a remote drive. I got a slight clue, when one of my colleagues asked if I was launching the checker with Samba (Windows sharing protocol) or with SSH (Secure Shell, the workhorse network communications protocol of the UNIX world and by extension &#8211; the internet.</p>
<h2>My Solution</h2>
<p>I had been resistant to having to load anything on the remote servers related to Nagios, as I had the fo0nd illusion that Nagios was a clientless network-management application. I knew this wasn&#8217;t entirely true. There had to be a username and password supplied for reading the health of the Postgresql service. In this case, there needed to be a small shell-script on the client that Nagios&#8217;s plugin could access.<br />
The plugin was called <a title="check_diskfree" href="http://exchange.nagios.org/directory/Plugins/System-Metrics/File-System/check_diskfree/details">check_diskfree</a><br />
check_diskfree needed to have another service plug-in, check_by_ssh, to work.</p>
<h2>Configuration Steps</h2>
<p>Open the file /usr/local/nagios/etc/objects/commands.cfg and add the following block of code:<br />
<code><br />
define command{<br />
command_name check_by_ssh<br />
command_line $USER1$/check_by_ssh -H $HOSTADDRESS$ -p $ARG1$ -C "$ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$"<br />
}<br />
# The example at Nagios extensions showed it as $HOSTNAME$ but that looked for the machine name in my network. Apparently it is designed to work with Fully-Qualifies-Domain-Names (FQDN). On my network, it just showed the error"Invalid HOSTNAME/IP ADDRESS." "HOSTADDRESS will work in any network.<br />
# Below is the command definition that read only the local Nagios-Server disk.<br />
define command{<br />
command_name check_disk<br />
command_line $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$<br />
}<br />
</code></p>
<h2>Service Definition Madness</h2>
<p>I have a script, as I mentioned that makes putting together a server-monitoring config much easier. It makes a separate file for each server with the servers HOSTNAME (machine name) and the extension .cfg. I found this far simpler than running through a 4000-line config file, which was what it looked like before I wrote the script. I am going to presume for now that you have some way of associating services with machines. If anybody asks, I might show that script to you, someday.<br />
Thus I open a 80-line HOSTNAME.cfg file and under the services header add the following service definition.</p>
<p><code><br />
define service{<br />
use local-service<br />
host_name HOSTNAME<br />
service_description Remote Root Partition<br />
check_command check_by_ssh!22!/nagios/check_diskfree.sh!sda2!75!90<br />
notifications_enabled 1<br />
max_check_attempts 3<br />
check_interval 5<br />
retry_interval 3<br />
check_period 24x7<br />
notification_interval 15<br />
notification_period 24x7<br />
notification_options w,c,r<br />
contact_groups admins<br />
register 1<br />
}</code></p>
<p><code># The following is the service-definition that was not working</code></p>
<p><code>define service{<br />
use local-service<br />
host_name HOSTNAME<br />
service_description Root Partition<br />
check_command check_disk!20%!5%!/<br />
notifications_enabled 1<br />
max_check_attempts 3<br />
check_interval 5<br />
retry_interval 3<br />
check_period 24x7<br />
notification_interval 15<br />
notification_period 24x7<br />
notification_options w,c,r<br />
contact_groups admins<br />
register 0<br />
}</code></p>
<h2>Sanity-Checking your Configuration</h2>
<p>To check your configurations without starting up the nagios service, you want to run the following helpful command.<br />
<code><br />
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg<br />
</code><br />
This will check all of your config files and even tell you what line is bad in which file is wrong. This is far quicker than restarting, or attempting to restart, the nagios service<br />
<code><br />
# /etc/init.d/nagios restart<br />
</code><br />
Failures are extremely terse, and unhelpfull, while the sanity-checking command is extremely helpful.</p>
<h2>Setting up Communications with the Remote server</h2>
<p>You will need to get the public key from your Nagios server&#8217;s nagios user and put it in the file of authorized ssh keys on the remote machine somehow. There are a couple of ways but this is how I usually do this thing, because I usually have one or two terminal windows open on my desktop. That lets me use the copy buffer to do this configuration. I also use Debian servers, so the commands might not work exactly like this on your flavour of Linux.<br />
In the terminal (or one of the many) shell into the remote server as its root user.<br />
<code><br />
ssh root@192.168.0.230<br />
</code><br />
Add a user called &#8216;nagios.&#8217; This is the user name that nagios will attempt to contact the remote server under, so rather than pushing the river, you just have to have that user to receive the request.<br />
<code><br />
adduser nagios<br />
</code><br />
Add a directory called /nagios<br />
<code><br />
mkdir /nagios<br />
</code><br />
Switch users to that nagios user and make another directory &#8211; this directory will be in your nagios user&#8217;s home folder.<br />
<code><br />
su - nagios<br />
mkdir .ssh<br />
</code><br />
shell back into your Nagios server&#8217;s nagios user&#8217;s home folder<br />
<code><br />
ssh nagios@NAGIOSSERVER # Change NAGIOSSERVER TO it's actual IP address or domain name<br />
</code><br />
Make a public key (if you don&#8217;t already have one created). Leave the pass-phrases blank.<br />
<code><br />
ssh-keygen<br />
</code><br />
Copy your Nagios server&#8217;s nagios user&#8217;s public key<br />
<code><br />
less .ssh/id_rsa.pub<br />
</code><br />
Here I just highlight and copy the entire block from &#8220;ssh-rsa&#8221; to the end. (it may have the user name at the end, and you can include that too, i.e., nagios@nagiosserver<br />
Click &#8220;q&#8221; to quit the less application and type &#8220;exit&#8221; to close the secure shell session<br />
now your prompt will show you to be &#8220;nagios@remoteserver:~$&#8221; so you need to paste the key in.<br />
<code><br />
vi .ssh/authorized_keys<br />
</code><br />
Type &#8220;i&#8221; for &#8220;insert&#8221; and either with the mouse or keyboard shortcuts paste the key into the file. Make sure there is a blank line at the end of the file. Because you just made this user, this file did not exist before you invoked it with vi.<br />
Save the file and quit vi<br />
<code><br />
:wq<br />
</code><br />
Now type &#8220;exit&#8221; until you are again looking at a prompt showing you to be nagios@nagiosserver:~$<br />
To check the set-up, shell back into the remote server. You should not need to have a password this time.<br />
now to finish the set-up on the remote server, you need to copy the check_diskfree.sh file into the nagios directory you just created at root level.<br />
<code><br />
scp /usr/local/nagios/libexec/check_diskfree.sh 192.168.0.230:/nagios/<br />
</code><br />
This drops the file where nagios will be looking for it.</p>
<h2>Looking at the Nagios Front-End</h2>
<p>go to your web browser and look at the services page. Your remote server should have a new service called &#8220;Remote Root Partition&#8221;<br />
If there is an error or no useful info, click on that service name and then the link to reschedule the next check of that service. When you go back to the services page you should see something like this<br />
<code><br />
--------------------------------------------------------------------------------------------------------<br />
| Remote Root Partition | OK | 03-19-2012 17:52:18 | 0d 1h 26m 33s | 1/3 | OK. | Free Space: 24GB, 95% |<br />
--------------------------------------------------------------------------------------------------------<br />
</code></p>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://sourcefreedom.com/nagios-monitor-remote-disk-free-space/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Is Open Source For You?</title>
		<link>http://sourcefreedom.com/is-open-source-for-you/</link>
		<comments>http://sourcefreedom.com/is-open-source-for-you/#comments</comments>
		<pubDate>Wed, 14 Mar 2012 11:22:19 +0000</pubDate>
		<dc:creator>Wolf Halton</dc:creator>
				<category><![CDATA[Website Development]]></category>

		<guid isPermaLink="false">http://sourcefreedom.com/?p=287</guid>
		<description><![CDATA[Created by Lyrasis, a 501c(3) library association based in Atlanta GA, this site was created specifically for libraries but it is useful for other organizations when trying to understand whether opensource software will work for them. http://foss4lib.org. &#160;]]></description>
				<content:encoded><![CDATA[<div class='posterous_autopost'>
<p>Created by Lyrasis, a 501c(3) library association based in Atlanta GA, this site was created specifically for libraries but it is useful for other organizations when trying to understand whether opensource software will work for them. <a href="http://foss4lib.org">http://foss4lib.org</a>.</p>
<p>&nbsp;</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://sourcefreedom.com/is-open-source-for-you/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>USING THE grep UTILITY</title>
		<link>http://sourcefreedom.com/using-the-grep-utility/</link>
		<comments>http://sourcefreedom.com/using-the-grep-utility/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 01:09:18 +0000</pubDate>
		<dc:creator>Wolf Halton</dc:creator>
				<category><![CDATA[Guest Blog]]></category>

		<guid isPermaLink="false">http://sourcefreedom.com/?p=249</guid>
		<description><![CDATA[[This was originally published by Mike Brooks as a wiki entry and I have moved it here - Wolf] USING THE grep UTILITY Since the acquisition of certain data is many times critical, the grep utility is a valuable tool for the Linux user. It allows you to search through one or more files to [...]]]></description>
				<content:encoded><![CDATA[<p>[This was originally published by Mike Brooks as a wiki entry and I have moved it here - Wolf]<br />
USING THE grep UTILITY</p>
<p>Since the acquisition of certain data is many times critical, the grep utility is a valuable tool for the Linux user. It allows you to search through one or more files to see whether any contain a specified string of characters. This utility does not change the file it searches but simply displays each line that contains the string.</p>
<p>Originally, the name grep was a play on an ed— an original UNIX editor, available on Fedora/RHEL— command: g/re/p. In this command g stands for global, re is a regular expression delimited by slashes, and p means print.<span id="more-249"></span></p>
<p>The following is an example of the proper syntax.</p>
<p>grep ‘string you want to search for’ file (name of file you want to search)</p>
<p>So, let’s say you were looking for the name of a person in a memo so you could replace that name with another without retyping the entire memo or document, a simple example could be:</p>
<p>grep ‘Halton’ thankyou.txt</p>
<p>This would return the specified name which could then be changed to the next name on the list of professors you wanted to thank for their contribution and influence on your education.</p>
<p>Options available for this command are extensive here are a few:</p>
<p>-H print the filename for each match</p>
<p>-I Ignore case</p>
<p>-l print only names of FILEs containing matches</p>
<p>-n print line number with output lines</p>
<p>-o only matching; show only the part of the line matching PATTERN</p>
<p>-w match only whole words</p>
<p>-x force PATTERN to match only whole lines</p>
<p>To see a complete listing of the options and a more complete detailed explanation of this utility it can be obtained by typing the following in the command prompt in Linux terminal.</p>
<p>$ man grep</p>
<p>(Mike Brooks)</p>
]]></content:encoded>
			<wfw:commentRss>http://sourcefreedom.com/using-the-grep-utility/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing DSpace 1.7 on Ubuntu 10.04</title>
		<link>http://sourcefreedom.com/installing-dspace-1-7-on-ubuntu-10-04/</link>
		<comments>http://sourcefreedom.com/installing-dspace-1-7-on-ubuntu-10-04/#comments</comments>
		<pubDate>Sun, 28 Aug 2011 20:26:36 +0000</pubDate>
		<dc:creator>Wolf Halton</dc:creator>
				<category><![CDATA[DSpace]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://sourcefreedom.com/?p=224</guid>
		<description><![CDATA[Original wiki entry by Peter Dietz. The goal of this guide is to provide a simple path that will get a user up-and-running as quickly as possible. Peter Dietz did a great job with this, however there are issues about setting up DSpace on an Ubuntu 10.04LTS server that I didn&#8217;t think were covered well. [...]]]></description>
				<content:encoded><![CDATA[<p>Original wiki entry by</p>
<p><a href="https://wiki.duraspace.org/display/%7Epeterdietz">Peter Dietz</a>.</p>
<p>The goal of this guide is to provide a simple path that will get a user up-and-running as quickly as possible. Peter Dietz did a great job with this, however there are issues about setting up DSpace on an Ubuntu 10.04LTS server that I didn&#8217;t think were covered well. This is not entirely surprising because there have been two Ubuntu releases since April of 2010, and it is at least because my company doesn&#8217;t set up servers on the bleeding edge of Ubuntu development. There may be a switch to Debian at some point. Debian Stable is even more stable than Ubuntu LTS, I must admit, but we are more comfortable with Ubuntu.<span id="more-224"></span></p>
<p>Installing DSpace is almost as simple as changing between DSpace versions (eg between 1.6 and 1.7). It can be done in only a few minutes. The installation and configuration of the prerequisites is the step that takes all the time. Within the world of the Ubuntu server, this is standard stuff. Ubuntu has an application to help with setting up the web application stack. The following is steps that are performed from Terminal, the command line interface in Ubuntu. These steps can also be done through a ssh secure shell from any machine with a ssh client, or from runlevel 3 command-line with networking.</p>
<p>This how-to was originally written for Ubuntu 10.10 (Maverick Meerkat) and has been tested with Ubuntu 11.04 (Natty Narwhal). The current write-up is developed for Ubuntu Lucid Lynx 10.04LTS for use at Lyrasis, where I work as a Linux Systems Administrator. We have a policy of using LTS versions of the OS in my department, so we will not be updating our servers until the next Long-Term-Support version appears, next year. Here is the original wiki link, so you can see what I added. <a href="https://wiki.duraspace.org/display/DSPACE/Installing+DSpace+1.7+on+Ubuntu">https://wiki.duraspace.org/display/DSPACE/Installing+DSpace+1.7+on+Ubuntu</a> ..modified by Wolf Halton 8/18/2011</p>
<h2>Acting as Root where You will be Doing Dozens of Commands as Root</h2>
<p>Rather than repeat &#8220;sudo&#8221; over and over, one can use <strong>sudo -i</strong> to act as if one had logged in to a root session. The root session is a larger security risk than typing sudo over and over, however if you are planning to leave your computer you can easily type &#8220;exit&#8221; to leave the root session or lock your screen if you must leave the machine.</p>
<h2 class="western">Install Prerequisites</h2>
<h3 class="western">Install the server stack of Tomcat (web server) and PostgreSQL (database)</h3>
<div id="highlighter_337327" dir="LTR">
<table width="273" cellspacing="0" cellpadding="0">
<colgroup>
<col width="273" /></colgroup>
<tbody>
<tr>
<td style="padding: 0in;" width="273"><code class="western">sudo-i</code>Enter password<code class="western"># aptitude install tasksel</code></p>
<p style="padding: 0in;"><code class="western"># tasksel</code></p>
</td>
</tr>
</tbody>
</table>
</div>
<ul>
<li>
<p style="margin-bottom: 0in;">Select the following packages</p>
</li>
</ul>
<div id="highlighter_498166" dir="LTR">
<dl>
<dd>
<table width="223" cellspacing="0" cellpadding="0">
<colgroup>
<col width="223" /></colgroup>
<tbody>
<tr>
<td style="padding: 0in;" width="223"><code class="western">[*] LAMP server</code><code class="western">[*] PostgreSQL database</code></p>
<p style="padding: 0in;"><code class="western">[*] Tomcat Java server</code></p>
</td>
</tr>
</tbody>
</table>
</dd>
</dl>
</div>
<h3 class="western">Install the Compile / Build tools</h3>
<div id="highlighter_866989" dir="LTR">
<table width="303" cellspacing="0" cellpadding="0">
<colgroup>
<col width="303" /></colgroup>
<tbody>
<tr>
<td style="padding: 0in;" width="303">
<p style="padding: 0in;"><code class="western"># aptitude install ant maven2</code></p>
</td>
</tr>
</tbody>
</table>
</div>
<h2 class="western">Configure the Prerequisite Software</h2>
<h3 class="western">Create the database user (dspace)</h3>
<div id="highlighter_206388" dir="LTR">
<table width="500" cellspacing="0" cellpadding="0">
<colgroup>
<col width="500" /></colgroup>
<tbody>
<tr>
<td style="padding: 0in;" width="525"><code class="western"># su - postgres</code><code class="western"></code></p>
<p><code class="western">$ createuser -U postgres -d -A -P dspace</code></p>
<p style="padding: 0in;"><code class="western">$ exit</code></p>
</td>
</tr>
</tbody>
</table>
</div>
<h3 class="western">Allow the database user (dspace) to connect to the database</h3>
<div id="Section1" dir="LTR">
<table width="560" cellspacing="0" cellpadding="0">
<colgroup>
<col width="560" /></colgroup>
<tbody>
<tr>
<td style="padding: 0in;" width="560"><code class="western"># vi /etc/postgresql/9.4/main/pg_hba.conf</code><code class="western"># Add this</code> <code class="western">line to the configuration:</code></p>
<p>local all dspace md5</p>
<p style="padding: 0in;"><code class="western"># /etc/init.d/postgresql restart</code></p>
</td>
</tr>
</tbody>
</table>
</div>
<h3 class="western">Set the PostgreSQL Listening Port Wide</h3>
<div id="highlighter_974172" dir="LTR">
<table width="613" cellspacing="0" cellpadding="0">
<colgroup>
<col width="613" /></colgroup>
<tbody>
<tr>
<td style="padding: 0in;" width="613"><code class="western"># vi /etc/postgresql/9.0/main/postgresql.conf</code><code class="western"># Add on line 57 in the configuration:</code></p>
<p>listen_address = &#8216;*&#8217;</p>
<p style="padding: 0in;"><code class="western"><code># /etc/init.d/postgresql restart</code></code></p>
<p>&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<h3 class="western">Create the dspace database</h3>
<p>As the postgres user</p>
<div id="highlighter_829461" dir="LTR">
<table width="511" cellspacing="0" cellpadding="0">
<colgroup>
<col width="351" /></colgroup>
<tbody>
<tr>
<td style="padding: 0in;" width="351">
<p style="padding: 0in;"># su &#8211; postgres</p>
<p style="padding: 0in;"><code class="western">createdb -U dspace -E UNICODE dspace</code></p>
</td>
</tr>
</tbody>
</table>
</div>
<h3 class="western"><a name="InstallingDSpace1.7onUbuntu-ConfigureTomcattoknowabouttheDSpacewebapps."></a></h3>
<p>Configure Tomcat to know about the DSpace webapps.</p>
<p>As root user</p>
<div id="highlighter_71838" dir="LTR">
<table width="397" cellspacing="0" cellpadding="0">
<colgroup>
<col width="665" /></colgroup>
<tbody>
<tr>
<td style="padding: 0in;" width="665"><code class="western"># vi /etc/tomcat6/server.xml</code><code class="western"># Insert the following block of text just above the closing &lt;/Host&gt;</code><code class="western">&lt;!-- Define a new</code> <code class="western">context path for</code> <code class="western">all DSpace web apps --&gt;</code></p>
<p><code class="western">&lt;Context path="/xmlui"</code></p>
<p><code class="western">docBase="/dspace/webapps/xmlui"</code></p>
<p><code class="western">allowLinking="true"/&gt;</code></p>
<p><code class="western">&lt;Context path="/sword"</code></p>
<p><code class="western">docBase="/dspace/webapps/sword"</code></p>
<p><code class="western">allowLinking="true"/&gt;</code></p>
<p><code class="western">&lt;Context path="/oai"</code></p>
<p><code class="western">docBase="/dspace/webapps/oai"</code></p>
<p><code class="western">allowLinking="true"/&gt;</code></p>
<p><code class="western">&lt;Context path="/jspui"</code></p>
<p><code class="western">docBase="/dspace/webapps/jspui"</code></p>
<p><code class="western">allowLinking="true"/&gt;</code></p>
<p><code class="western">&lt;Context path="/lni"</code></p>
<p><code class="western">docBase="/dspace/webapps/lni"</code></p>
<p><code class="western">allowLinking="true"/&gt;</code></p>
<p style="padding: 0in;"><code class="western">&lt;Context</code></p>
<p>path=&#8221;/solr&#8221;</p>
<p><code class="western">docBase="/dspace/webapps/solr"</code></p>
<p><code class="western">allowLinking="true"/&gt;</code></td>
</tr>
</tbody>
</table>
</div>
<h2 class="western"><a name="InstallingDSpace1.7onUbuntu-DownloadandInstallDSpace"></a></h2>
<p>Download and Install DSpace</p>
<h3 class="western"><a name="InstallingDSpace1.7onUbuntu-Createthe\dspace\directory."></a></h3>
<p>Create the [dspace] directory.</p>
<p>The [dspace] directory is where the running dspace code will reside. As the root user:</p>
<div id="highlighter_281809" dir="LTR">
<table width="176" cellspacing="0" cellpadding="0">
<colgroup>
<col width="176" /></colgroup>
<tbody>
<tr>
<td style="padding: 0in;" width="176">
<p style="padding: 0in;"><code class="western"># mkdir /dspace</code></p>
</td>
</tr>
</tbody>
</table>
</div>
<h3 class="western">Download the Source Release</h3>
<p>The source release allows you to customize every aspect of DSpace. This step downloads the compressed archive from SourceForge, and unpacks it in your current directory. The dspace-1.x.x-src-release directory is typically referred to</p>
<p>as [dspace-src].</p>
<p>You may have noticed there is not a unix system user called &#8220;dspace.&#8221; At this point you might want to &#8220;su: to your standard user &#8211; in my case that user would be &#8220;wolf&#8221; so I would type:</p>
<div id="highlighter_738827" dir="LTR">
<table width="534" cellspacing="0" cellpadding="0">
<colgroup>
<col width="665" /></colgroup>
<tbody>
<tr>
<td style="padding: 0in;" width="665">su &#8211; wolf# then type the following commands (note that I didn&#8217;t just exit from root. I didn&#8217;t want to type in a password when I go back to being &#8220;root&#8221; again).</p>
<p><code class="western">wget http://sourceforge.net/projects/dspace/files/DSpace%20Stable/1.7.2/dspace-1.7.2-src-release.tar.gz</code></p>
<p style="padding: 0in;"><code class="western">tar -xvzf dspace-1.7.2-src-release.tar.gz</code></p>
</td>
</tr>
<tr>
<td style="padding: 0in;" width="665"></td>
</tr>
</tbody>
</table>
</div>
<h3 class="western">Compile and Build DSpace</h3>
<p>The source release that has been obtained is human readable source code, and must be compiled to machine code for the server to run it. &#8220;mvn package&#8221; compiles the source code, and &#8220;ant&#8221; will do all the work necessary to initialize the database with the DSpace schema, and copy all of the compiled machine code to a location where the web server can serve it.</p>
<p>As the root user perform the following steps&#8221;</p>
<table width="567" cellspacing="0" cellpadding="2">
<colgroup>
<col width="23" />
<col width="634" /></colgroup>
<tbody>
<tr>
<td style="padding: 0in;" valign="TOP" width="23">Note:</td>
<td style="padding: 0in;" width="634">ant fresh_install will populate the dspace database and [dspace] directory with new information. This will overwrite any existing installation of DSpace that you may have.</p>
<p>For upgrades the better command to use would be ant update, as it doesn&#8217;t alter the database or modify your assetstore.</td>
</tr>
</tbody>
</table>
<div id="highlighter_414910" dir="LTR">
<table width="460" cellspacing="0" cellpadding="0">
<colgroup>
<col width="460" /></colgroup>
<tbody>
<tr>
<td style="padding: 0in;" width="460"><code class="western"># cd dspace-1.7.2-src-release</code><code class="western"># mvn -U package</code><code class="western"># cd dspace/target/dspace-1.7.2-build.dir</code></p>
<p style="padding: 0in;"><code class="western"># ant fresh_install</code></p>
</td>
</tr>
</tbody>
</table>
</div>
<h3 class="western"></h3>
<h3 class="western">Fix Tomcat permissions, and restart the Tomcat server</h3>
<p>This guide follows the convention where the tomcat user will own all of the files in [dspace], so we have to change the owner of the files to tomcat6. Restarting tomcat will deploy the dspace webapps that are now ready to be viewed.</p>
<div id="highlighter_741688" dir="LTR">
<table width="361" cellspacing="0" cellpadding="0">
<colgroup>
<col width="361" /></colgroup>
<tbody>
<tr>
<td style="padding: 0in;" width="361"><code class="western"># chown tomcat6:tomcat6 /dspace -R</code></p>
<p style="padding: 0in;"><code class="western"># /etc/init.d/tomcat6 restart</code></p>
<p>&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<h2 class="western">XMLUI Display Issues</h2>
<p>When any change is done to anything that changes the content of the static xmlui pages, one good solution which comes from http://www.mail-archive.com/dspace-tech@lists.sourceforge.net/msg14441.html is that the cocoon cache has to be emptied. I have spent 2 days searching for a way to update a change in web-admin email address that appears on the contacts page. In our setup, the file we need to get rid of is /var/cache/tomcat6/Catalina/localhost/xmlui/cache-dir/cocoon-ehcache.data</p>
<p>To be on the safe side I just moved the file to cocoon-ehcache.data.old, restarted tomcat6, and <strong>&#8220;Bang!&#8221;</strong> the contacts page displays properly.</p>
<h2 class="western">Test it out in your browser</h2>
<p>That is all that is required to install DSpace on Ubuntu. There are two main webapps that provide a similar turn-key repository interface</p>
<p><a href="http://localhost:8080/xmlui">http://localhost:8080/xmlui</a></p>
<p><a href="http://localhost:8080/jspui">http://localhost:8080/jspui</a></p>
<h2 class="western">Setting an Admin Account</h2>
<p>To add an admin account for administering Dspace, go to [dspace]/bin/ and run the command</p>
<p><span style="font-family: Courier New,monospace;">./dspace create-administrator</span></p>
<p><span style="font-family: Times New Roman,serif;">The following lines are an</span></p>
<p>(almost) exact display of how that application works.</p>
<p><span style="font-family: Courier New,monospace;">root@DSPACE-TEST-01:/dspace/bin#</span></p>
<p>./dspace create-administrator<br />
Creating an initial administrator account</p>
<p><span style="font-family: Courier New,monospace;"><strong>E-mail address:</strong></span></p>
<p><a href="mailto:wolf.halton@lyrasis.org">wolf.halton@lyrasis.org</a></p>
<p>&nbsp;</p>
<p><span style="font-family: Courier New,monospace;"><strong>First name:</strong> Wolf </span></p>
<p><span style="font-family: Courier New,monospace;"><strong>Last name:</strong> Halton</span></p>
<p><span style="font-family: Courier New,monospace;"><strong>WARNING: Password will appear on-screen.</strong></span></p>
<p><span style="font-family: Courier New,monospace;"><strong>Password: </strong>your-admin&#8217;s-secret-password</span></p>
<p><span style="font-family: Courier New,monospace;"><strong>Again to confirm: </strong>your-admin&#8217;s-secret-password</span></p>
<p><span style="font-family: Courier New,monospace;"><strong>Is the above data correct?</strong></span></p>
<p>(y or n):y</p>
<p><span style="font-family: Courier New,monospace;"><strong>Administrator account created</strong></span></p>
<p><span style="font-family: Courier New,monospace;">root@DSPACE-TEST-01:/dspace/bin#</span></p>
<h3 class="western">Check for proper connections in dspace.cfg</h3>
<p><span style="font-family: Courier New,monospace;">vi /dspace/config/dspace.cfg</span></p>
<p><code class="western"><span style="font-family: Times New Roman,serif;">You can</span></code></p>
<p>also keep your changes in dspace.cfg in [dspace-source]/dspace/config/. Whenever you edit <code class="western"><span style="font-family: Times New Roman,serif;">dspace.cfg in [dspace-source]/dspace/config/, you should then run 'ant init_configs' in the directory [dspace-source]/dspace/target/dspace-1.5.2-build.dir so that any</span></code></p>
<p>changes you may have made are reflected in the configuration files of other applications, for example Apache. You may then need to restart those applications, depending on what you changed.</p>
<p><code class="western"><span style="font-family: Times New Roman,serif;">In 1.5.2 the default behavior of the "update" will check the checksums/file sizes of the installation configuration files in</span></code></p>
<p>&#8220;[dspace]/config&#8221; and will put a new configuration file example in &#8220;&lt;filename&gt;.new&#8221; if there is any difference. The end of the update process will list all the configuration files for which this happened, you should review those configuration files and merge each of them by hand to make sure you do not miss any new configuration requirements. Its recommended that you take the new file, place any changes you had made in the old file into it, delete the old and rename the new.</p>
<p>== ^^^^ The suggestions above [didn't solve my issues] ^^^^ ==</p>
<p>== And further, the changes made to the structure of the site directories ==</p>
<p>== was not entirely as advertised in the documentation ==</p>
<h2>Editing Site Details</h2>
<p>This is not a complete dspace.cfg manual, but just a set of comments for the directives I changed.</p>
<p>1. edit /dspace/config/dspace.cfg</p>
<p># Basic Information &#8211; Site globals</p>
<p># These directives give the site details so the web apps can find their own installation.</p>
<p><span style="font-family: Courier New,monospace;">dspace.dir = /dspace </span></p>
<p># or whatever directory path your dspace install is in.</p>
<p><span style="font-family: Courier New,monospace;"># never put comments like this on command lines like the &#8220;dspace.dir =&#8221; line above it will cause lots of problems, even though it is a comment and the system should not be able to read anything after a &#8216;#.&#8217;</span></p>
<p><span style="font-family: Courier New,monospace;">dspace.hostname = example.com </span></p>
<p># dspace is looking for your public IP address (which works) or a fully qualified domain name (FQDN)</p>
<p><span style="font-family: Courier New,monospace;">dspace.baseUrl =</span></p>
<p>http://example.com:8080</p>
<p># include the http:// and the port number &#8220;:8080.&#8221; It makes the next few parts make more sense.</p>
<p><span style="font-family: Courier New,monospace;">dspace.url =</span></p>
<p>${dspace.baseUrl}/xmlui</p>
<p># The ${whatever} structure is how this script uses the variable whose value you set in the previous command and adds the front-end app of your choice</p>
<p><span style="font-family: Courier New,monospace;">dspace.oai.url =</span></p>
<p>${dspace.baseUrl}/oai</p>
<p># This is for using the Open Archives Interface, the set-up of which is described here:</p>
<p>https://wiki.duraspace.org/display/DSPACE/Use+the+OAI-PMH+interface.</p>
<p>Currently not in use on the Lyrasis DSspace Demo</p>
<p><span style="font-family: Courier New,monospace;">dspace.name = &#8220;DSpace Demo at Lyrasis&#8221;</span></p>
<p># Any string of characters can be used here. This should be a human-readable string.</p>
<p># Database settings</p>
<p><span style="font-family: Courier New,monospace;">db.name = postgres</span></p>
<p># The other choice here is &#8220;oracle.&#8221;</p>
<p><span style="font-family: Courier New,monospace;">db.url =</span></p>
<p>jdbc:postgresql://192.168.10.22:5432/dspace</p>
<div id="content">
<p># The part after the double-slash (//) will be the server wherever your database is, including the port at which the database is listening &#8220;:5432&#8243; and the database name itself &#8220;/dspace.&#8221;. In the case above, we used the private IP network to talk to a dedicated database server. You could have the database on the same machine as yours, and in that case the line would look more like</p>
<p>jdbc:postgresql://localhost:5432/dspace</p>
<p><span style="font-family: Courier New,monospace;">db.driver = org.postgresql.Driver</span></p>
<p><span style="font-family: Courier New,monospace;"> db.username = dspace</span></p>
<p>it is common to have the same name for your database and the user who has control of that database.</p>
<p><span style="font-family: Courier New,monospace;">db.password =</span></p>
<p>whatever_password_you_chose</p>
<p>[skipping a few directives that will have probably been set up automagically]</p>
<p># SMTP Mail server</p>
<p># It is probably a good idea to have a genaric role-based email</p>
<p>here, like &#8220;support@your_domain.org&#8221;</p>
<p># This will be the same email address you set up in your ticketing system for people to send in requests for maintenance or service.</p>
<p># File Storage</p>
<p><span style="font-family: Courier New,monospace;">assetstore.dir</span></p>
<p>${dspace.dir}/assetstore</p>
<p># This directory maps to our /dspace/assetstore/ directory. You need to have this directory be owned by your appserver &#8211; in our case that is &#8220;tomcat6.&#8221; I tried to have tomcat6 be a member of the dspace group, and making the group able to write to this folder. It was easier, by far, just to give the entire /dspace directory to the ownership of tomcat6, as was shown above.</p>
<p>This failed, so I ran</p>
<p># chown -R tomcat6:www-info /dspace</p>
<p># chmod 775 /dspace/assetstore</p>
<p># The /dspace/uploads folder has to be treated similarly</p>
<p>When you have gotten your configurations properly done, you will be able to log into</p>
<p>http://yourdomain.org:8080/xmlui</p>
<p>as your administrative user, after which your admin user will be able to make new users inside of DSpace and give them administrative powers.</p>
<div>
<p style="margin-top: 0.2in;"><a href="https://wiki.duraspace.org/display/DSPACE/Installing+DSpace+1.7+on+Ubuntu">https://wiki.duraspace.org/display/DSPACE/Installing+DSpace+1.7+on+Ubuntu</a></p>
<p>modified by Wolf Halton 8/18/2011</p>
<p>&nbsp;</p>
<hr />
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://sourcefreedom.com/installing-dspace-1-7-on-ubuntu-10-04/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Tuning Postgresql-9.0 with pgtune</title>
		<link>http://sourcefreedom.com/tuning-postgresql-9-0-with-pgtune/</link>
		<comments>http://sourcefreedom.com/tuning-postgresql-9-0-with-pgtune/#comments</comments>
		<pubDate>Sun, 28 Aug 2011 18:45:16 +0000</pubDate>
		<dc:creator>Wolf Halton</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PostgreSQL]]></category>

		<guid isPermaLink="false">http://sourcefreedom.com/?p=214</guid>
		<description><![CDATA[Presuming you have PostgreSQL-9.0 installed, you are probably running the default configuration. The default configuration is designed to work with a variety of hardware, and is tuned for the weakest possible machine within its hardware profile. The official documentation doesn&#8217;t spell out the minimum requirement for the operating systems we use at LTS-Lyrasis, except to [...]]]></description>
				<content:encoded><![CDATA[<p>Presuming you have PostgreSQL-9.0 installed, you are probably running the default configuration. The default configuration is designed to work with a variety of hardware, and is tuned for the weakest possible machine within its hardware profile. The official documentation doesn&#8217;t spell out the minimum requirement for the operating systems we use at LTS-Lyrasis, except to say:</p>
<ul>
<li>Special Cygwin instructions may allow you to run versions of Windows older than Windows 20001.</li>
<li>On Linux, such as Ubuntu, there are some minimum software version numbers and minimum hard drive sizes</li>
<li>The minimum required version is Python 2.2. This came out in December 21, 20012</li>
<li>You will need about 100 MB for the source tree during compilation and about 20 MB for the installation directory. An empty database cluster takes about 35 MB; databases take about five times the amount of space that a flat text file with the same data would take. If you are going to run the regression tests you will temporarily need up to an extra 150 MB.3</li>
</ul>
<p>Pgtune will help you set up PostgreSQL 9.0 to work well with your current hardware.<br />
<span id="more-214"></span></p>
<h2>Install PGTune</h2>
<p><code># aptitude install pgtune</code></p>
<h2>Run PGTune</h2>
<p><code># pgtune -i /etc/postgresql/9.0/main/postgresql.conf -o psql.conf</code><br />
This puts the file, psql.conf, with the tuning suggestions in root&#8217;s home folder</p>
<p>I like using the screen command to move from one command-line page to new command-line page<br />
<code># aptitude install screen</code></p>
<h2>Using the Screen Command</h2>
<p>Since we are doing a lot as root, I am using the “#” sign rather than saying “sudo” over and over. If you want to stay root for a while, you can enter:<br />
<code>$ sudo -i</code><br />
You will be permanently root until you type “exit”<br />
<code># screen</code></p>
<h3>Very Basic Screen Commands</h3>
<p>Note &#8220;^&#8221; is shorthand for the Control key, and &#8220;#&#8221; either means you are acting as the root user or it shows a comment. Let me know where this is confusing in the following How-to, and I will expand the how-to.<br />
<code>^A # &lt;Ctrl&gt;A tells screen that you want to send it a command (“^A” alone does nothing)</code><br />
<code>^A c #tells screen to make a new screen</code><br />
<code>^A n # go to next screen</code><br />
<code>^A 3 # go to screen number 3 </code><br />
– all numbers to be the equivalent of the screens you have running. I put one root session for restarting postgresql on one screen, and another root session for editing postgresql.conf on a second screen within screen.</p>
<ol class="arabic">,</p>
<li>since screen is open<br />
<code>^A c</code><br />
If you ^A n first, screen will tell you there are no other screens.</li>
<li>Using the VI editor, open the pgtune file you just made.<br />
<code> # vi /root/psql.conf</code></p>
<ol class="withromanu">
<li><code>&lt;shift&gt;G</code> to go to bottom of the file</li>
<li>position your cursor at the top of the block marked<br />
“CUSTOMIZED OPTIONS”<br />
<img class="alignnone" title="pgtune1" src="http://i0.wp.com/sourcefreedom.com/wp-content/uploads/2011/8/pgtune-1.png?resize=483%2C323" alt="pgtune1" data-recalc-dims="1" /></li>
<li>type “v” for “visual.”</li>
<li>use your down-cursor arrow<img class="aligncenter" title="pgtune2" src="http://i0.wp.com/sourcefreedom.com/wp-content/uploads/2011/8/pgtune-2.png?resize=558%2C357" alt="PGTune2" data-recalc-dims="1" /> and the right-cursor  to highlight all of the customizations.</li>
<li>Hit “y” to copy the text to a buffer. The highlighting will vanish.<br />
<img class="alignnone" title="pgtune3" src="http://i2.wp.com/sourcefreedom.com/wp-content/uploads/2011/8/pgtune-3.png?resize=545%2C166" alt="pgtune3" data-recalc-dims="1" /></li>
</ol>
</li>
<li><code>^A n</code> takes you to your other screen.</li>
<li>Make a backup of your config file<br />
<code># cp /etc/postgresql/9.0/main/postgresql.conf /etc/postgresql/9.0/main/postgresql.conf.bak </code><br />
You will thank yourself for taking this step</li>
<li>In a second &#8216;screen&#8217; open your active Postgresql configuration file for editing<br />
<code># vi /etc/postgresql/9.0/main/postgresql.conf </code><br />
opens the file for editing.<br />
&lt;Shift&gt;G takes you to the bottom of the file</li>
<li>I like to organize the end of the file a little.
<ol class="withromanu">
<li>Hit the “I” key for “Insert Mode”</li>
<li>Move the cursor to the end of the last visible line with the &lt;End&gt; key (above the cursor arrows block, usually) or just use the right cursor key to get there</li>
<li>Hit enter to add a blank line at the bottom of the page</li>
<li>Mash &lt;Esc&gt; to go to “command mode”</li>
<li>&lt;Shift&gt;P inserts the lines you saved from the other file.</li>
<li>Mash &lt;I&gt; and put a pound sign and a space,“# “, in front of each of the lines you copied over. This keeps them inert until you are ready to use them. It also means that you do not have to delete the block when you are done, if you don&#8217;t choose to do so.<br />
<img class="alignnone" title="pgtune4" src="http://i1.wp.com/sourcefreedom.com/wp-content/uploads/2011/8/pgtune-4.png?resize=543%2C343" alt="pgtune4" data-recalc-dims="1" /></li>
</ol>
</li>
<li>To put the line items in the same places as the defaults, you need to visually highlight and then yank one line (or part of one line) at a time (just like you did to get the lines here).</li>
<li>While staying in command mode, type a forward slash and the first couple of words of the line you are searching for<br />
/max_connections<br />
vi will move you to the top of the file and search for the string you entered.</li>
<li>Position your cursor on the line underneath the existing line and<br />
&lt;Shift&gt;P to “put” the line in right there.</li>
<li>If the line you are replacing has a pound sign “#” at the beginning, it means that it was not a live directive. If it doesn&#8217;t have a “#” sign at the front,
<ol class="withromanu">
<li>Mash &lt;i&gt; to go into insert mode</li>
<li>Position the cursor at the left end of the line and put in the “#” sign<br />
<img class="alignnone" title="pgtune5" src="http://i0.wp.com/sourcefreedom.com/wp-content/uploads/2011/8/pgtune-5.png?resize=562%2C347" alt="pgtune5" data-recalc-dims="1" /></li>
</ol>
</li>
<li>&lt;Esc&gt; to go back to command mode, and</li>
<li>&lt;Shift&gt;G to get back to the bottom of the document</li>
<li>Mash “:w” to save the change. “:wq” dumps you out of vi, and that can be confusing.</li>
<li><code>^A</code> to go back to the first screen</li>
<li>If, when you get back to the first screen, vi is still open and showing you the pgtune file, Hit :wq to exit the file.<br />
<img class="alignnone" title="pgtune6" src="http://i1.wp.com/sourcefreedom.com/wp-content/uploads/2011/8/pgtune-6.png?resize=442%2C147" alt="pgtune6" data-recalc-dims="1" /></li>
<li><code># /etc/init.d/postgresql restart</code><br />
If there is an error, it will probably be about shmmax. In that case, jump to the section about setting the kernel.shmmax to a larger size</li>
<li>If there is no problem starting PostgreSQL, Go back to Direction 3 above and repeat until done.</li>
<li>If there is an error, it will probably be about shmmax. In that case, jump to the section about setting the kernel.shmmax to a larger size.<img class="alignnone" title="pgtune7" src="http://i2.wp.com/sourcefreedom.com/wp-content/uploads/2011/8/pgtune-7.png?resize=603%2C382" alt="pgtune7" data-recalc-dims="1" /></li>
</ol>
<h2>Shmmax!</h2>
<p>To adjust the shmmax – to at least what the system says you need after tuning the database.</p>
<p><code># sysctl -w kernel.shmmax=&lt;something bigger than the number the postgresql.conf error shows&gt;</code><br />
For instance<br />
<code># sysctl -w kernel.shmmax=1102069760</code><br />
<img class="alignnone" title="pgtune8" src="http://i2.wp.com/sourcefreedom.com/wp-content/uploads/2011/8/pgtune-8.png?resize=565%2C203" alt="pgtune8" data-recalc-dims="1" /><br />
If the error shows up again, look at the number it is looking for and reset kernel.shmmax to that number.<br />
# sysctl -w kernel.shmmax=1110401024 (happened when increasing wal_buffers)</p>
<h2>Close out screen</h2>
<ol class="arabic">
<li>The screen you were on, at the end is the one where you were restarting the PostgreSQL server. If you are still on your open vi session, mash “:wq!” to force a save and a quit to get you out of vi.</li>
<li>Type exit on the command line. The screen you are on will close.</li>
<li>Type exit again. Screen will tell you it is terminating</li>
<li>Type exit again, to end the root session</li>
<li>Type exit again, and (probably)
<ol class="withromanu">
<li>the ssh session will end, if you are shelled into the server from a remote host.</li>
<li>the system will log you out, if you are logged into the command line locally (runlevel 3)</li>
<li>or the terminal window will close, if you are using the terminal application on the server&#8217;s graphic user interface</li>
</ol>
</li>
</ol>
<p>One interesting note about screen: If you are used to being able to use your up-cursor to scroll back through your commands, you will discover that what you do in screen remains in screen. That history will be unavailable once you end your screen session.</p>
]]></content:encoded>
			<wfw:commentRss>http://sourcefreedom.com/tuning-postgresql-9-0-with-pgtune/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Updating to Postgresql-9.0 from Postgresql-8.4</title>
		<link>http://sourcefreedom.com/updating-to-postgresql-9-0-from-postgresql-8-4/</link>
		<comments>http://sourcefreedom.com/updating-to-postgresql-9-0-from-postgresql-8-4/#comments</comments>
		<pubDate>Sun, 28 Aug 2011 17:32:23 +0000</pubDate>
		<dc:creator>Wolf Halton</dc:creator>
				<category><![CDATA[PostgreSQL]]></category>

		<guid isPermaLink="false">http://sourcefreedom.com/?p=211</guid>
		<description><![CDATA[Upgrading PostgreSQL-8.4 to PostgreSQL-9.0 on Ubuntu 10.04 Wolf Halton 8/17/2011 This is something I was working on, on our Ubuntu 10.4LTS servers.  Since I had several to do, I thought it would be fun to add it to the Evergreen-ILS wiki and also to put it here with a little more detail.  The project wikis [...]]]></description>
				<content:encoded><![CDATA[<h3><span style="font-size: small;">Upgrading PostgreSQL-8.4 to PostgreSQL-9.0 on Ubuntu 10.04</span></h3>
<p><span style="font-size: small;">Wolf Halton 8/17/2011</span></p>
<p>This is something I was working on, on our Ubuntu 10.4LTS servers.  Since I had several to do, I thought it would be fun to add it to the Evergreen-ILS wiki and also to put it here with a little more detail.  The project wikis are likely to be places where the readers are more used to working with the project.  This is less a place for the experienced and more for those who are thinking about doing something with Evergreen-ILS.  Since there is a lot from the wiki page, from before I started updating it, I am including that page link here.</p>
<p><span style="font-size: small;">http://evergreen-ils.org/dokuwiki/doku.php?id=upgrading_postgresql_8-4_to_postgresql_9.0_on_ubuntu_10.04</span><br />
<span id="more-211"></span><br />
This is not a thing that you will have to do forever, but when you update your PostgreSQL 8.4 databases to PostgreSQL 9.0 You can&#8217;t just<br />
<code> sudo aptitude install postgresql-9.0</code><br />
as your database will be hosed during the process of upgrading to a major revision like this. You will probably not have to go through all this drama when moving from 8.3 to 8.4, or from 9.0 to 9.6 (when there is a Postgresql-9.6) but it probably comes down to how lucky you feel. I find backing up databases always is worth the effort.</p>
<p><span style="font-size: small;">Systems Administration</span></p>
<ol>
<li>Generally when I am going to be bouncing in and out of a lot of system-user accounts, I start by becoming root:<code>sudo -i # </code>This command makes you the root user (because no user is specified in the command) and logs you in as if you were that user logging into a runlevel 3 session.  This is roughly equivalent to<code>sudo su -</code> # which switches the user to root and adds root&#8217;s environmental $PATH.  What&#8217;s good about it is that since root&#8217;s path includes directories that are not in an average user&#8217;s path, it is easier to use some tools and commands.  In some cases, missing the environment variable means 3rd-party scripts just won&#8217;t work.  I use <code>sudo -i</code> because the <code>"-"</code> in <code>"sudo su -</code>&#8221; is easy to forget.When the instructions say to act as user postgres, since you are already root (who can become any user without knowing their password) you just type<code>su - postgres</code>When you are done &#8220;being&#8221; that user, just type
<p><code>exit</code></p>
<p>and you will be root again.</li>
<li><span style="font-size: small;"><span style="font-size: small;">Stop Evergreen and disconnect clients from database. When you stop Evergreen, the clients will be disconnected automatically, in an abrupt way. It might be better to disconnect the clients first, and then after the users are properly cleared off and their changes saved, stop Evergreen.</span></span>As postgres user:<code>postgres=# SELECT procpid, (SELECT pg_terminate_backend(procpid)) as killed from pg_stat_activity<br />
</code></li>
<li><span style="font-size: small;"><span style="font-size: small;">Add python-software-properties</span></span><code>sudo apt-get install python-software-properties</code></li>
<li><span style="font-size: small;">Add the backport repository to your repository sources list:</span>
<pre><code><span style="font-size: small;">sudo add-apt-repository ppa:pitti/postgresql</span></code></pre>
</li>
<li><span style="font-size: small;">Update the sources list on your server.</span>
<pre><code> </code>
<code><span style="font-size: small;">apt-get update</span></code></pre>
</li>
<li><code><code><span style="font-size: small;">Check that you are getting all your databases</span></code></code><br />
psqlpostgres # \l+#that is a lower-case L, and the plus sign gives you extended information about the databases you are running.</li>
<li><span style="font-size: small;">As the </span><code><span style="font-size: small;">postgres</span></code><span style="font-size: small;"> user, backup your PostgreSQL databases.</span>
<pre><code> </code>
<code><span style="font-size: small;">pg_dumpall &gt; data.sql # This is the simplest way to get everything # or individually.. pg_dump -U username -W database_name &gt; db.sql # for instance.. pg_dump -U evergreen -W evergreen &gt; evergreen.sql pg_dump -U rsyslog -W Syslog &gt; Syslog.sql #and so on</span></code></pre>
</li>
<li><span style="font-size: small;">As </span><code><span style="font-size: small;">root</span></code><span style="font-size: small;">, remove PostgreSQL 8.4 and install 9.0.</span>
<pre><code> </code>
<code><span style="font-size: small;">aptitude purge postgresql-8.4</span></code>
<code><span style="font-size: small;">aptitude install postgresql-9.0 postgresql-client-9.0 postgresql-contrib-9.0 postgresql-plperl-9.0</span></code></pre>
</li>
<li><span style="font-size: small;">as the </span><code><span style="font-size: small;">postgres</span></code><span style="font-size: small;"> user, recreate empty evergreen databases with required language supports.</span><span style="font-size: small;">If you do not have Evergreen-ils on the system yet, you can skip this step and go on to step 9.</span>
<pre><code><span style="font-size: small;">dropdb evergreen</span></code>
<code><span style="font-size: small;">createdb -T template0 --lc-ctype=C --lc-collate=C -E UNICODE evergreen</span></code>
<code><span style="font-size: small;">createlang plperl evergreen</span></code>
<code><span style="font-size: small;">createlang plperlu evergreen</span></code>
<code><span style="font-size: small;">createlang plpgsql evergreen</span></code>
<code><span style="font-size: small;">psql -f /usr/share/postgresql/9.0/contrib/tablefunc.sql evergreen</span></code>
<code><span style="font-size: small;">psql -f /usr/share/postgresql/9.0/contrib/tsearch2.sql evergreen</span></code>
<code><span style="font-size: small;">psql -f /usr/share/postgresql/9.0/contrib/pgxml.sql evergreen</span></code></pre>
</li>
<li><span style="font-size: small;">Update the 8.4 cluster (with evergreen database) to 9.0. For this to work properly, and not get the error “Target already exists 9.0 main,” you will need to move(rename) or delete the following directory:</span>
<pre><code><span style="font-size: small;">/var/lib/postgresql/9.0/main</span></code></pre>
<p><span style="font-size: small;">and</span></p>
<pre><code><span style="font-size: small;">/etc/postgresql/9.0/main</span></code></pre>
<p><code><span style="font-family: Times New Roman,serif;"><span style="font-size: small;">The rationale for moving(renaming) rather than straight-out delete is you may well discover that your pg_hba.conf file is empty of all your changes when you complete the pg_updatecluster.</span></span></code></p>
<p>As the <code><span style="font-family: Courier New,monospace;"><span style="font-size: small;">root</span></span></code><code><span style="font-family: Times New Roman,serif;"><span style="font-size: small;"> user:</span></span></code></p>
<p><code><span style="font-family: Courier New,monospace;"><span style="font-size: small;">sudo mv /var/lib/postgresql/9.0/main /var/lib/postgresql/9.0/oldmain</span></span></code></p>
<p>sudo mv /etc/postgresql/9.0/main /etc/postgresql/oldmain<code></code></p>
<p>You may need to do the following command as <code><span style="font-family: Courier New,monospace;"><span style="font-size: small;">root</span></span></code><code><span style="font-family: Times New Roman,serif;"><span style="font-size: small;">, as it is required to write into /etc/postgresql which is owned by </span></span></code><code><span style="font-family: Courier New,monospace;"><span style="font-size: small;">root</span></span></code></p>
<pre><code> </code>
<code><span style="font-size: small;">pg_upgradecluster 8.4 main</span></code></pre>
</li>
<li><span style="font-size: small;">as the </span><code><span style="font-size: small;">postgres</span></code><span style="font-size: small;"> user, load data from backup into PostgreSQL 9.0.</span>
<pre><code> </code>
<code><span style="font-size: small;">psql &lt; data.sql # If you are updating specific databases... psql -U username -W database &lt; db.sql </span></code></pre>
</li>
<li><span style="font-size: small;">Restart Evergreen and Apache.</span></li>
<li><span style="font-size: small;">Test by logging into psql, checking the postgreSQL version and running a simple SELECT query.</span>
<pre><code> </code>
<code><span style="font-size: small;">psql -U evergreen </span></code>
<code><span style="font-size: small;">evergreen=# select version();</span></code>
<code><span style="font-size: small;">evergreen=# select count(*) from biblio.record_entry;</span></code></pre>
</li>
<li><code><span style="font-family: Times New Roman,serif;">Check pg_hba.conf and to make sure your configurations are right and the database is allowing connections from the machines, IP addresses or IP ranges you expect, and If everything is working properly, and postgresql.conf to make sure your postgresql server is listening on the right ports. If everything is communicating properly, delete<br />
</span></code><code><span style="font-size: small;">/var/lib/postgresql/8.4/main, </span></code><code><span style="font-size: small;">/etc/postgresql/8.4/main<br />
and<br />
/var/lib/postgresql/9.0/oldmain, and <code></code><code>/etc/postgresql/9.0/oldmain</code><br />
</span></code></li>
</ol>
<p>Thanks again to the great people at the Evergreen-ILS project</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://sourcefreedom.com/updating-to-postgresql-9-0-from-postgresql-8-4/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installing OpenSRF for Evergreen-ILS</title>
		<link>http://sourcefreedom.com/installing-opensrf-for-evergreen-ils/</link>
		<comments>http://sourcefreedom.com/installing-opensrf-for-evergreen-ils/#comments</comments>
		<pubDate>Thu, 14 Jul 2011 21:47:38 +0000</pubDate>
		<dc:creator>Wolf Halton</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open-Source Projects]]></category>
		<category><![CDATA[evergreen-ils]]></category>
		<category><![CDATA[opensrf]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://sourcefreedom.com/?p=206</guid>
		<description><![CDATA[I am installing Evergreen-ils and getting OpenSRF installed is the second step in the journey. The Evergreen Project develops an open source ILS (integrated library system) used by approximately 800 libraries.  The software, also called Evergreen, is used by libraries to provide their public catalog interface as well as to manage back-of-house operations such as [...]]]></description>
				<content:encoded><![CDATA[<p>I am installing Evergreen-ils and getting OpenSRF installed is the second step in the journey.</p>
<blockquote><p>The Evergreen Project develops an open source ILS (integrated library system) used by approximately 800 libraries.  The software, also called Evergreen, is used by libraries to provide their public catalog interface as well as to manage back-of-house operations such as circulation (checkouts and checkins), acquisition of library materials, and (particularly in the case of Evergreen) sharing resources among groups of libraries.</p>
<p><span id="more-206"></span></p>
<p>The Evergreen Project was initiated by the Georgia Public Library System in 2006 to serve their need for a scalable catalog shared by (as of now) approximately 250 public libraries in the state of Georgia.  After Evergreen was released, it has since been adopted by a number of library consortia in the US and Canada as well as various individual libraries, and has started being adopted by libraries outside of North America.</p></blockquote>
<p>This is a work in progress, but here is the saga so far:</p>
<p>Notes: Where I am using passwords, I will instead use the convention of &lt;secret&gt;, so instead of saying “My password is T^T87uugf7h,” I will say “My password is &lt;secret&gt;.”  Things behind a “#” sign are comments – either comments in the files themselves or notes to my readers</p>
<p>&nbsp;</p>
<p>#########<br />
# openSRF<br />
#########<br />
Evergreen install<br />
As the root user, add the opensrf user. We set the default shell for the new user to /bin/bash to inherit a reasonable environment:<br />
useradd -m -s /bin/bash opensrf       #</p>
<p>passwd opensrf<br />
&lt;secret&gt;<br />
As the opensrf user, download and extract the source files for OpenSRF 2.0.0:<br />
wget http://evergreen-ils.org/downloads/opensrf-2.0.0.tar.gz<br />
tar xzf opensrf-2.0.0.tar.gz<br />
A new directory opensrf-2.0.0 is created.<br />
As the root user, install the software prerequisites using the automatic prerequisite installer. Replace &lt;distribution&gt; below with the following value for your distribution:<br />
debian-lenny for Debian Lenny (5.0)<br />
debian-squeeze for Debian Squeeze (6.0)<br />
fedora13 for Fedora 13<br />
ubuntu-hardy for Ubuntu Hardy Heron (8.04)<br />
ubuntu-lucid for Ubuntu Lucid Lynx (10.04)<br />
centos for CentOS 5<br />
rhel for Red Hat Enterprise Linux 5<br />
aptitude install make<br />
cd /path/to/OpenSRF<br />
make -f src/extras/Makefile.install &lt;distribution&gt;</p>
<p># This didn&#8217;t work for me, so I went on without it.  &#8220;They probably don&#8217;t have a config for Natty,&#8221; I thought.<br />
check dependencies by going to openSRF directory, and:<br />
$ ./configure<br />
it said I was missing APXS and this was availiable in apache-prefork or apache-threaded<br />
I chose threaded<br />
# missing XMLADDID<br />
can&#8217;t find with a search of packages<br />
to add python support, which seemed useful<br />
$ ./configure &#8211;prefix=/openils &#8211;sysconfdir=/openils/conf<br />
#still missing xmlAddId<br />
sudo aptitude install xml2<br />
after some hunting around&#8230;<br />
wolf@tangle-rock:~/opensrf-2.0.0$ sudo aptitude install libxml2-dev<br />
This got me to the next deficiency..<br />
libmemcached&gt;= 0.8.0<br />
which is not in the repos under that name</p>
<p>wolf@tangle-rock:~/opensrf-2.0.0$ sudo aptitude install memcached<br />
not enough.. found a version at https://launchpad.net/libmemcached/+download<br />
cd to libmemchached directory<br />
./configure<br />
Configuration summary for libmemcached version 0.50</p>
<p>* Installation prefix:       /usr/local<br />
* System type:               pc-linux-gnu<br />
* Host CPU:                  i686<br />
* C Compiler:                gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2<br />
* Assertions enabled:        yes<br />
* Debug enabled:             no<br />
* Warnings as failure:       no</p>
<p>&#8212;<br />
success!!<br />
now to make and make install<br />
Well, there were no apparent errors.. so we move on back to openSVF and try the configure step again.</p>
<p>By the way,<br />
cd  -<br />
takes you back to the last directory you were in</p>
<p># oops, I have to config as opensrf user&#8230;<br />
# and opensrf has no rights in my home directory</p>
<p>wolf@tangle-rock:~/opensrf-2.0.0$ sudo chown -Rv opensrf *.*<br />
now when I run the configure comand it should work&#8230;</p>
<p>./configure &#8211;prefix=/openils &#8211;sysconfdir=/openils/conf &#8211;enable-python</p>
<p># ok &#8211; this failed, so I copied the content of the opensrf install folder to opensrf&#8217;s home, and changed the ownership of all to opensrf.</p>
<p>####<br />
opensrf@tangle-rock:/home/wolf/opensrf-2.0.0$ exit<br />
exit<br />
root@tangle-rock:~/opensrf-2.0.0# cd ..<br />
root@tangle-rock:~# cp -R opensrf-2.0.0/ /home/opensrf/</p>
<p>root@tangle-rock:~# su &#8211; opensrf<br />
opensrf@tangle-rock:~$ ls<br />
examples.desktop  opensrf-2.0.0</p>
<p>opensrf@tangle-rock:~$ exit<br />
logout</p>
<p>root@tangle-rock:~# cd /home/opensrf/<br />
root@tangle-rock:/home/opensrf# chown -R opensrf:opensrf opensrf-2.0.0/<br />
root@tangle-rock:/home/opensrf# ls -lR opensrf-2.0.0/  # (shows everything is changed)</p>
<p># I am using<br />
sudo bash -i<br />
# because then I don&#8217;t have to hunt all the users&#8217; passwords to suwitch to that user.</p>
<p>root@tangle-rock:/home/opensrf# su &#8211; opensrf<br />
opensrf@tangle-rock:~$ cd opensrf-2.0.0/<br />
opensrf@tangle-rock:~/opensrf-2.0.0$ ./configure &#8211;prefix=/openils &#8211;sysconfdir=/openils/conf &#8211;enable-python</p>
<p># it failed to find python setuptoold module</p>
<p>opensrf@tangle-rock:~/opensrf-2.0.0$ exit<br />
logout<br />
root@tangle-rock:/home/opensrf# aptitude install python-setuptools<br />
The following NEW packages will be installed:<br />
python-setuptools # and so on&#8230;</p>
<p>root@tangle-rock:/home/opensrf# su &#8211; opensrf<br />
opensrf@tangle-rock:~$ cd opensrf-2.0.0/<br />
opensrf@tangle-rock:~/opensrf-2.0.0$ ./configure &#8211;prefix=/openils &#8211;sysconfdir=/openils/conf &#8211;enable-python</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; Configuration options:  &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
OSRF install Java support?       no<br />
OSRF install Python support?     yes<br />
OSRF install chopchop?           no<br />
Installation directory prefix:   /openils<br />
Temporary directory:             /tmp<br />
APXS2 location:                  /usr/bin/apxs2<br />
Apache headers location:         /usr/include/apache2<br />
APR headers location:            /usr/include/apr-1.0<br />
libxml2 headers location:        /usr/include/libxml2/<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>opensrf@tangle-rock:~/opensrf-2.0.0$ make<br />
# Seems to have succeeded.  At least no errors noted at the end</p>
<p>root@tangle-rock:/home/opensrf# cd opensrf-2.0.0/<br />
root@tangle-rock:/home/opensrf/opensrf-2.0.0# make install<br />
# Cross your fingers.  We are almost halfway home.</p>
<p>ext/xmlextra.c:1:20: fatal error: Python.h: No such file or directory<br />
compilation terminated.<br />
# oops/  What now!<br />
# where is Python.h??</p>
<p># http://phpnub.blogspot.com/2011/04/resolving-python-error-pythonh-no-such.html<br />
# suggests the error can be cleared by installing python2.x-dev &#8211; so in my case it would be<br />
root@tangle-rock:/home/opensrf/opensrf-2.0.0# aptitude install python2.7-dev</p>
<p># from the wiki..<br />
# As the root user, add /openils/lib to the system dynamic library path and make your system recognize the newly installed libraries. For example, on Ubuntu or Debian you would perform the following steps:<br />
Create a file named /etc/ld.so.conf.d/osrf.conf containing the following line:<br />
/openils/lib<br />
/usr/local/lib</p>
<p>root@tangle-rock:/home/opensrf/opensrf-2.0.0# vi /etc/ld.so.conf.d/osrf.conf</p>
<p># I just copied the internal lines into the file [esc] :wq</p>
<p>root@tangle-rock:/home/opensrf/opensrf-2.0.0# ldconfig</p>
<p># ldconfig(8)                                                        ldconfig(8)<br />
#<br />
# NAME<br />
#        ldconfig &#8211; configure dynamic linker run-time bindings<br />
#<br />
# SYNOPSIS<br />
#        ldconfig [OPTION...]<br />
#<br />
# DESCRIPTION<br />
#        ldconfig  creates,  updates,  and removes the necessary links and cache (for use by the run-time linker,  ld.so)  to  the  most  recent  shared libraries  found  in  the directories specified on the command line, in the file /etc/ld.so.conf, and in the trusted directories (/usr/lib  and /lib).   ldconfig  checks the header and file names of the libraries it encounters when determining which  versions  should  have  their  links updated.  ldconfig ignores symbolic links when scanning for libraries.</p>
<p>#==============================<br />
# Define your public and private OpenSRF domains. For security purposes, OpenSRF uses Jabber domains to separate services into public and private realms.</p>
<p># Gee! I wonder if there is a jabber server on this box..<br />
root@tangle-rock:/home/opensrf/opensrf-2.0.0# aptitude install jabberd<br />
Couldn&#8217;t find package &#8220;jabberd&#8221;.  However, the following<br />
packages contain &#8220;jabberd&#8221; in their name:<br />
ejabberd jabberd2 libjabberd2-dev ejabberd-mod-shared-roster-ldap<br />
libjabberd2 jabberd14<br />
Couldn&#8217;t find package &#8220;jabberd&#8221;.  However, the following<br />
packages contain &#8220;jabberd&#8221; in their name:<br />
ejabberd jabberd2 libjabberd2-dev ejabberd-mod-shared-roster-ldap<br />
libjabberd2 jabberd14<br />
No packages will be installed, upgraded, or removed.<br />
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.<br />
Need to get 0 B of archives. After unpacking 0 B will be used.</p>
<p>root@tangle-rock:/home/opensrf/opensrf-2.0.0# aptitude install ejabberd<br />
The following NEW packages will be installed:<br />
ejabberd erlang-asn1{a} erlang-odbc{a}<br />
# and so on&#8230;</p>
<p>Here are the entries to add as root to a stock /etc/hosts file for our example domains:<br />
127.0.1.2    public.localhost    public<br />
127.0.1.3    private.localhost    private</p>
<p>root@tangle-rock:/home/opensrf/opensrf-2.0.0# vi /etc/hosts</p>
<p>127.0.0.1       tangle-rock     localhost.localdomain   localhost<br />
::1              tangle-rock     localhost6.localdomain6 localhost6<br />
127.0.1.1       tangle-rock<br />
127.0.1.2       public.localhost        public          #added 20110714<br />
127.0.1.3       private.localhost       private         #added 20110714</p>
<p>As the root user, change the ownership of the installed files to the opensrf user:<br />
chown -R opensrf:opensrf /openils</p>
<p>root@tangle-rock:/home/opensrf/opensrf-2.0.0# chown -R opensrf:opensrf /openils</p>
<p>As the root user, stop the ejabberd service:<br />
/etc/init.d/ejabberd stop<br />
root@tangle-rock:/home/opensrf/opensrf-2.0.0# service ejabberd stop<br />
Stopping jabber server: ejabberd.</p>
<p>As the root user, edit /etc/ejabberd/ejabberd.cfg to increase the default limits (meant for a small instant messaging server) to something reasonable for our use of XMPP as a message bus:<br />
Change<br />
{hosts, ["localhost"]}.<br />
to<br />
{hosts, ["localhost", "private.localhost", "public.localhost"]}.</p>
<p>Increase the maximum number of times a user can log in concurrently:<br />
Newer versions of ejabberd: {access, max_user_sessions, [{10, all}]}., then change it to {access, max_user_sessions, [{10000, all}]}. # This was what I found<br />
Older versions of ejabberd: change {max_user_sessions, 10}. to {max_user_sessions, 10000}.<br />
Change all three occurrences of max_stanza_size to 2000000.<br />
Change both occurrences of maxrate to 500000.<br />
Comment out the {mod_offline line by placing two % signs in front. # It was easier to find these occurrences in gedit than vi&#8230;</p>
<p># Still as root, restart ejabberd<br />
root@tangle-rock:/home/opensrf/opensrf-2.0.0# service ejabberd start<br />
Starting jabber server: ejabberd.<br />
root@tangle-rock:/home/opensrf/opensrf-2.0.0#</p>
<p>As the root user, register your “router” and “opensrf” ejabber users for the OpenSRF router service on each domain. The users should have different passwords on each domain. These users will correspond to your configuration in opensrf_core.xml:<br />
# Syntax for registering a user with ejabberdctl<br />
# ejabberdctl register &lt;user&gt; &lt;domain&gt; &lt;password&gt;<br />
ejabberdctl register router private.localhost &lt;secret&gt;<br />
ejabberdctl register opensrf private.localhost &lt;secret&gt;<br />
ejabberdctl register router public.localhost &lt;secret&gt;<br />
ejabberdctl register opensrf public.localhost &lt;secret&gt;</p>
<p># As the opensrf user, create the /openils/conf/opensrf_core.xml and /openils/conf/opensrf.xml configuration files from the example templates:<br />
cp /openils/conf/opensrf.xml.example /openils/conf/opensrf.xml<br />
cp /openils/conf/opensrf_core.xml.example /openils/conf/opensrf_core.xml<br />
# Edit /openils/conf/opensrf_core.xml to change the Jabber usernames and passwords as follows. I&#8217;m using XPath syntax on the left-hand side to indicate the position in the XML file:<br />
/config/opensrf/username = opensrf<br />
/config/opensrf/passwd = password for private.localhost opensrf user<br />
/config/gateway/username = opensrf<br />
/config/gateway/passwd = password for public.localhost opensrf user<br />
/config/routers/router/transport &#8211; first entry, where transport/server == public.localhost :<br />
username = router<br />
password = password for public.localhost router user<br />
/config/routers/router/transport &#8211; second entry, where transport/server == private.localhost :<br />
username = router<br />
password = password for private.localhost router user<br />
Copy /openils/conf/srfsh.xml.example to .srfsh.xml in the home directory of each user you want to use to run the srfsh command line client for testing OpenSRF, and edit .srfsh.xml as follows:<br />
domain is the router hostname (following our domain examples, private.localhost will give your srfsh access to all OpenSRF services, while public.localhost will only give you access to those OpenSRF services that are publicly exposed)<br />
username and password must match your opensrf ejabber user for the chosen domain<br />
logfile is the full path for a log file to which that user has write access<br />
&lt;?xml version=&#8221;1.0&#8243;?&gt;<br />
&lt;!&#8211; This file follows the standard bootstrap config file layout found in opensrf_core.xml &#8211;&gt;<br />
&lt;srfsh&gt;<br />
&lt;router_name&gt;router&lt;/router_name&gt;<br />
&lt;domain&gt;private.localhost&lt;/domain&gt;<br />
&lt;username&gt;opensrf&lt;/username&gt;<br />
&lt;passwd&gt;privsrf&lt;/passwd&gt;<br />
&lt;port&gt;5222&lt;/port&gt;<br />
&lt;logfile&gt;/tmp/srfsh.log&lt;/logfile&gt;<br />
&lt;loglevel&gt;3&lt;/loglevel&gt;<br />
&lt;/srfsh&gt;</p>
<p>As the opensrf user, set the path of the opensrf user&#8217;s .bashrc file:<br />
echo &#8220;export PATH=/openils/bin:\$PATH&#8221; &gt;&gt; ~/.bashrc<br />
exit</p>
<p>opensrf@tangle-rock:~$ echo &#8220;export PATH=/openils/bin:\$PATH&#8221; &gt;&gt; ~/.bashrc</p>
<p>Before starting OpenSRF, ensure that your Jabber and memcached daemons are running. As the root user:<br />
/etc/init.d/ejabberd start<br />
/etc/init.d/memcached start</p>
<p>root@tangle-rock:/home/opensrf/opensrf-2.0.0# /etc/init.d/ejabberd restart<br />
Restarting jabber server: ejabberd.<br />
root@tangle-rock:/home/opensrf/opensrf-2.0.0# /etc/init.d/memcached restart<br />
Restarting memcached: memcached.<br />
# Restart has less potential to damage anything, though it will drop active connections just like running start on a running service.</p>
<p>Starting OpenSRF with the start_all option starts the OpenSRF router, Perl services, and C services. As the opensrf user, start OpenSRF (NOTE: use the -l flag only if you wish to force the hostname for the &lt;hosts&gt; section in opensrf.xml to be localhost):<br />
osrf_ctl.sh -l -a start_all</p>
<p>osrf_ctl.sh -a start_all</p>
<p># Failed to start<br />
opensrf@tangle-rock:~/opensrf-2.0.0$ osrf_ctl.sh -a start_all<br />
Starting OpenSRF Router<br />
Starting OpenSRF Perl<br />
Can&#8217;t locate Unix/Syslog.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /usr/local/share/perl/5.10.1/OpenSRF/Utils/Logger.pm line 6.<br />
BEGIN failed&#8211;compilation aborted at /usr/local/share/perl/5.10.1/OpenSRF/Utils/Logger.pm line 6.<br />
Compilation failed in require at /openils/bin/opensrf-perl.pl line 20.<br />
BEGIN failed&#8211;compilation aborted at /openils/bin/opensrf-perl.pl line 20.</p>
<p># Suggestion at http://lists.clug.org.za/pipermail/clug-tech/2007-December/039222.html to handle failed Perl issue</p>
<p>opensrf@tangle-rock:~/opensrf-2.0.0$ apt-cache search syslog | grep perl<br />
libnet-server-perl &#8211; An extensible, general perl server engine<br />
libunix-syslog-perl &#8211; Perl interface to the UNIX syslog(3) calls<br />
libgetargs-long-perl &#8211; Perl module to parse long function arguments<br />
liblog-dispatchouli-perl &#8211; simple wrapper around Log::Dispatch<br />
liblogger-syslog-perl &#8211; Logger::Syslog &#8212; an simple wrapper over Sys::Syslog for Perl<br />
libparse-syslog-perl &#8211; Perl module for parsing syslog entries<br />
libsys-syslog-perl &#8211; Perl interface to the UNIX syslog(3) calls<br />
perl &#8211; Larry Wall&#8217;s Practical Extraction and Report Language<br />
opensrf@tangle-rock:~/opensrf-2.0.0$</p>
<p>root@tangle-rock:/home/opensrf/opensrf-2.0.0# aptitude install perl libnet-server-perl libunix-syslog-perl libgetargs-long-perl liblog-dispatchouli-perl liblogger-syslog-perl libparse-syslog-perl libsys-syslog-perl<br />
The following NEW packages will be installed:<br />
libcommon-sense-perl{a} libdata-optlist-perl{a} libgetargs-long-perl<br />
libio-multiplex-perl{a} libjson-perl{a} libjson-xs-perl{a}<br />
liblog-agent-perl{a} liblog-dispatch-array-perl{a}<br />
liblog-dispatch-perl{a} liblog-dispatchouli-perl liblogger-syslog-perl<br />
libnet-cidr-perl{a} libnet-server-perl libparams-util-perl{a}<br />
libparams-validate-perl{a} libparse-syslog-perl libstring-flogger-perl{a}<br />
libsub-exporter-perl{a} libsub-install-perl{a} libsys-syslog-perl<br />
libtest-deep-perl{a} libtry-tiny-perl{a} libunix-syslog-perl<br />
0 packages upgraded, 23 newly installed, 0 to remove and 0 not upgraded.<br />
Need to get 933 kB of archives. After unpacking 3,826 kB will be used.<br />
Do you want to continue? [Y/n/?]<br />
# install follows.</p>
<p># Now the failure is<br />
Can&#8217;t locate UNIVERSAL/require.pm in @INC &#8230;.<br />
suggestion from</p>
<p>http://comments.gmane.org/gmane.education.libraries.open-ils.general/4009</p>
<p>&#8220;See if UNIVERSAL is present<br />
perl -MUNIVERSAL::require -e 1</p>
<p># This has same error<br />
so<br />
apt-get install libuniversal-require-perl</p>
<p># Now we can all wonder why something called &#8220;universal&#8221; is not installed with the big perl install I just did.<br />
# error: Can&#8217;t locate DateTime.pm in @INC<br />
# Help from http://ubuntuforums.org/archive/index.php/t-1279901.html<br />
/usr/bin/perl install-module.pl List::MoreUtils  # Failed<br />
apt-get install libpq-dev        # already newest version<br />
# Since I couldn&#8217;t exactly find the right datatime modulre, I just went to synaptic and searched for all perl-related stuff, and then filtered that by &#8220;date&#8217;  I am installing about 123 packages, but I am tired of hunting one at a time.</p>
<p># Finally, it started right up &#8211; automagically</p>
<p>opensrf@tangle-rock:~/opensrf-2.0.0$ osrf_ctl.sh -a start_allOpenSRF Router already started : 9608 9609<br />
Starting OpenSRF Perl<br />
* starting all services for tangle-rock.TLC<br />
Starting OpenSRF C (host=tangle-rock.TLC)</p>
<p># Testing openSRF<br />
# Once you have installed and started OpenSRF, test your connection to OpenSRF via srfsh:<br />
Start srfsh and try calling the add method on the OpenSRF math service:<br />
/openils/bin/srfsh<br />
srfsh#  request opensrf.math add 2 2<br />
# Fails!<br />
opensrf@tangle-rock:~/opensrf-2.0.0$ /openils/bin/srfsh<br />
srfsh# request opensrf.math add 2 2</p>
<blockquote><p>Received no data from server</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
Request Time in seconds: 0.003072<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p></blockquote>
<p>srfsh# exit<br />
opensrf@tangle-rock:~/opensrf-2.0.0$</p>
<p># The evergreen folks say &#8220;Don&#8217;t Panic! gather log files and such from /openils/var/log and the configuration files and send them to the support lists.</p>
<p>#  That is where this is all going now.</p>
]]></content:encoded>
			<wfw:commentRss>http://sourcefreedom.com/installing-opensrf-for-evergreen-ils/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Installing PostgreSQL 8.4 on Ubuntu 11.04</title>
		<link>http://sourcefreedom.com/installing-postgresql-8-4-on-ubuntu-11-04/</link>
		<comments>http://sourcefreedom.com/installing-postgresql-8-4-on-ubuntu-11-04/#comments</comments>
		<pubDate>Thu, 14 Jul 2011 21:25:42 +0000</pubDate>
		<dc:creator>Wolf Halton</dc:creator>
				<category><![CDATA[Open-Source Projects]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[Website Development]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://sourcefreedom.com/?p=201</guid>
		<description><![CDATA[I am working on getting evergreen-ils running on a test server for later use. The Evergreen Project develops an open source ILS (integrated library system) used by approximately 800 libraries.  The software, also called Evergreen, is used by libraries to provide their public catalog interface as well as to manage back-of-house operations such as circulation [...]]]></description>
				<content:encoded><![CDATA[<p>I am working on getting evergreen-ils running on a test server for later use.</p>
<blockquote><p>The Evergreen Project develops an open source ILS (integrated library system) used by approximately 800 libraries.  The software, also called Evergreen, is used by libraries to provide their public catalog interface as well as to manage back-of-house operations such as circulation (checkouts and checkins), acquisition of library materials, and (particularly in the case of Evergreen) sharing resources among groups of libraries.<span id="more-201"></span></p>
<p>The Evergreen Project was initiated by the Georgia Public Library System in 2006 to serve their need for a scalable catalog shared by (as of now) approximately 250 public libraries in the state of Georgia.  After Evergreen was released, it has since been adopted by a number of library consortia in the US and Canada as well as various individual libraries, and has started being adopted by libraries outside of North America.</p>
<p>http://open-ils.org/about.php</p></blockquote>
<p>To get Evergreen Running, I have to do a lot of work on my server.  Since I am taking notes as I go, here is the transcript of those notes.  Where I am using passwords, I will instead use the convention of &lt;secret&gt;, so instead of saying &#8220;My password is T^T87uugf7h,&#8221; I will say &#8220;My password is &lt;secret&gt;.&#8221;  Things behind a &#8220;#&#8221; sign are comments &#8211; either comments in the files themselves or notes to my readers</p>
<p>The first thing I had to do is set up postgreSQL.  I had it set up a while ago, but I couldn&#8217;t remember any of the configurations I had done or the passwords or the users, so it seemed like the best solution was to completely remove it and start again.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>######################<br />
# Configure PostgreSQL<br />
######################<br />
With help from:</p>
<p>http://socrateos.blogspot.com/2011/07/installing-postgresql-90-on-ubuntu-1104.html</p>
<p>Completely remove Postgresql</p>
<p>Install postgresql8.4<br />
Postgresql-client<br />
Postgresql-contrib</p>
<p>==============<br />
wolf@tangle-rock:~$ psql -V<br />
psql (PostgreSQL) 8.4.8<br />
contains support for command-line editing</p>
<p>wolf@tangle-rock:~$ finger postgresql<br />
Login: postgres                   Name: PostgreSQL administrator<br />
Directory: /var/lib/postgresql          Shell: /bin/bash<br />
Never logged in.<br />
No mail.<br />
No Plan.</p>
<p>wolf@tangle-rock:~$ su postgres<br />
Password:<br />
su: Authentication failure<br />
wolf@tangle-rock:~$ sudo passwd postgres<br />
Enter new UNIX password:  &lt;secret&gt;<br />
Retype new UNIX password:<br />
passwd: password updated successfully</p>
<p>postgres@tangle-rock:/home/wolf$ psql<br />
psql (8.4.8)<br />
Type &#8220;help&#8221; for help.</p>
<p>postgres=# select version();<br />
# opens a less-like interface&#8230; (q to exit)</p>
<p>version<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
PostgreSQL 8.4.8 on i686-pc-linux-gnu, compiled by GCC gcc-4.5.real (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2, 32-bit<br />
(1 row)</p>
<p>postgres=# alter user postgres with password &#8216;&lt;secret&gt;&#8217;;<br />
ALTER ROLE<br />
postgres=# \q   # quit psql<br />
postgres@tangle-rock:/home/wolf$ exit<br />
exit<br />
wolf@tangle-rock:~$</p>
<p>6.Configure PostgreSQL Server<br />
wolf@tangle-rock:~$ cd /etc/postgresql/8.4/main/<br />
wolf@tangle-rock:/etc/postgresql/8.4/main$ ls -al<br />
total 48<br />
drwxr-xr-x 2 postgres postgres  4096 2010-12-01 17:59 .<br />
drwxr-xr-x 3 postgres postgres  4096 2010-12-01 17:59 ..<br />
-rw-r&#8211;r&#8211; 1 postgres postgres   316 2010-12-01 17:59 environment<br />
-rw-r&#8211;r&#8211; 1 postgres postgres   143 2010-12-01 17:59 pg_ctl.conf<br />
-rw-r&#8212;&#8211; 1 postgres postgres  3822 2010-12-01 17:59 pg_hba.conf<br />
-rw-r&#8212;&#8211; 1 postgres postgres  1631 2010-12-01 17:59 pg_ident.conf<br />
-rw-r&#8211;r&#8211; 1 postgres postgres 16975 2010-12-01 17:59 postgresql.conf<br />
-rw-r&#8211;r&#8211; 1 postgres postgres   378 2010-12-01 17:59 start.conf</p>
<p>wolf@tangle-rock:/etc/postgresql/8.4/main$ su postgres<br />
Password: &lt;secret&gt;<br />
postgres@tangle-rock:/etc/postgresql/8.4/main$ mkdir bak20110713<br />
postgres@tangle-rock:/etc/postgresql/8.4/main$ cp *.conf bak20110713/<br />
postgres@tangle-rock:/etc/postgresql/8.4/main$ ls bak20110713/<br />
pg_ctl.conf  pg_hba.conf  pg_ident.conf  postgresql.conf  start.conf</p>
<p>postgres@tangle-rock:/etc/postgresql/8.4/main$ vi pg_hba.conf<br />
=============<br />
# IPv4 local connections:<br />
#host    all         all         127.0.0.1/32          md5<br />
host    all         all         127.0.0.1/32          trust<br />
# IPv6 local connections:<br />
:wq</p>
<p>postgres@tangle-rock:/etc/postgresql/8.4/main$ vi postgresql.conf<br />
=============<br />
# Enabled 20110714</p>
<p>#&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
# ERROR REPORTING AND LOGGING<br />
#&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
log_destination = &#8216;stderr&#8217;</p>
<p>logging_collector = on</p>
<p>log_directory = &#8216;pg_log&#8217;<br />
log_filename = &#8216;postgresql-%Y-%m-%d_%H%M%S.log&#8217;</p>
<p>log_truncate_on_rotation = off</p>
<p>log_rotation_age = 1d</p>
<p>log_rotation_size = 10MB</p>
<p>postgres@tangle-rock:/etc/postgresql/8.4/main$ mkdir pg_log<br />
postgres@tangle-rock:/etc/postgresql/8.4/main$ # Made log directory</p>
]]></content:encoded>
			<wfw:commentRss>http://sourcefreedom.com/installing-postgresql-8-4-on-ubuntu-11-04/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
