This howto presents a quick installation guide for the jUDDI web application and its prerequisites. The platform used herein is *nix with bash shell, MySQL and Tomcat. Installation is not much different for other platforms and the document will evolve to include them.

Get and install MySQL from http://www.mysql.com/downloads/index.html.

Install Tomcat from http://jakarta.apache.org/tomcat/index.html

MySQL Configuration

This section provides the instructions for a quick installation of MySQL
# cd to ${HOME}
# unzip and untar the downloaded binary distribution
tar xzf mysql-3.23.53a-pc-linux-gnu-i686.tar.gz
# restore file mods
chmod u+x ${HOME}/mysql-3.23.53a-pc-linux-gnu-i686/bin/*
chmod u+x ${HOME}/mysql-3.23.53a-pc-linux-gnu-i686/support-files/*
chmod u+x ${HOME}/mysql-3.23.53a-pc-linux-gnu-i686/tests/*
chmod u+x ${HOME}/mysql-3.23.53a-pc-linux-gnu-i686/scripts/mysql_install_db
# install db
cd ${HOME}/mysql-3.23.53a-pc-linux-gnu-i686/
./scripts/mysql_install_db # start mysqld
./bin/safe_mysqld & # repair access passwords
cd ${HOME}/mysql-3.23.53a-pc-linux-gnu-i686/bin/
./mysqladmin --user=root --password= password '123456'
./mysqladmin --user=root --password= --host=host.domain.com password '123456'

Tomcat Configuration

This is not meant to be a Tomcat installation manual. It only explains how to make a simple installation. Tomcat will be installed in the user home directory (${HOME}). After the installation the Tomcat directory is referred to as ${CATALINA_HOME}
# verify that java is installed
echo ${JAVA_HOME}
# go to ${HOME}
# unzip the downloaded binary distribution
unzip tomcat-4.1.27.zip
# ${CATALINA_HOME} is ${HOME}/tomcat-4.1.27
# restore file mods
chmod u+x catalina.sh
# start Tomcat
./catalina.sh start
# browse http://localhost:8080/ to verify that Tomcat has started

You might find useful to set tomcat user accounts. Edit ${CATALINA_HOME}/conf/tomcat-users.xml:

<?xml version='1.0' encoding='utf-8'?>
  <role rolename="manager"/>
  <role rolename="admin"/>
  <user username="both" password="changeme" roles="admin,manager"/>

Prepare MySQL

Copy to the current directory the file ${HOME}/juddi_0.8.0_bin/ddl/juddi_mysql.ddl
cp juddi_0.8.0_bin/ddl/juddi_mysql.ddl .
Connect to the installed mysql as follows:
mysql --host=host.domain.com --port=3306 --user=root --password=123456
Run the following:

# Create the jUDDI database
# Sets global privileges to user juddi
REPLACE INTO mysql.user SET 
  Host = '%', # any hostname (including localhost)
  # alternatively '', '129.%', 'localhost'
  User = 'juddi',
  Password = PASSWORD('123456'),
  Select_priv = 'Y',
  Insert_priv = 'Y', 
  Update_priv = 'Y', 
  Delete_priv = 'Y', 
  Create_priv = 'Y', 
  Drop_priv = 'Y', 
  Reload_priv = 'Y', 
  Shutdown_priv = 'Y', 
  Process_priv = 'Y', 
  File_priv = 'Y', 
  Grant_priv = 'Y', 
  References_priv = 'Y', 
  Index_priv = 'Y', 
  Alter_priv = 'Y'
  # Show_db_priv = 'N',
  # Super_priv = 'N',
  # Create_tmp_table_priv = 'N',
  # Lock_tables_priv = 'N',
  # Execute_priv = 'N',
  # Repl_slave_priv = 'N',
  # Repl_client_priv = 'N',
  # ssl_type = 'X509',
  # ssl_cipher = '', # blob
  # x509_issuer = '', # blob
  # x509_subject = '', # blob
  # max_questions = '0',
  # max_updates = '0',
  # max_connections = '0'

# fix the mysql security gaps 
# NOTE: allowed access from root@localhost, root@domain.com
DELETE FROM mysql.user WHERE User='';
UPDATE mysql.user SET Password=PASSWORD('123456') 
  WHERE user='root';

# Optionaly Set db provilege and host privileges
# This should be used if the juddi user should not 
# have global privileges. In detail mysql access control
# is calculated as follows:
#   global privileges
#   OR (database privileges AND host privileges)
#   OR table privileges
#   OR column privileges
  Host = '%', # if blank intersect with the mysql.host record
  Db = 'juddi%', 
  User = 'juddi', 
  Select_priv = 'Y', Insert_priv = 'Y', 
  Update_priv = 'Y', Delete_priv = 'Y', 
  Create_priv = 'Y', Drop_priv = 'Y',
  Grant_priv = 'N', References_priv = 'Y', 
  Index_priv = 'Y', Alter_priv = 'Y', 
  Create_tmp_table_priv = 'N', 
  Lock_tables_priv = 'N'
INSERT INTO mysql.host SET
  Host = '%',
  Db = 'juddi%',
  Select_priv = 'Y', Insert_priv = 'Y',
  Update_priv = 'Y', Delete_priv = 'Y',
  Create_priv = 'N', Drop_priv = 'N',
  Grant_priv = 'N', References_priv = 'N',
  Index_priv = 'N', Alter_priv = 'N',
  Create_tmp_table_priv = 'N',
  Lock_tables_priv = 'N'

# create the jUDDI tables
USE juddi;
SOURCE juddi_mysql.ddl;

# add a jUDDI publisher
# PUBLISHER_ID  The user ID the publisher uses when authenticating.
# IMPORTANT: This should be the same value used to authenticate 
# with the external authentication service. 
# PUBLISHER_NAME The publisher's name (or in UDDI speak the
# Authorized Name). 
# ADMIN Indicate if the publisher has administrative privileges.
# Valid values for this column are 'true' or 'false'. The ADMIN 
# value is currently not used.

  VALUES ('juddi','juddi user','false');

To exit MySQL type:

Install the jUDDI web application

Tomcat should be shutdown during this procedure.

Unzip the ${HOME}/juddi_0.8.0_bin/build/juddi.war file at the directory ${CATALINA_HOME}/webapps/juddi/
Set the following properties at the file ${CATALINA_HOME}/webapps/juddi/WEB-INF/classes/juddi.properties

# The UDDI Operator Name
juddi.operatorName = eurodyn.com
# the DataSource JNDI name

Set the following properties at ${CATALINA_HOME}/webapps/juddi/WEB-INF/classes/log4j.properties

# set the log file to ${HOME}/juddi.log and not the ${PWD}/juddi.log

Configure Tomcat for jUDDI

Add the following lines at the ${CATALINA_HOME}/conf/server.xml file, Host element

<Context path="/juddi" docBase="juddi" debug="5" reloadable="true" 
  <Logger className="org.apache.catalina.logger.FileLogger"
               prefix="localhost_juddiDB_log" suffix=".txt"
   <!-- the Resource element will probably work better for 
       you on Tomcat 5+ if you simply use a Resource only tag 
       with xml attributes as opposed to the nested ResourceParams and
       parameter elements -->
  <Resource name="jdbc/juddiDB"
  <ResourceParams name="jdbc/juddiDB">
    <!-- Maximum number of dB connections in pool. Make sure you
         configure your mysqld max_connections large enough to handle
         all of your db connections. Set to 0 for no limit. -->
    <!-- Maximum number of idle dB connections to retain in pool.
         Set to 0 for no limit. -->
    <!-- MySQL dB username and password for dB connections  -->
    <!-- Class name for mm.mysql JDBC driver -->
    <!-- The JDBC connection url for connecting to your MySQL dB.
         The autoReconnect=true argument to the url makes sure that the
         mm.mysql JDBC Driver will automatically reconnect if mysqld closed the
         connection.  mysqld by default closes idle connections after 8 hours. 
           <value>select count(*) from PUBLISHER</value>

Run Tomcat

Start the Tomcat server and test the installation browsing


Deploy_jUDDI_on_Tomcat_and_MySQL (last edited 2013-04-09 20:49:10 by KurtTStam)