hi Tim,<br><br>Mate you posted in your setup of Moodle:<br><br>&quot;<span><span></span></span>looks like the package already created /var/www/moodle/data with 
appropriate permissions so above was not necessary&quot;<br><br>It&#39;s really important for security that the moodledata directory NOT be in the webroot like this, otherwise Moodle&#39;s roles &amp; permissions system doesn&#39;t control access to any course files &amp; materials - they all become public.<br>
Make sure you&#39;re using something like that folder you created earlier in your procedure (/var/moodledata).<br><br>Myles C.<br><br>Myles S Carrick<br>Software Services<br>Sydney Centre for Innovation in Learning (SCIL)<br>
<br><br><div class="gmail_quote">2008/6/25 Tim Moody &lt;<a href="mailto:timmoody@sympatico.ca">timmoody@sympatico.ca</a>&gt;:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">






<div bgcolor="#ffffff">
<div><font size="2" face="Arial">Hi Tony,</font></div>
<div><font size="2" face="Arial"></font>&nbsp;</div>
<div><font size="2" face="Arial">Here are my notes minus a lot of wrong turns.&nbsp; 
The part that probably needs Martin&#39;s help is PAM SOTP.&nbsp; I made postgresql 
trusted because the default ident setting did not work.</font></div>
<div><font size="2" face="Arial"></font>&nbsp;</div>
<div>
<h3 style="margin: 12pt 0in 3pt;"><font face="Arial">Postgre</font></h3>
<p style="margin: 0in 0in 0pt 0.5in;"><span style="font-family: Symbol;">·<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>Find and run PostgreSQL</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>psql (default install) is not postgresql-server; it's just the 
client</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>Yum install postgresql-server (8.2.5-1.fc7)</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>service postgresql initdb – OK</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>service postgresql start – OK</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>psql – not work as root</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>su – postgres</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>psql – connects</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>\l shows postgres, template0, template1 databases</p>
<h3 style="margin: 12pt 0in 3pt;"><font face="Arial">PHP &amp; Libs</font></h3>
<p style="margin: 0in 0in 0pt 0.5in;"><span style="font-family: Symbol;">·<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>yum install php – installed: php.i386 0:5.2.4-1.fc7 (surprised it 
is not in default install)</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>Make sure php.conf added to /etc/httpd/conf.d</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>/etc/php.ini now found</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>service httpd restart</p>
<p style="margin: 0in 0in 0pt 0.5in;"><span style="font-family: Symbol;">·<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>Test PHP</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>Create php script as follows and execute; it should dump a lot 
about your php environment</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>&lt;?php</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>phpinfo();</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>?&gt;</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>In my environment this is in /var/www/html/timtest/ =<span>&nbsp; </span><a href="http://192.168.0.160/timtest/info.php" target="_blank">http://192.168.0.160/timtest/info.php</a></p>
<p style="margin: 0in 0in 0pt 0.5in;"><span style="font-family: Symbol;">·<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>yum install postgresql-python</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>Installed: postgresql-python.i386 0:8.2.5-1.fc7</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>Dependency Installed: mx.i386 0:2.0.6-3 </p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>Don't know what this is for</p>
<p style="margin: 0in 0in 0pt 0.5in;"><span style="font-family: Symbol;">·<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>yum install php-pgsql</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>Installed: php-pgsql.i386 0:5.2.4-1.fc7</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>Service httpd restart</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>Phpinfo now shows pgsql</p>
<p style="margin: 0in 0in 0pt 0.5in;"><span style="font-family: Symbol;">·<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>Test php access to postgre</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>create database timdb;</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>\c timdb</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>create table test (text varchar(10), num decimal);</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>insert into test values (&#39;abc&#39;, 123);</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>select * from test;</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>run testpg.php:</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>&lt;?php</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>// Connecting, selecting database</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>$dbconn = pg_connect(&quot;host=localhost port = 5432 dbname=timdb 
user=postgres password=xxx&quot;)</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;</span>or 
die(&#39;Could not connect: &#39; . pg_last_error());</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>&nbsp;</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>// Performing SQL query</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>$query = &#39;SELECT * FROM test&#39;;</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>$result = pg_query($query) or die(&#39;Query failed: &#39; . 
pg_last_error());</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>&nbsp;</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>// Printing results in HTML</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>echo &quot;&lt;table&gt;\n&quot;;</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>while ($line = pg_fetch_array($result, null, PGSQL_ASSOC)) {</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;</span>echo 
&quot;\t&lt;tr&gt;\n&quot;;</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;</span>foreach ($line as 
$col_value) {</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>echo 
&quot;\t\t&lt;td&gt;$col_value&lt;/td&gt;\n&quot;;</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;</span>}</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span><span>&nbsp;&nbsp;&nbsp;&nbsp;</span>echo 
&quot;\t&lt;/tr&gt;\n&quot;;</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>}</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>echo &quot;&lt;/table&gt;\n&quot;;</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>&nbsp;</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>// Free resultset</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>pg_free_result($result);</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>&nbsp;</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>// Closing connection</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>pg_close($dbconn);</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>?&gt;</p>
<p style="margin: 0in 0in 0pt 0.5in;"><span style="font-family: Symbol;">·<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>Figure out why php won't connect to postgresql</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>can not connect and no error (so php not working)</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>log is in /var/lib/pgsql/data/pg_log</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>LOG:<span>&nbsp; </span>could not 
connect to Ident server at address &quot;<a href="http://127.0.0.1" target="_blank">127.0.0.1</a>&quot;, port 113: Connection refused</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>FATAL:<span>&nbsp; </span>Ident 
authentication failed for user &quot;postgres&quot;</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>pg_hba.conf has sameuser which is supposed to mean that the linux 
and db user names are the same</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>Steve &lt;ksobrien AT <a href="http://pcisys.net" target="_blank">pcisys.net</a>&gt;04 Jan 2006 0:50:43</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>Even though you add wide-open access permission in the pg_hba.conf 
file like this:<span>&nbsp; </span>host all all 
<a href="http://127.0.0.1/32" target="_blank">127.0.0.1/32</a><span>&nbsp; </span>trust</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>You will still be unable to connect to the database with a PHP (or 
whatever language) program and an Apache httpd server unless you add an &quot;apache&quot; 
(or whatever user your httpd daemon is running as) user to PostgreSQL thus:</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>su - postgres</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>createuser apache</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>Of course, be sure you GRANT SELECT ON table TO APACHE; to give 
the apache user permission to actually read data.</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>I assigned pw postgres to user postgres</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>Modified /var/lib/pgsql/data/ pg_hba.conf to change host<span>&nbsp;&nbsp;&nbsp; </span>all<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span>all<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span><a href="http://127.0.0.1/32" target="_blank">127.0.0.1/32</a><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span>ident sameuser to </p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>host<span>&nbsp;&nbsp;&nbsp; 
</span>all<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span>all<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span><a href="http://127.0.0.1/32" target="_blank">127.0.0.1/32</a><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span>trust</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>run testpg.php – works</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>BOTTOM LINE – I could only get this to work if I used trusted 
mode.<span>&nbsp; </span>I know Martin specified PAM 
SOTP, but I don't know how this works</p>
<h3 style="margin: 12pt 0in 3pt;"><font face="Arial">Moodle</font></h3>
<p style="margin: 0in 0in 0pt 0.5in;"><span style="font-family: Symbol;">·<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>Install Moodle</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span><a href="http://docs.moodle.org/en/Step-by-step_Install_Guide_for_Ubuntu#Install_Postgresql_.28skip_MySQL.29" target="_blank">http://docs.moodle.org/en/Step-by-step_Install_Guide_for_Ubuntu#Install_Postgresql_.28skip_MySQL.29</a></p>

<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span><a href="http://docs.moodle.org/en/Installing_Moodle#Creating_an_empty_database" target="_blank">http://docs.moodle.org/en/Installing_Moodle#Creating_an_empty_database</a></p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span># su - postgres</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span><span>&nbsp;&nbsp;</span>&gt; psql -c 
&quot;create user moodleuser createdb;&quot; template1 – worked</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span><span>&nbsp;&nbsp;</span>&gt; psql -c 
&quot;create database moodle with encoding &#39;unicode&#39;;&quot; -U moodleuser template1 – 
failed on authentication (Ident authentication failed for user &quot;moodleuser&quot;)</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>createdb -E utf8 -O moodleuser moodle – worked</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span><span>&nbsp;&nbsp;</span>&gt; psql -c 
&quot;alter user moodleuser nocreatedb;&quot; template1 (alter user moodleuser 
nocreatedb;) – worked</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span><span>&nbsp;&nbsp;</span>&gt; psql -c 
&quot;alter user moodleuser with encrypted password &#39;moodle&#39;;&quot; template1 (alter user 
moodleuser with encrypted password &#39;moodle&#39;;) – worked</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span><span>&nbsp;&nbsp;</span>&gt; su - 
root</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span><span>&nbsp;&nbsp;</span># 
/etc/init.d/postgresql reload</p>
<p style="margin: 0in 0in 0pt 0.5in;"><span style="font-family: Symbol;">·<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>Finish moodle install</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>Modified /etc/php.ini according to <a href="http://docs.moodle.org/en/Installing_Moodle" target="_blank">http://docs.moodle.org/en/Installing_Moodle</a> 
(docs seem to have 0 and 1 where file has off and on; I mostly followed the 
docs, which worked.)</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>Created /var/moodledata (NOT NECESSARY)</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>chown -R nobody:apache moodledata</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>chmod -R 0770 moodledata</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>looks like the package already created /var/www/moodle/data with 
appropriate permissions so above was not necessary</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>/var/www/moodle/web/config.php has mysql as db – I changed to 
postgres</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span><a href="http://192.168.0.160/moodle/web/install.php" target="_blank"><span>&nbsp;</span>http://192.168.0.160/moodle/</a> - Error: 
Database connection failed</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>modified host, dbname, user, and password in config.php</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>now does redirect to <a href="http://localhost/moodle/admin/index.php" target="_blank">http://localhost/moodle/admin/index.php</a> 
)because wwwroot<span>&nbsp;&nbsp; </span>= 
&#39;<a href="http://localhost/moodle%27June" target="_blank">http://localhost/moodle&#39;June</a> 20, 2008</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>now <a href="http://192.168.0.160/moodle/web/install.php" target="_blank"><span>&nbsp;</span>http://192.168.0.160/moodle/</a> 
redirects to <a href="http://192.168.0.160/moodle/admin/index.php" target="_blank">http://192.168.0.160/moodle/admin/index.php</a> 
- gives error DB Type: postgres not supported by XMLDDB</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>click continue – repeats error</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>N.B&gt; changed dbtype to &#39;postgres7&#39; (!?) – now gets past error 
(didn't read fine print)</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>Database was successfully upgraded</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>(should have taken unattended installation)</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>workshop tables have been set up correctly</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>truefalse tables have been set up correctly</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>Database was successfully upgraded (x2)</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>Various tables</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>Create admin (admin/moodle)</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>Seems to be installed and running.</p>
<p style="margin: 0in 0in 0pt 0.5in;"><span style="font-family: Symbol;">·<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>Set up cron</p>
<p style="margin: 0in 0in 0pt 0.75in;"><span>o<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</span></span>This still needs to be done</p>
<p style="margin: 0in 0in 0pt 0.75in;">&nbsp;</p></div>
<div><font size="2" face="Arial"></font>&nbsp;</div>
<div><font size="2" face="Arial">Tim</font></div>
<div><font size="2" face="Arial"></font>&nbsp;</div>
<blockquote style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">
  <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">----- Original Message ----- </div>
  <div style="background: rgb(228, 228, 228) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
<b>From:</b> 
  <a title="tpearson@us.ibm.com" href="mailto:tpearson@us.ibm.com" target="_blank">Tony 
  Pearson</a> </div>
  <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>To:</b> <a title="timmoody@sympatico.ca" href="mailto:timmoody@sympatico.ca" target="_blank">Tim Moody</a> </div>

  <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Sent:</b> Tuesday, June 24, 2008 1:08 
PM</div>
  <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Subject:</b> PostgreSQL + Moodle</div>

  <div><br></div><br><tt><font size="2">Tim,</font></tt> <br><tt><font size="2">Please share me your procedures. &nbsp;If you have written down any 
  notes, or have any &quot;gotcha&#39;s&quot; I should try to avoid, please provide me. 
  &nbsp;I will be doing this week to send the computer off this 
  Monday.</font></tt> <br><br><br><tt><font size="2">From: &quot;Tim Moody&quot; &lt;<a href="mailto:timmoody@sympatico.ca" target="_blank">timmoody@sympatico.ca</a>&gt;<br>Subject: 
  Re: [Server-devel] XS SW<br>To: &lt;<a href="mailto:server-devel@lists.laptop.org" target="_blank">server-devel@lists.laptop.org</a>&gt;<br>Message-ID: 
  &lt;000701c8d58e$4f981b60$0b00a8c0@saturn&gt;<br>Content-Type: text/plain; 
  format=flowed; charset=&quot;iso-8859-1&quot;;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
  &nbsp; &nbsp; &nbsp; reply-type=original<br><br>Got throught the moodle + 
  postgre install. &nbsp;I&#39;ll now play with setting up <br>some courses and 
  users.<br><br>I cheated on the authentication as I don&#39;t know how PAM SOTP 
  works; I just <br>set the authentication to trusted.<br></font></tt><font size="2" face="sans-serif"><br></font>
  <table>
    <tbody>
    <tr>
      <td bgcolor="#006699">
      </td><td bgcolor="#006699">
    </td></tr><tr>
      <td><img src="cid:000d01c8d63d$b81f3060$0b00a8c0@saturn"> 
      </td><td><font size="1" color="#0060a0" face="Microsoft Sans Serif"><b>Tony 
        Pearson</b></font><font size="1" face="Microsoft Sans Serif"><br>Senior 
        Storage Consultant, IBM System Storage™<br>Telephone: +1 520-799-4309 | 
        &nbsp;tie 321-4309 | &nbsp;Cell: +1 520 990-8669<br>email: 
        <a href="mailto:tpearson@us.ibm.com" target="_blank">tpearson@us.ibm.com</a> | &nbsp;GSA: 
        <a href="http://tucgsa.ibm.com/%7Etpearson" target="_blank">http://tucgsa.ibm.com/~tpearson</a><br>Blog: </font><a href="http://www.ibm.com/developerworks/blogs/page/InsideSystemStorage" target="_blank"><font size="1" color="blue" face="Microsoft Sans Serif"><u>http://www.ibm.com/developerworks/blogs/page/InsideSystemStorage</u></font></a><font size="1" face="Microsoft Sans Serif"><br>
AKA: 990tony Paravane, eightbar 
        specialist </font>
    </td></tr><tr>
      <td bgcolor="#006699">
      </td><td bgcolor="#006699"></td></tr></tbody></table><br></blockquote></div>
<br>_______________________________________________<br>
Server-devel mailing list<br>
<a href="mailto:Server-devel@lists.laptop.org">Server-devel@lists.laptop.org</a><br>
<a href="http://lists.laptop.org/listinfo/server-devel" target="_blank">http://lists.laptop.org/listinfo/server-devel</a><br>
<br></blockquote></div><br>