Mac: Difference between revisions

From NEOSYS Dev Wiki
Jump to navigationJump to search
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Downloading and Installing Exodus ==
== Downloading and Installing Exodus ==


http://code.google.com/p/exodusdb/downloads
Snow Leopard, Leopard, Tiger.


Mac OSX 64bit Snow Leopard Installer
[http://code.google.com/p/exodusdb/downloads/list?q=label:Featured Latest-Versions]
http://exodusdb.googlecode.com/files/exodus-10.10.9-osx-installer.app.zip


== C++ Compiler ==
== C++ Compiler ==


If you want to write or compile Exodus programs to install the XCODE C++ compiler. You don't need a C++ compiler to just use the Exodus command line to access the database or run prepackaged Exodus programs.
If you want to write or compile Exodus programs you must install the XCODE gcc C++ compiler. You don't need a C++ compiler to just use the Exodus command line to access the database or run prepackaged Exodus programs.


XCODE is available in the OSX dvd in the utilities folder.
XCODE is available in the "Mac OS X Install DVD" in the "Optional Installs" folder.
 
#Insert Mac OSX Install DVD
#Open Optional Installs folder
#Open Xcode.mpkg
#Follow instructions
#Check ALL options including Mac OSX 10.4 Support if you might develop programs to be installed on previous versions of Mac OSX.


== Postgresql ==
== Postgresql ==


If you want to use Exodus to provide multivalue database functionality then you must already have or install a PostgreSQL database.
If you want to use Exodus to provide multivalue database functionality then you must already have or install a PostgreSQL database.
Postgres does not have to be on the same server as Exodus, however, if it is not, dictionary entries cannot call Exodus subroutines. If you install Postgres on another server then you will have to manually copy the pgexodus.so plugin file to the Postgres bin folder.
=== Installing ===


http://www.postgresql.org/download/macosx
http://www.postgresql.org/download/macosx


Postgres does not have to be on the same server as Exodus, however, if it is not, dictionary entries cannot call Exodus subroutines.
Install with all the defaults except uncheck "Stack Builder" towards the end. Take a note of the password that you give for the postgres admin user.


By default, Exodus assumes the following postgres configuration. This is very convenient for quick setups but of course is not secure.
=== Configuring ===


host=127.0.0.1 port=5432 dbname=exodus user=exodus password=somesillysecret connect_timeout=10
The following Exodus command creates the default database and password. It also configures postgres to use the exodus plugin which is required for sort/select on dictionary entries. You need the postgres admin username and password to do so.
 
The following Exodus command creates the default database and password. It prompts for a postgres admin user and password to do so.


  configexodus
  configexodus


Alternatively, you can use any available Postgres utility to create an initial database and user yourself. If you wish Exodus to be able to create databases, and drop any databases it creates, the user you create should have database creation rights. The user you create does not need admin rights.
By default, Exodus assumes the following postgres configuration. This is very convenient for quick setups but of course is not secure.
 
Storing the configuration
 
notepad %USERPROFILE%\.exodus


  host=127.0.0.1 port=5432 dbname=exodus user=exodus password=somesillysecret connect_timeout=10
  host=127.0.0.1 port=5432 dbname=exodus user=exodus password=somesillysecret connect_timeout=10
The following environment variables can override default and .exodus parameters on a one by one basis.
set EXODUS_HOST=127.0.0.1
set EXODUS_PORT=5432
set EXODUS_DBNAME=exodus
set EXODUS_USER=exodus
set EXODUS_PASSWORD=somesillysecret
set EXODUS_TIMEOUT=10


== Using Exodus ==
== Using Exodus ==

Latest revision as of 16:01, 7 June 2011

Downloading and Installing Exodus

Snow Leopard, Leopard, Tiger.

Latest-Versions

C++ Compiler

If you want to write or compile Exodus programs you must install the XCODE gcc C++ compiler. You don't need a C++ compiler to just use the Exodus command line to access the database or run prepackaged Exodus programs.

XCODE is available in the "Mac OS X Install DVD" in the "Optional Installs" folder.

  1. Insert Mac OSX Install DVD
  2. Open Optional Installs folder
  3. Open Xcode.mpkg
  4. Follow instructions
  5. Check ALL options including Mac OSX 10.4 Support if you might develop programs to be installed on previous versions of Mac OSX.

Postgresql

If you want to use Exodus to provide multivalue database functionality then you must already have or install a PostgreSQL database.

Postgres does not have to be on the same server as Exodus, however, if it is not, dictionary entries cannot call Exodus subroutines. If you install Postgres on another server then you will have to manually copy the pgexodus.so plugin file to the Postgres bin folder.

Installing

http://www.postgresql.org/download/macosx

Install with all the defaults except uncheck "Stack Builder" towards the end. Take a note of the password that you give for the postgres admin user.

Configuring

The following Exodus command creates the default database and password. It also configures postgres to use the exodus plugin which is required for sort/select on dictionary entries. You need the postgres admin username and password to do so.

configexodus

By default, Exodus assumes the following postgres configuration. This is very convenient for quick setups but of course is not secure.

host=127.0.0.1 port=5432 dbname=exodus user=exodus password=somesillysecret connect_timeout=10

Using Exodus

Look your Applications folder for Exodus or just use the unix console.

Try the following commands.

Command Comment
EDITING AND COMPILING
edic hello edic=edit+compile+catalog. Creates a skeleton hello.cpp file using nano editor. edic will only compile on exit if saved, so make some change before you exit.
hello Run it
compile hello compile without editing
edic testsort Browse a sample exodus program showing all fundamental database operations including dictionaries and list.
compile testsort compile the preinstalled test program
testsort Run it to generate some data and inspect the output
DATABASE OPERATIONS
listfiles quick tool avoiding need to use any database client
list myclients text output - no page/column headers just yet sorry
list myclients {H} html output (port of a fully blown LIST replacement in heavy production use since 2000)
list dict_myclients NB the underscore after "dict" is *required*. "dict(SPACE)myclients" wont work
list dict_voc if you understand this then you understand your pick
edir myclients SB001 you can edit data or dictionaries directly. edir="edit record"
delete myclients SB001 useful command line tool
createfile tempfile ditto
deletefile tempfile ditto
createindex myclients CLIENT_TYPE speeds up select commands on the indexed fields in the traditional way
deleteindex myclients CLIENT_TYPE filenames are case insensitive, keys and fieldnames are CASE SENSITIVE

If you get the following error then you have not completed the installation of the Exodus plugin for Postgres.

PGRES_FATAL_ERROR: ERROR: function exodus_extract_text(bytea, integer, integer, integer) does not exist