Skip to content

InstallationInstructions

James Cheney edited this page Jun 15, 2015 · 9 revisions

Installation instructions.

Introduction

Installation instructions for Database Wiki.

Details

Unix/Cygwin/MacOS X command line:

Prerequisites:

  • subversion installation
  • javac/JDK (Java 1.6)
  • ant
  • postgreSQL (>= 8.4)
  • Firefox web browser (v3.6+), other standards-compliant browsers should also work
  1. Check out sources:

     git clone https://github.com/jamescheney/database-wiki.git
    
  2. Build the sources to class files:

     cd database-wiki/trunk/database-wiki
     ant compile
    
  3. Create a PostgreSQL user (e.g. dbwiki) and a database owned by that user (e.g. also dbwiki). Give the user a password. Make sure the server is running and the password is correct before proceeding. If you want to use a remote database then you may need to ask its administrator to do this for you, if not, consult the PostgreSQL documentation. (MySQL should also work, but is not yet tested/documented).

  4. Create config and initial user list files:

    cd resources/configuration/server
    cp config.sample config
    cp users.sample users
    

    Edit config so that JDBC_USER is the username (e.g. dbwiki) and JDBC_PASSWORD is that user's password.

    The JDBC_URL parameter should be set to point to the database server set up in step 3, using JDBC connection string format. For a local PostgreSQL server running on the default port, the JDBC_URL parameter should be set to jdbc:postgresql://localhost. If the PostgreSQL server you want to use is remote, then change JDBC_URL to point to the appropriate host instead of localhost.

  5. Change back to the root of the source tree and initialize the database:

     cd ../../..
     sh create-server.sh
    

    This should succeed with no output if everything is configured correctly. You can confirm this by checking that tables such as _user, _database and _templates have been added to the dbwiki database.

  6. The exciting part: Start the server!

     sh start-server.sh
    

    This will not work if the PostgreSQL user/password settings are incorrect, or if the core server tables weren't created successfully.

    It may also fail if port 8080 is already used for something else on your machine. If so, change PORT in config to an unused port, e.g. 8081.

    On success, start-server.sh should print out something like:

    START SERVER ON ADDRESS /0.0.0.0:8080 AT Wed Feb 23 13:20:25 GMT 2011
    
  7. Test that the server is running correctly by visiting

    http://localhost:8080

    using Firefox (other web browsers may work but have sometimes had incompatibilities).

  8. Once you've confirmed that the server is running correctly, you need to load some data. See LoadingData.

Windows command line:

If you want to do this, you should be able to figure out how from the instructions above, using the Windows cmd.exe commands such as create-server.cmd, start-server.cmd etc. instead of the Unix-style shell scripts.

Eclipse-based (Unix, Windows, or Mac OS X)

  1. After following the above instructions to build and configure DBWiki, you can use the Ant build file to create an Eclipse project (New Project/Java/Create from ant build file).

  2. It is possible to create a run configuration within Eclipse to run DBWiki with debugging enabled. To do this:

    • set the Main class to org.dbwiki.StartServer
    • set the Program arguments to resources/configuration/server/config
    • set the working directory to the database-wiki/ directory (the one containing resources as a subdirectory), NOT the workspace default
Clone this wiki locally