Version 32

    In this section we will describe how to install a database for JBoss Nukes portal, this suppose that you already installed JBoss.

    Instructions are written for Debian Linux but except for package installation the process should be the same for any operating system.


    The following instructions assume you are a new user installing Nukes for the

    first time and are compiling from source (either checked out via cvs or

    obtained from a snapshot).


    Pick any database below for installation, by default MySQL is used.








    Driver: already installed by default (hsqldb.jar)


    It is not recommended that it be used when running Nukes on a production site.

    However. itis a great db to use if you just want to check out Nukes, or are

    doing development work.


    In order to use HSQLDB, perform the following steps:


    • edit the file in the 'build' directory and set the following property


    nukes.database = hsqldb 



    • execute the following command inside the 'build' directory. This will compile Nukes for HSQLDB.





    • start jboss


    • copy the setup.bsh file contained in $NUKES_SRC_DIR/nukes/output/resources/hsqldb to $JBOSS_HOME/server/<nukes.deploy.dir>.

      • Unless you are using NukesAdvancedSetup 'techniques', replace <nukes.deploy.dir> with 'default'


      • This will create the tables required for the core. There is no need to setup a user/password; the 'sa' user is used by default.


    • check the JBoss console output to make sure no errors occurred and that the script has completed. You will see the message '... DONE!' when it has completed.


    • remove the setup.bsh file from the deploy directory. failure to do this will cause JBoss to drop and re-create the tables upon every shutdown/startup.


      • If you wish to access the HSQLDB database from outside of JBoss using an external client (see NukesUsingHSQLDB for information on obtaining a client), you will need to edit the following:


    • $JBOSS_HOME/server/<nukes.deploy.dir>/deploy/nukes-ds.xml

      • Follow the instructions inside the datasource on how to enable remote access.





    Note: MySQL is the default value for the nukes.database property.


    In order to use MySQL, perform the following steps:


    First of all, if MySQL is not installed on your machine, looged as root type:


    root@laptop:~$ apt-get install mysql-server


    root@laptop:~$ apt-get install mysql-client


    On other distribution or operating system:


    Download your binaries from and unpack them


    By default on Debian, networking access is forbidden you have to edit the file /etc/mysql/my.cnf and comment out (add a  at the beginning of the line) 'skip-networking'.


    Restart the database to listen on port:3306


    root@laptop:~$ /etc/init.d/mysql restart


    You should as well change the root password by typing:


    theute@laptop:~$ mysqladmin -u root password 'myN3wPassw0rd'


    Now you can log on MySQL by typing:


    theute@laptop:~$ mysql -u root -p



    Create nukes database: (you can change the name if you want)


    In the MySQL console type:


    mysql> CREATE DATABASE nukes;


    The output should be:


    Query OK, 1 row affected (0.01 sec)



    Add a user (pick any name if you don't like 'nukes' as database username:


    mysql> GRANT ALL PRIVILEGES ON nukes. TO 'nukes'@'localhost' IDENTIFIED BY 'nuk3sPassw0rd' WITH GRANT OPTION;


    The output should be:


    Query OK, 0 rows affected (0.00 sec)



    One last thing that is database specific is to get the Java connector:


    Get the MySQL connector from and copy the .jar into $JBOSS_HOME/server/default/deploy


    Go to and save the file to /tmp


    theute@laptop:~$ cd /tmp


    theute@laptop:/tmp$ tar zxvf mysql-connector-java-3.0.14-production.tar.gz


    theute@laptop:/tmp$ cp mysql-connector-java-3.0.14-production/mysql-connector-java-3.0.14-production-bin.jar $JBOSS_HOME/server/default/deploy



    That's it your database is ready to go, you can go ahead with the installation process by using the installer.










    If you wish to use one of the remaining databases listed, a setup.ddl will

    be generated for you, however you are on your own to provide a prepare.ddl,

    which would include the following steps:


    1. create nukes database

    2. create nukes user

    3. assign correct privledges









    nukes.database property value: postgres









    nukes.database property value: oracle8


    In order to use one of these databases, perform the following steps:


    • edit the file in the 'build' directory and set the following property (see above for correct value)





    • execute the following command inside the 'build' directory. This will compile Nukes for your chosen database.





    • Once the build has completed, two ddls will have been created inside the following directory $NUKES_SRC_DIR/nukes/output/resources/<database>


      • setup.ddl


    • Using your databse client of choice, log in as the root user and execute your self created prepare.ddl, followed by the setup.ddl to create the core tables.





    If you are interested in the details of why the core has not been converted to

    a pure CMP implementation, see the following thread in the forums:


    The previous instructions found on this page have been relocated here: NukesDBSetup1.0