This post provides examples of dsconfig usage for OpenDJ config management. I might expand and update the post in the future, as i find more info.
All the logs audit trails will be saved as long as you use OpenDJ supplied tools for modifying the DJ configs:
- OpenDJ Control Panel and
- openDJ command line tools, located under /bin directory, of the OpenDJ install
You could also modify the config files directly, via vi or nano, if you don’t care about proper audit trail or automatic config file backups, each time you modify something.
config.ldif is the current config file for OpenDJ, under OpenDJ install/config/ folder. There is also another file called “config.ldif.startok”, which is last well known config file that worked.
“archived-configs” under OpenDJ/config/ contains backups taken each time you used the proper tool to modify the config files.
It’s highly suggested/recommended to use the DJ tools; Control Panel or command line tools, for proper config rollback and archiving.
To view or edit or modify configuration files you need to use “dsconfig” tool, which is located under bin/ folder.
the following are execution methods for “dsconfig”
Interactive method– provides you with Interactive menu driven screen.
Teaching method– provides you with Interactive menu driven screen, execute the command, and gives you equivalent cli command.
Example: ” dsconfig –displayCommand”
You need to run “dsconfig –commandFilePath listbackendcli.txt”, if you want the output of the command in a text file, rather than displayed on the screen. This way you could get started with cli or save it if you want to script it in the future.
Standard method – is your cli command line.
Example “dsconfig list-backends”
Scripted method – is just that, dump your cli command line in script, and make it work 🙂
You need to create a “tools.properties” file that includes common settings with servername, Directory Manager Name, Administration port number, so it does not ask you same questions each time you run “dsconfig” or other OpenDJ tools.
Sample “tools.properties” file:
I personally would not save “bindDN” nor “bindPassword” in the tools,properties config file. If, you are one of many admins, then save the file under “userhomedir/.opendj/tools.properties”
Otherwise, you could save it under opendj install “config/tools.properties”. Again, without “bindDN” and “bindPassword”, let each admin use their username/password combo to make the necessary changes in OpenDJ.
You need to import Java and OpenDJ path, if "dsconfig" command is not found.
Export java path http://shaulov.us/2015/05/40/