New Server Instance Installation from command line
I was trying to install a new Directory server Instance through the command line...I have requested for the procedure and one of them helped me by providing the file format ,required to create an Instance from the command line..the link from where i found the replyis placed below::
http://forum.java.sun.com/thread.jspa?threadID=5156387&tstart=0
When i tried to Install using the above method...I got the files created for the new Server Instance..but when i tried to Start the Instance,i came to know tht the configuration file is not installed ..and i got an error mentioning that the dse.ldif cannot be made.....you can also see the error i got in the above mentioned link....Also the schema files are also not created during the installation
So later i copied the dse.ldif and schema files from the existing ServerInstance and made the modifications in the dse.ldif for the new server..and then tried to start the server....It worked out good and the new instance Servrer started...
I would like to know whether the procedure i hve done is right ?because am not able to see the newly created Instance when i open the DS throught the GUI....what is the solution for this?
# 1
> I would like to know whether the
> procedure i hve done is right ?because am not able
> to see the newly created Instance when i open the DS
> throught the GUI....what is the solution for this?
As Ludovic mentions in the forum thread you link to, ds_create works for 5.x, but is not supported. Also, and more importantly, it is not really complete.
When you create a server instance using the console, the console stores information about the instance in the configuration directory, under o=NetscapeRoot on your configuration directory instance. Without this information about the server instance being managed, the console won't have what it needs to manage the instance.
In Directory Server 6.0, as Ludovic mentions, you have the dsadm create
command to create instances. You also have the dsccreg command, see http://docs.sun.com/app/docs/doc/819-0986/6n3chglmf?a=view, which let's you register the server instance with Directory Server Control Center. Directory Service Control Center is the web application in version 6 that replaces the Admin Server/Console combination used in DS 5.x.
# 2
Hi Mark,
I realise that the ds_create command is unsupported, but I am interested in your comment that it is incomplete.
Can you specify which information is not put under o=NetscapeRoot that is otherwise created when the console is used?
We have a production requirement to have a scripted method to create a DS instance with DS5.2, and I have used the ds_create to accomplish this. I just looked at the configuration instance for a DS that I used ds_create for creating an extra instance; there exists an entry under o=NetscapeRoot for that instance:
cn=configuration,cn=slapd-INSTANCE,cn=Sun ONE Directory Server,cn=Server Group,cn=SERVER_FQDN,ou=DOMAIN,o=NetscapeRoot
I appreciate any further info you can provide on this.
Thanks :-)
# 3
Hi Aaron,
some years ago we had a look into this, but decided not to use it because it was unsupported. We used the following script (if I remember correctly it was supplied by a sun instructor after a seminar), maybe it is helpful for you. Only basic tests were made, but it worked as far as we could tell.
#!/bin/sh
set -x
# create_instance.shCreate Directory Server Instance
# Paramaters passed determine directory instance and port
USERDB_IDENTIFIER=corpdir
USERDB_PORT=389
LOG=/tmp/instance_creation.log
#
# WARNING: Do not change entries below this line
#
HOSTNAME=`hostname`
DOMAINNAME=`domainname`
DIR_MGR_USER="cn=Directory Manager"
DIR_MGR_PASSWD="password"
ADMIN_ID="admin"
ADMIN_PASSWD="password"
SERVERROOT="/application/jes/ds"
ROOT_SUFFIX="dc=com"
CONFIG_PORT="3900"
#
# Create silent install configuration file
#
cat << EOF > /tmp/add_instance.inf
[slapd]
ServerPort = $USERDB_PORT
ServerIdentifier = $USERDB_IDENTIFIER
RootDN = $DIR_MGR_USER
RootDNPwd = $DIR_MGR_PASSWD
Suffix = $ROOT_SUFFIX
SlapdConfigForMC = no
UseExistingMC = yes
UseExistingUG = no
SecurityOn = no
UseReplication = no
SetupSupplier = no
SetupConsumer = no
AddSampleEntries = no
InstallLdifFile = suggest
AddOrgEntries = yes
DisableSchemaChecking = no
[General]
ConfigDirectoryLdapURL = ldap://$HOSTNAME.$DOMAINNAME:$CONFIG_PORT/
ConfigDirectoryAdminID = $ADMIN_ID
ConfigDirectoryAdminPwd = $ADMIN_PASSWD
UserDirectoryLdapURL = ldap://$HOSTNAME.$DOMAINNAME:$USERDB_PORT/$ROOT_SUFFIX
UserDirectoryAdminID = $DIR_MGR_USER
UserDirectoryAdminPwd = $DIR_MGR_PASSWD
FullMachineName = $HOSTNAME.$DOMAINNAME
ServerRoot = $SERVERROOT
AdminDomain = $DOMAINNAME
EOF
#
# Create addition instance based on above parameters
#
cd $SERVERROOT/bin/slapd/admin/bin
./ds_create -f /tmp/add_instance.inf
return_code=$?
if [ $return_code -ne 0 ]
then
echo "create_instance: Failed to create slapd-$USERDB_IDENTIFIER:$USERDB_PORT" >>$LOG
exit 1
else
echo "create_instance: slapd-$USERDB_IDENTIFIER:$USERDB_PORT created." >>$LOG
rm -f /tmp/add_instance.inf
exit 0
fi
#
# Verify connectivity
#
cd $SERVERROOT/shared/bin
./ldapsearch -h $HOSTNAME -p $USERDB_PORT \
-D "$DIR_MGR_USER" -w $DIR_MGR_PASSWD \
-b "dc=vol,dc=verizon,dc=net" objectclass=* >/dev/null 2>&1
return_code=$?
if [ $return_code -ne 0 ]
then
echo "create_instance: Connect failed - slapd-$USERDB_IDENTIFIER:$USERDB_PORT" >>$LOG
exit 1
else
echo create_instance: "Connected - slapd-$USERDB_IDENTIFIER:$USERDB_PORT" >>$LOG
exit 0
fi