HOME - NEWS - DEMO - SF HOME - SCREENSHOTS - DOWNLOAD - INSTALLATION - DOCUMENTATION - LICENCE - CONTACT

INSTALLATION


Please note, this installation file is not the most friendly, it assumes you have a clue of what you're doing. The installation is really quite straight forward, but READ ALL STEPS before you start assuming you can install this without reading a manual. A more detailed and more well written installation file will be posted in the future.

SOFTWARE

  • A dedicated (server) machine.
  • Linux or Windows, or any system capable of running all of below.
  • A servlet container, Tomcat (http://jakarta.apache.org/tomcat) 4.1.30+ recommended.
  • (A http server, Apache 2.0+ recommended. NOT REQUIRED however, Tomcat can do the job for you)
  • Database server. MySQL 4.1.3 Beta+ recommended. YOU NEED a server that supports SQL sub-queries (unless you want to modify the source)
  • Java SDK (J2SE/J2EE) 1.4.2_0x+. There's no getting around this one. Might work with 1.5.0 beta, but not tested.
  • ANT for compiling the source (http://ant.apache.org)
  • A text editor (any will do that doesn't messs up newlines or add strange characters (like vim, Emacs, etc) (DON'T USE PICO))

  • The DKP system is fully browsable in Internet Explorer as well as Mozilla (FireFox) etc, and quite possibly many browsers.

DOWNLOAD:

1. Install all software the system needs to run (see above). I will not detail how to install any of them here, as, if you don't know how to do that, you probably shouldn't be running this DKP system in the first place. In any case, they all have their own installation instructions.

2. Download the latest version of the DKP tool from the download section of this site, or fetch the latest CVS version.

UNPACKING:

3. If you want to put the project as a part of the Tomcat webapps dir, unpack the file in there, or put it wherever you host your webapps, it doesn't really matter as server.xml will point to wherever you put it.

4. Edit the log4j.properties in the root directory of wherever you unpacked the DKP tool.

    a. Change the directory of the log file to reflect the correct path, the line you're looking for looks like:
      log4j.appender.fa.File=/path/to/dkptool.log
    b. Remember to use forward slashes regardless of if you run Windows or Linux/Unix.
    c. If you want to change any other parameters in that file, that's all up to you. They should be pretty self-explanatory.

SETTINGS:

5. Edit /build.xml and modify the parameters at the top to relfect the correct paths on your system

6. Edit src/Settings.java, you will be making most of the DKP tool related changes in this file, and whenever it changes, you should rebuild your entire project.

    a. Unless you use a different SQL Server than MySQL you need not change the DRIVER setting
    b. If the database server is different than localhost, or the database is named different than null, change the URL setting
    c. Change the username, password to reflect your database settings.
    d. Change the HTDOCS_PATH to reflect the path to htdocs directory in the dkp tool folder
    e. Change the CACHE_PATH to the same.
    f. Read through the rest and see if you need to change anything. Each parameter has a comment.

7. IF you changed your /servlet/ path in (6), Edit htdocs/index.html and make it reflect the correct URL to the intro servlet.

8. IF you changed your /servlet/ path in (6), Edit htdocs/logout.html and make it reflect the correct URL to the raids servlet.

There's possibly some other file I forgot, just grep for "/servlet/" and replace it there as well.

(7) and (8) will probably change in the future to be steps you don't need to take

DATABASE SETUP (MySQL ASSUMED)

9. Create a new database, name it "null" for default settings to work, or if you changed those, name the database what you want.

    In MySQL you create a new database by:
      mysqladmin -u User -pPassword create databaseName

10. Import sql/skeleton.sql into that database. For MySQL on Linux that command is either:

    mysql -u User -pPassword databaseName < /path/to/sql/skeleton.sql
or from inside MySQL (with the database set)
    source /path/to/sql/skeleton.sql

    If you want to install the pre-created item, mob and zone database created by NULL, do the same thing with items.sql, mobs.sql and zones.sql as:

      source /path/to/items.sql
      source /path/to/mobs.sql
      source /path/to/zones.sql

    If you also want the basic flag and key sets, import:

      source /path/to/flags.sql
      source /path/to/keys.sql
      source /path/to/vt.sql

    You will most likely want to do this, as adding all the mobs, zones, items in Everquest by hand will take you a very very long time.

    IMPORTANT: DO THIS FROM THE START ON A CLEAN DATABASE, Don't start adding data and then import them.

11. In the "mysql" database (or whatever your database is named that controls access to the database server), create the corresponding user to whatever you set in the Settings.java file. The user will need read/write/execute/update/insert/delete permissions. Alter table etc is not needed, unless you intend to add functionality yourself.

    Once that's done, you need to create an admin user in the "null" database. This is done by inserting;

      INSERT INTO players (name, password, access_level) VALUES ('PlayerName', aes_encrypt('PlayerPassword', 'keySetInSettings.java'), 200);

      You must also create two players that will be non-players, that are named "Bank" and "Rotted" (or whatever you want, but you need them). Create them as follows:

      INSERT INTO players (name, password, access_level) VALUES ('Bank', aes_encrypt('...', '...'), 0);
      INSERT INTO players (name, password, access_level) VALUES ('Rotted', aes_encrypt('...', '...'), 0);

      (replace the ... with real data obviously)

      Now MEMORIZE the id's of those database entries (most likely 2 and 3), as you will set those up in Settings.java

      So go into Settings.java and set the BANK_PLAYER_ID and ROTTED_PLAYER_ID to the correct ID numbers.

      Once the whole installation is done, flag them as non-players in the DKP tool to make them "disappear from view" for regular users.

    Replace PlayerName, PlayerPassword with whatever name and password you want to use (password is case-sensetive). The keySetInSettings.java is the PASSWORD_ENCRYPTION_KEY value you've decided to use.

11 b. You also need to insert 3 entries into the cache table for the caching to work properly. Do this by inserting the statements as:

    INSERT INTO cache (last, last_update, name) VALUES (1, 0, "raids");
    INSERT INTO cache (last, last_update, name) VALUES (1, 0, "stats");
    INSERT INTO cache (last, last_update, name) VALUES (1, 0, "loot");
SERVLET CONTAINER SETUP (Tomcat ASSUMED)

12. Modify the /server.xml file and copy the modified contents thereof into your tomcat server.xml file into the right section, or into whatever file you use for settings for Tomcat. Remember to modify the hostname and log file names to your liking as well.

[optional] IF YOU USE MOD_JK UNDER APACHE 2.0+ 13. Modify the /mod_jk.conf file and copy the modified contents thereof into your tomcat mod_jk.conf file (which usually is called by apache's config file as an include), Here's a sample of a complete Apache MOD_JK config:

    ----- httpd.conf -----
    LoadModule jk_module modules/mod_jk-2.0.42.so

    JKLogLevel error
    JKLogStampFormat "[%a %b %d %H:%M:%S %Y] "

    Include /usr/local/tomcat/conf/mod_jk.conf

    (of course, if you don't use a seperate include file, you can just copy the contents of mod_jk.conf into the httpd.conf file)

[optional] END

14. Make sure you have the correct JAVA_HOME path, ANT_HOME path and such set to reflect the correct paths on your system.

    export JAVA_HOME=/usr/local/jdk
    export ANT_HOME=/usr/local/ant

    Or the like.

COMPILING

15. Make sure you're in the / directory of where the DKP tool was unpacked.

16. run "ant -projecthelp" to see available compilation options.

17. run "ant" to compile. If you get errors, make sure paths etc are correct and that the lib/ directory contains .jar files. The error message should tell you what's wrong.

18. run "ant go" to push the build into the correct directories.

19. Assuming no errors, then everything compiled fine and deployed, and you're pretty close to ready to go.

STARTING IT ALL UP

20. Start up Tomcat, (and Apache if you use it), and check the logs to make sure you don't get errors, such as bad path in log4j.properties, or anything really.

21. Go to the url you specified in the server.xml file, like: http://dkp.domain.com/

22. If you did all the above correctly, you should see the DKP system welcoming you. Log in with the user you created earlier in (11).

23. Go to Player Info->Guilds->Add New Guild, and add your guild, then start adding players, or whatever you want really, it's all good to go. You might just want to play around a bit, then re-create the database so you know your way around.

23. For help past this, refer to the documentation.