How to configure GoldenGate Ftp using default implementation
In the zip distribution GoldenGateFtp-X.Y.Z-dist.zip (available at sourceforge for download), you will find an extra directory named: src/main/config where two examples files are: config.xml and authent.xml.
Those two files are related to the simple implementation of the Ftp Server.
The first one (config.xml) specifies the general behavior:
server password (for admin functions)
server port, home directory, bandwidth limitation, optional server address (in case of NAT for instance)
-
server special configuration like threads number, timeout of connection, deleteOnAbort, usenio, fastmd5, blocksize, rangeport and the localization of the authentfile (second file)
The second one is a simple authentication file containing user definition (user name, password, account, admin status).
These two files are for the simple implementation (which is a simple FtpServer without any special actions), and using a simple authentication mechanism (from authent.xml). The simple Ftp Server is included in the GoldenGateFtp-Simpleimpl-X.Y.Z.jar .
It can be started like:
java ... classpath and jvm settings ... goldengate.ftp.simpleimpl.SimpleGatewayFtpServer src/main/config/config.xml
Note that in the classpath you need :
External jars:
-
Goldengate jars:
and of course the GoldenGateFtp-Core
probably the GoldenGateFtp-Filesystem (except if you want to implement virtual Directory and File in something different than true directories and files)
-
(and if you are ok with the default implementation) the GoldengateFtp-Simpleimpl jars.
Some of them can be replaced if you change the implementation (Common IO is optional, Dom4J and Jaxen are only used if XML configuration file is used, SLF4J and Logback could be replaced with other logger framework, see the goldengate.common.logging from GoldenGateCommon where JDK is also supported, others can easily be supported).
If you want to implement something different, here are the files you may want to re write. They can all be found in the simpleimpl sub package at goldengate.ftp.simpleimpl package. A perfect example is the GoldenGateFtpExec sub project.
By default an XML file is used. If you want to use other ways to implement the load of the configuration, you can change this implementation by the one you want (for instance from a database).
If you want to include some others configurations properties and XML is ok for you, you can extend it to fit your needs.
For instance, if you want to implement File and Directory as content in a database, you will have to not use the GoldenGateFtp-Filesystem-X.Y.Z.jar package an to implement your own File and Directory representation.
If you are OK with real file and directory, then nothing has to be done.
For instance, if you want to inherit authentication from a LDAP, you will have to implement your own extension of goldengate.ftp.filesystembased.FilesystemBasedFtpAuth instead of this simple one.
By default, this classes does nothing except logging.
To shutdown the service, either you do a CTRL-C (or better if Unix but not IBM JDK kill -SIGUSR1 <processID>), or better you connect as an admin user and execute the special command:
internalshutdown <password>
where the password is the one in the config.xml for admin actions.
For instance, using FTP from windows you have to type
>quote internalshutdown password
Note that this FTP Server can be used as a simple one, but also for more complicated cases. It is in the middle of a self FTP server (simpleimpl package) and a framework to implement its own FTP service, which is the main reason of this project since I've not found any other open source implementations allowing to have pre or post actions on transfers or commands.