Installation Guide


Installation of the FWE engine is easy, and our FWE System Requirements are very basic. Since FWE binaries are available for Windows, Linux and Mac OS X, we elected to use a simple to read and understand text file for the setup/configuration of our product called fpc_wiki_engine.conf. The configuration file must reside in the same directory as the binary. By requiring this pairing you can easily have multiple wiki engines running on the same domain, server, network, etc.

Which Database Engine?


FWE Supports any SQL database which has ODBC connectivity support. We elected to use ODBC as our back-end database interface because we wanted to support anything with which we had experience, while keeping the doors open for a solution you may want to use that is outside our realm of knowledge.

If you took a minute to read our explanation of our configuration file, you would understand that our configuration file allows you to define the username, password, database engine along with the three important DataTypes we support (Integer, String and Blob). When you alias these three types to the DataType supported by the SQL engine you are using, our product weill be ready for you to -C create the skeleton environment - See Also FWE Parameters.

We have successfully tested the product against PostgreSQL, Oracle 11, MySQL and DB2, so far. See our Comparison of Databases

Once you have selected which Database engine you are going to use, make sure you have installed the ODBC driver for the product.

  • On certain Linux operating systems you will want to apt-get/yum the unixODBC or iODBC engine, providing your operating system with ODBC support.

Pointing your FWE to the Database Engine


FWE uses standard SQL commands like INSERT, UPDATE, DELETE, SELECT.

  • Driver = String

Unlike most ODBC implementations which use DSN connection strings, FWE communicates directly to the driver. So, this string should be the name found in your ODBCINST.INI (In Windows, your "Drivers Tab" found in the Control Panel>Administrative Tools>Data Sources (ODBC)). (In Linux, usually /etc/odbcinst.ini). (In Mac OS X, usually in /Library/ODBC/odbcinst.ini).

  • Database = String

This is used for database engines like PostgreSQL, MySQL, etc. which support databases.

  • Username = String

This is part of the login credential used to communicate to the database. FWE expects this user to be able to create tables and manipulate the content of the tables he/she has created.

  • Password = String

This is part of the login credential used to communicate to the database.

  • Server = String

This is the IP Address or machine name of the database server. FWE supports the command line parameter -T to test these settings.

  • Port = Numeric String

This is the port on which the database server is listening. Not all ODBC drivers require this to be set, however, to avoid errors you should refer to your database server documentation and set this to the default port number for your server.

  • Prefix = String

Since FWE can have multiple instances on the same servers, this string is added to the start of all table names. This allows you to have multiple wiki environments without any worry of collision. If blank, the system will use "fwe" as the prefix.

  • Param = Variable=Value

Some database engines require special settings to handle large objects as strings, or if you need to control connection pools or any other type of ODBC setting. If your connection requires multiple variable=value pairs then you will have something like:

 Param = Variable1=Value1
 Param = Variable2=Value2

See Also FWE PostgreSQL Settings, FWE DB2 Settings

Now that you have values for these parameters, you can test if our product can actually establish the connection by using the -T Test command line parameter. NOTE: Since we have not created the database tables yet, a successful test will look like this:

 <prompt> fpc_wiki_engine -T
 Establishing database connection to:
 Driver=pSQLODBC
 Database=postgres
 Server=127.0.0.1
 Port=5432
 TextAsLongVarchar=1
 
 Prefix=example
 Username=postgres
 Password=password
 Successful!
 
 Now testing database:
 examplewiki does not exist
 *** Could not execute statement.
  ODBC error details: LastReturnCode: SQL_ERROR; Record 1: SqlState: 42P01;
  NativeError: 7; Message: ERROR: relation "examplewiki" does not exist;
 Error while executing the query;

We are looking for the line after password to say "Successful". If you do not have something set right then you would see something like:

 <prompt> fpc_wiki_engine -T
 Establishing database connection to:
 Driver=pSQLODBC
 Database=postgres
 Server=127.0.0.1
 Port=54321
 TextAsLongVarchar=1
 
 Prefix=example
 Username=postgres
 Password=password
 Failed to connect to database server.
 *** Could not connect with connection string "UID=postgres;PWD=password;
  Driver=pSQLODBC;Database=postgres;Server=127.0.0.1;Port=54321;TextAsLongVarchar=1;".
  ODBC error details: LastReturnCode: SQL_ERROR; Record 1: SqlState: 08001;
  NativeError: 101; Message: Could not connect to the server;
 Connection refused [127.0.0.1:54321];

We return the full message from the ODBC interface as sometimes the description is useful, at other times, it just adds more confusion.

Successful, create the skeleton


 <prompt> fpc_wiki_engine -C
 Creating examplewiki [OK]
 Creating examplewikiarchive [OK]
 Creating examplewikilinks [OK]
 Creating examplewikitopics [OK]
 Creating examplewikihits [OK]
 Creating examplewikiscore [OK]
 Creating examplewikilog [OK]
 Creating examplewikitags [OK]
 Creating examplewikiswearwords [OK]
 * Creating initial content
 Swearwords starting with "A", "B", "C", "D", "E", "F", "G", "H",
      "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T",
      "U", "V", "W", "X", "Y", "Z"
 Creating Welcome Page [OK]
 Creating hit counter entry for Welcome [OK]
 * Tagging Welcome
 welcome, fpc, wiki, engine, fwe, expect, wiki, wrapped, tidy, package,
 followed, of, the, standard, wiki, markup, syntax, for, wikipedia,
 double, apostrophe, denotes, italic, triple, apostrophe, denotes, bold,
 quintuple, apostrophe, denotes, italic, and, bold, double, equal, signs,
 denotes, heading, triple, equal, signs, denotes, sub, heading, space,
 starting, line, space, denotes, mono, space, tab, starting, line, tab,
 denotes, mono, space, asterisk, indent, bullet, double, asterisk, two,
 indents, bullet, triple, asterisk, three, indents, bullet, number, sign,
 indent, numeric, bullet, double, number, signs, two, indents, numeric,
 bullet, triple, number, signs, three, indents, numeric, bullet, cr, and,
 ending, line, turns, off, of, the, above, blank, line, denotes, new,
 section, section, edited, individually, included, of, the, wiki, syntax,
 for, wikiwiki, and, phpwiki, finished.

If your output looks similar to the above, your back-end interface is working and contains your first wiki article called "Welcome".


Next Topic

This pages has been viewed 412 times since 03-11-2010 13:25:45.
Last modified 03-19-2010 18:08:53 by 10.1.10.128, our engine took (0 milliseconds).
18399 pages served since February 20th, 2010 [when we invented this product].