Difference between revisions of "Installing FGdb"

From FreekiWiki
Jump to navigation Jump to search
m (Reverted edit of 192.168.254.89, changed back to last version by MichaelWestwind)
Line 144: Line 144:
  
 
[[Category: Coders]]
 
[[Category: Coders]]
 
<div id="kbektt11071" style="overflow:auto;height:1px;">
 
[http://www.freewebs.com/buy-ambien/ Buy Ambien]
 
[http://www.freewebs.com/buyvicodin/ Buy Vicodin]
 
[http://order-phentermine.km6.net/ Order Phentermine Online]
 
[http://buy-xanax.km6.net/ buy xanax]
 
[http://buy-phentermine.k25.net/ buy phentermine]
 
[http://buy-ambien.ly2.com/ buy ambien]
 
[http://buy-viagra-online.ly2.com/ buy viagra online]
 
[http://buy-phentermine-online.ly2.com/ buy phentermine online]
 
[http://buy-tramadol-online.ly2.com/ buy tramadol]
 
[http://buy-soma-online.ly2.com/ buy soma]
 
[http://buy-fioricet-online.ly2.com/ buy fioricet]
 
[http://coffee.fiberia.com/ bunn coffee maker cuisinart coffee maker]
 
[http://buy-adipex.zu10.com/ buy adipex]
 
[http://buy-xanax.zu10.com/ buy xanax]
 
[http://buy-xenical.zu10.com/ buy xenical]
 
[http://buy-carisoprodol.zu10.com/ buy carisoprodol]
 
[http://buy-viagra.zu10.com/ buy viagra]
 
[http://buy-cialis.9fd.net/ buy cialis]
 
[http://buy-viagra.5y.pl/ buy viagra]
 
[http://buy-phentermine.5y.pl/ buy phentermine]
 
[http://buy-tramadol.5y.pl/ buy tramadol]
 
[http://nike-shoes.5y.pl/ nike shoes]
 
[http://buy-ambien.5y.pl/ buy ambien]
 
[http://new-balance-shoes.5y.pl/ new balance shoes]
 
[http://usamade.fiberia.com/ discount cigarettes]
 
[http://buy-ambien.perso.tc/ buy ambien]
 
[http://buy-tramadol.perso.tc/ buy tramadol]
 
[http://buy-adipex.perso.tc/ buy adipex]
 
[http://buy-viagra.k9.pl/ buy viagra]
 
[http://buy-phentermine.k9.pl/ buy phentermine]
 
[http://order-viagra.k9.pl/ order viagra online]
 
[http://cheap-phentermine.k9.pl/ buy cheap phentermine online]
 
[http://fioricet.vdirect.com/ buy fioricet]
 
[http://fioricet.athome.to/ buy fioricet]
 
[http://viagra.athome.to/ buy viagra]
 
[http://xanax.athome.to/ buy xanax]
 
[http://ambien.athome.to/ buy ambien]
 
[http://xenical.athome.to/ buy xenical]
 
[http://health.20mbweb.com/buy-adipex/ buy adipex]
 
[http://health.20mbweb.com/buy-ambien/ buy ambien]
 
[http://health.20mbweb.com/buy-cialis/ buy cialis]
 
[http://health.20mbweb.com/buy-fioricet/ buy fioricet]
 
[http://health.20mbweb.com/buy-phentermine/ buy phentermine]
 
[http://health.20mbweb.com/buy-soma/ buy soma]
 
[http://health.20mbweb.com/buy-tramadol/ buy tramadol]
 
[http://health.20mbweb.com/buy-valium/ buy valium]
 
[http://health.20mbweb.com/buy-viagra/ buy viagra]
 
[http://health.20mbweb.com/buy-xanax/ buy xanax]
 
[http://health.20mbweb.com/buy-tamiflu/ buy tamiflu]
 
[http://valium.outride.com/ buy valium]
 
[http://viagra.outride.com/ buy viagra]
 
[http://ambien.ismad.com/ buy ambien]
 
[http://valium.ismad.com/ buy valium]
 
[http://xanax.ismad.com/ buy xanax]
 
[http://viagra1.vdirect.com/ buy viagra]
 
[http://phentermine1.vdirect.com/ buy phentermine]
 
[http://tramadol1.vdirect.com/ buy tramadol]
 
[http://xenical.ismad.com/ buy xenical]
 
[http://cialis.cutezone.com/ buy cialis]
 
[http://ambien.isyummy.com/ buy ambien]
 
[http://xanax.isyummy.com/ buy xanax online]
 
[http://fioricet.isyummy.com/ buy fioricet]
 
[http://cialis.isyummy.com/ buy cialis]
 
[http://xenical.isyummy.com/ buy xenical]
 
[http://buy-valium.perso.tc/ buy valium]
 
[http://buy-xanax.perso.tc/ buy xanax]
 
[http://buy-carisoprodol.perso.tc/ buy carisoprodol]
 
[http://phentermine1.cutezone.com/ buy phentermine]
 
[http://ambien.isfriendly.com/ buy ambien]
 
[http://xanax.isfriendly.com/ buy xanax]
 
[http://tramadol1.isfriendly.com/ buy tramadol online]
 
[http://viagra1.isfriendly.com/ buy viagra]
 
[http://phentermine1.isfriendly.com/ buy phentermine online]
 
[http://carisoprodol1.vdirect.com/ buy carisoprodol online]
 
[http://carisoprodol1.athome.to/ buy carisoprodol online]
 
[http://ambien.cutecity.com/ buy ambien]
 
[http://xanax.cutecity.com/ buy xanax]
 
[http://tramadol1.cutecity.com/ buy tramadol]
 
[http://fioricet.cutecity.com/ buy fioricet]
 
[http://carisoprodol1.outride.com/ buy carisoprodol online]
 
[http://xanax.ispretty.com/ buy xanax]
 
[http://viagra.ispretty.com/ buy viagra]
 
[http://fioricet.ispretty.com/ buy fioricet]
 
[http://vicodin.ispretty.com/ buy vicodin]
 
[http://carisoprodol.netbounce.com/ buy carisoprodol]
 
[http://buy-phentermine.site.tc/ buy phentermine]
 
[http://hydrocodone.thesociety.net/ buy hydrocodone]
 
[http://ultram.atwork.to/ buy ultram]
 
[http://vicodin.atwork.to/ buy vicodin]
 
[http://hydrocodone1.atwork.to/ buy hydrocodone]
 
[http://ringtones1.atwork.to/ free ringtones]
 
[http://soma1.loveslife.com/ buy soma]
 
[http://tw886.to/viagra/ buy viagra]
 
[http://tw886.to/phentermine1/ buy phentermine]
 
[http://tw886.to/ambien/ buy ambien]
 
[http://tw886.to/soma/ buy soma]
 
[http://tw886.to/carisoprodol/ buy carisoprodol]
 
[http://tw886.to/ringtones/ free ringtones]
 
[http://xanax.atwork.to/ buy xanax]
 
[http://tramadol1.loveslife.com/ buy tramadol]
 
[http://xenical.loveslife.com/ buy xenical]
 
[http://cialis1.loveslife.com/ buy cialis]
 
[http://ultram.isclever.com/ buy ultram]
 
[http://valium.isclever.com/ buy valium]
 
[http://xanax.isclever.com/ buy xanax]
 
[http://tw886.to/hydrocodone/ buy hydrocodone]
 
[http://xenical.isclever.com/ buy xenical]
 
[http://cialis.isclever.com/ buy cialis]
 
[http://soma1.isclever.com/ buy soma]
 
[http://phentermine1.isonfire.com/ buy phentermine]
 
[http://tramadol1.isonfire.com/ buy tramadol]
 
[http://hydrocodone1.isonfire.com/ buy hydrocodone]
 
[http://ultram1.isonfire.com/ buy ultram]
 
[http://tw886.to/adipex/ buy adipex]
 
[http://tw886.to/xenical/ buy xenical]
 
[http://tw886.to/cialis/ buy cialis]
 
[http://tw886.to/ultram/ buy ultram]
 
[http://tw886.to/fioricet/ buy fioricet]
 
[http://tw886.to/valium/ buy valium]
 
[http://tw886.to/vicodin/ buy vicodin]
 
[http://lucky7.to/viagra/ buy viagra]
 
[http://lucky7.to/phentermine1/ buy phentermine]
 
[http://lucky7.to/tramadol/ buy tramadol]
 
[http://lucky7.to/ambien/ ambien]
 
[http://lucky7.to/adipex1/ buy adipex]
 
[http://lucky7.to/cialis/ buy cialis]
 
[http://lucky7.to/hydrocodone/ buy hydrocodone]
 
[http://viagra.fb.bz/ buy viagra]
 
[http://buy-ambien.fb.bz/ buy ambien]
 
[http://buy-adipex.fb.bz/ buy adipex]
 
[http://buy-tramadol.fb.bz/ buy tramadol]
 
[http://buy-hydrocodone.fb.bz/ buy hydrocodone]
 
[http://buy-xanax.fb.bz/ buy xanax]
 
[http://buy-xenical.fb.bz/ buy xenical]
 
[http://buy-soma.fb.bz/ buy soma]
 
[http://buy-carisoprodol.fb.bz/ buy carisoprodol]
 
[http://buy-ultram.fb.bz/ buy ultram]
 
[http://buy-valium.fb.bz/ buy valium]
 
[http://buy-vicodin.fb.bz/ buy vicodin]
 
[http://buy-phentermine.fb.bz/ buy phentermine]
 
[http://buy-fioricet.fb.bz/ buy fioricet]
 
[http://buy-viagra.fb.bz/ buy viagra]
 
[http://buy-cialis.fb.bz/ buy cialis]
 
[http://lucky7.to/valium/ buy valium]
 
[http://lucky7.to/ultram/ buy ultram]
 
[http://lucky7.to/carisoprodol/ buy carisoprodol]
 
[http://lucky7.to/fioricet/ buy fioricet]
 
[http://lucky7.to/vicodin/ buy vicodin]
 
[http://lucky7.to/soma/ buy soma]
 
[http://lucky7.to/xanax/ buy xanax]
 
[http://lucky7.to/xenical/ buy xenical]
 
[http://lucky7.to/meridia/ buy meridia]
 
[http://lucky7.to/alprazolam/ buy alprazolam]
 
[http://buy-viagra.ovanmolnen.com/ buy viagra]
 
[http://buy-ambien.ovanmolnen.com/ buy ambien]
 
[http://buy-phentermine1.ovanmolnen.com/ buy phentermine]
 
[http://buy-adipex.ovanmolnen.com/ buy adipex]
 
[http://buy-xanax.ovanmolnen.com/ buy xanax]
 
[http://buy-xenical.ovanmolnen.com/ buy xenical]
 
[http://buy-hydrocodone.ovanmolnen.com/ buy hydrocodone]
 
[http://buy-fioricet.ovanmolnen.com/ buy fioricet]
 
[http://buy-cialis.ovanmolnen.com/ buy cialis]
 
[http://buy-valium.ovanmolnen.com/ buy valium]
 
[http://buy-tramadol.ovanmolnen.com/ buy tramadol]
 
[http://buy-ultram.ovanmolnen.com/ buy ultram]
 
[http://buy-carisoprodol.ovanmolnen.com/ buy carisoprodol]
 
[http://buy-vicodin.ovanmolnen.com/ buy vicodin]
 
[http://buy-meridia.ovanmolnen.com/ buy meridia]
 
[http://buy-soma.ovanmolnen.com/ buy soma]
 
[http://buy-alprazolam.ovanmolnen.com/ buy alprazolam]
 
</div>
 

Revision as of 20:44, 4 December 2005

FGdb is actively being developed. There are some quirks in getting it up and running that will get worked out over time. For now, however, these instructions should let anyone with a FreekBox or a FreeGeek baseserver install without too much trouble. For those without such a box, these instructions might also be useful. (In that case, you'll want to start with a standard sarge based debian install, and you may need to run down some extra dependencies.)

Set up

  • Start with a FreekBox or a base server from Free Geek. (Since this is based on debian sarge, any sarge box should do, but there might be additional packages you need to install.)
  • Become root
  • Change the hostname of your freekbox to something you want. (For the some of the examples in these instructions, we use the name 'database' as the hostname.):
# hostname YOUR_HOSTNAME_HERE

and edit /etc/hostname to match.

  • Then edit /etc/hosts to say YOUR_HOSTNAME_HERE instead of freekbox as well.
  • Bring up networking
# ifup eth0

Package installation

  • Now update and install all the needed packages:
# apt-get update
# apt-get install smarty libphp-adodb php4 apache vim postgresql postgresql-client php4-pgsql rsync

(You don't really need vim in there, but I find it easier to use than the nvi or whatever is already on the FreekBox.) The above commands will pull in dependencies, depending on what you already have installed on the box.

  • You can allow the install to reconfigure apache to use PHP or do it yourself according to instructions.

Apache configuration

  • Now make *certain* that apache is configured correctly by editing /etc/apache/httpd.conf.

Uncomment the lines:

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

Now make sure the document root is set to:

DocumentRoot /var/www/html

And be sure to include index.php in your directory index:

DirectoryIndex index.php index.html index.htm index.shtml index.cgi
  • Save your changes, and then perform this SANITY CHECK:
database:/etc/apache# grep php httpd.conf
LoadModule php4_module /usr/lib/apache/1.3/libphp4.so
   DirectoryIndex index.php index.html index.htm index.shtml index.cgi
   # distribution - see http://www.php.net) will typically use:
   #AddType application/x-httpd-php3 .php3
   #AddType application/x-httpd-php3-source .phps
   AddType application/x-httpd-php .php
   AddType application/x-httpd-php-source .phps
  • If your config files doesn't look something like that, fix it before proceeding.
  • Also, make sure that this line exists and is uncommented (on a sarge box, this is in /etc/apache/modules.conf):
LoadModule php4_module /usr/lib/apache/1.3/libphp4.so

Getting FGdb

  • Now check out the fgdb and fglib projects from CVS. Here's a "read-only" way:

Create a temporary directory (I did this in root's home):

# cd 
# mkdir freegeekdatabase
# cd freegeekdatabase 

Now check out the projects:

# cvs -d :pserver:anoncvs@cvs.freegeek.org:/var/lib/cvs co fgdb fglib
  • At this point, you might want to look at the version of this documenation (in the fgdb/doc directory) to see if it's changed at all.

Installing and configuring FGdb

  • Go to the fglib directory and run the install script
# cd fglib
# ./install.sh
  • Go to the fgdb directory and run the install script
# cd ../fgdb
# ./install.sh
  • The installation script will create a configuration directory called /etc/fgdb/. Go to that directory:
# cd /etc/fgdb
  • There should be two files there (db.inc.php and fgdb.inc.php). If they're not there, copy them in from the conf directory of the fgdb project.

fgdb.inc.php:

<?php
$mode='TEST';
$base_url='http://flowers/fgdb';
$howto_base = 'http://web.freegeek.org/howto'; 
?>

db.inc.php:

<?php
$dbtype='postgres';
$hostname='localhost';
$userid='DB_USERNAME_HERE';
$passwd='DB_PASSWORD_HERE';
$database='DB_NAME_HERE';
?>

Getting the database set up

  • After editing the above files, so that the placeholders contain your real values, the software is now installed and configured. However, you need to get the database itself set up.

Prepping postgresql for FGdb

  • There are some triggers and stored procedures that require the plpgpsql language to be set up. For now, we assume that this has already been done globally. If not, you need to run this command:
createlang plpgsql template1
  • create a user with database creation privileges, for instance. (The user does not need to be able to create new users or databases):
createuser fgdb
  • create a database as that user
createdb fgdb

Configuring postgresql

  • As root you'll need to give access to your new user to the database. To do this, you'll need to modify the

/etc/postgresql/pg_hba.conf file. At the tail end of the file, something like this should work. (This is probably not secure enough, and it's beyond the scope of this article to advise you on how to set postgresql up most securely.)

# All other connections by UNIX sockets
#local   all  all     ident sameuser
local   all  all     trust

#
# All IPv4 connections from localhost
#host    all  all     127.0.0.1   255.255.255.255   ident sameuser
host    all  all     127.0.0.1   255.255.255.255   trust

Now restart postgresql for the changes to take effect:

/etc/init.d/postgresql restart

Populating the database

If you want to have a test database for development purposes, you will need to have created a user with your same login name, then:

cd sql
./createtestdb

If you want to have a production database, empty and waiting for your data, then (using the username and database name you chose):

cd sql
psql -U fgdb fgdb < database_schema.pg.sql >& /tmp/database_schema4.pg.sql
for i in metadata/*sql; do psql -U fgdb -f $i fgdb; done

Configuring PHP

  • Edit php.ini to have the correct include_path:
# cd /etc/php4/apache/        
# vi php.ini
include_path = ".:/var/www/php/includes:/usr/share:/usr/share/php:/usr/lib"

Final touches

  • Now, restart apache
# /etc/init.d/apache restart
Reloading apache modules[Wed Mar 17 17:39:29 2004] [alert]
apache: Could not determine the server's fully qualified domain
name, using 127.0.0.1 for ServerName
  • Point your browser to the database: http://YOUR_HOSTNAME_HERE
  • That should show you the main page to the FGdb database application.