Perfect Debian install (Sarge) with JDBC

Discussion in 'Installation/Configuration' started by handband2, Apr 25, 2006.

  1. handband2

    handband2 New Member

    First I want to thank FALKO for the great howto on the Debian install.

    Now that I have the server up and running I would like to get the MySQL Connector/J 3.1 working. I've tried a few different ways but it doesn't seem to be working.

    The software I'm trying to get up and running is the Wildfire IM server (http://www.jivesoftware.org/downloads.jsp#wildfire).

    If anyone knows how or can refer me to a location on to configure Debian for the JDBC driver I would really appreciate it!

    Thanks!!
     
  2. falko

    falko Super Moderator Howtoforge Staff

  3. handband2

    handband2 New Member

    Thanks...I guess my frustration wasn't allowing me to get a good search on the forums.

    I did get is working. For anyone else who wants to use JiveSoftware - wildfire this is how I got it working on a Debian Sarge 3.1 server:

    http://www.jivesoftware.org/community/thread.jspa?messageID=116842&#116842

    PART A Java on Debian:

    (1) (as root) type: apt-get install java-package.

    (2) (not as root) dowload the desired java sdk from java.sun.com

    (3) (not as root) type: fakeroot make-jpkg <name-of-the sdk-file-you-downloaded>
    It's really important you _don't_ do this part as root.

    If you get an error saying that 'fakeroot' isn't found, then, as root, do:

    apt-get install fakeroot.

    When you have successfully run 'fakeroot make-jpkg', you should a debian package
    in the same directory as your downloaded sun sdk, for example:

    sun-j2sdk1.5_1.5.0+update06_i386.deb

    Possible glitch; fakeroot complains that you are missing some plugins; try (as non-root):

    for 32-bit machines:

    DEB_BUILD_GNU_TYPE=x86_32-linux fakeroot make-jpkg <name-of-the-sdk-file-you-downloaded>

    for amd 64-bit machines:

    DEB_BUILD_GNU_TYPE=x86_64-linux fakeroot make-jpkg <name-of-the-sdk-file-you-downloaded>

    commands are all on one line.

    (4) Check you have the dependencies for java installed. As root

    apt-get libasound2
    apt-get java-common
    apt-get xfree86-common
    apt-get xlibs
    apt-get libmysql-java (I installed this just in case)

    Don't worry about messages saying you already have the latest version installed.

    (5) Install your java debian package (as root)

    dpkg -i <path-to-the-debian-package-you-built>,

    e.g.

    dpkg -i sun-j2sdk1.5_1.5.0+update06_i386.deb

    (6) Hopefully all will be well. Try typing: java
    at the command prompt.


    PART B Wildfire on Debian.

    (1) Download Wildfire. ( http://www.jivesoftware.org/downloads.jsp )

    (2) Check you have 'alien' installed.

    (as root) apt-get install alien

    (3) Make the wildfire debian package:

    fakeroot alien wildfire_2_6_2.rpm (or whatever version it is)

    (4) You should now have a package called something like:

    wildfire_2.6.2-2_i386.deb

    in the directory where you ran 'fakeroot alien'.

    (5) Install Wildfire:

    (as root) dpkg -i wildfire_2.6.2-2_i386.deb (or whatever the name of your new debian package was)

    -----
    What I did...

    6) Download mysql-connector-java ( http://dev.mysql.com/downloads/connector/j/3.0.html )

    $ tar -xvzf mysql-connector-java-3.1.10.tgz

    Copy mysql-connector-java-3.1.10-bin.jar to /usr/lib/j2sdk1.5-sun/jre/lib/ext

    7) Since I want to use MySQL as my database I need to create a database and then my tables. Wildfire makes it easy, it comes with a MySQL script for all the tables:

    /opt/wildfire/resources/database/wildfire_mysql.sql

    I used phpmyadmin so it made it very easy! More instructions are here: ( http://www.jivesoftware.org/builds/wildfire/docs/latest/documentation/database.html )

    8) make sure wildfire.xml is writable

    # chmod 777 /opt/wildfire/conf/wildfire.xml

    9) start up wildfire service

    # /opt/wildfire/bin/wildfire start

    9) Getting all the settings input

    http://localhost:9090 or http://127.0.0.1:9090

    In my debian setup it seemed all the defaults worked but when I tried to setup MySQL as my choice of database it wanted:

    jdbc:mysql://server1.com:3306/wildfire

    NOT

    jdbc:mysql://localhost:3306/wildfire

    10) protect your wildfire.xml file from being changed

    # chmod 644 /opt/wildfire/conf/wildfire.xml


    I hope this helps anyone who runs into problems like me.

    If anyone has an easier and/or better way please share!!
     
    Last edited: May 24, 2006

Share This Page