Changing The Log Location In The Command Line - Red Hat DIRECTORY SERVER 8.1 - USING THE ADMIN SERVER Using Instructions

Using the admin server
Table of Contents

Advertisement

5. Click OK to save the changes.
6. Open the Tasks tab, and click the Restart Server button to restart the server and apply the
changes.

2.4.4. Changing the Log Location in the Command Line

The access and error log files' names and locations can be changed to rotate the files. This rotation
has to be done manually to create new files if the existing log files become too large. The location
can be changed if the default location in /var/log/dirsrv/admin-serv/ does not meet the
application needs.
The Admin Server configuration is stored in two locations. The main entry is an LDAP entry in the
Configuration Directory Server's o=NetscapeRoot database. The other is the console.conf file.
Changing the log settings requires changing both settings.
1. Edit the Admin Server configuration entry in the Configuration Directory Server.
a. Get the name of the Admin Server entry. Since the Admin Server entry has a special object
class, nsAdminConfig, it is possible to search for the entry using that object class to retrieve
the DN.
/usr/lib/mozldap/ldapsearch -D "cn=directory manager" -w
secret -p 389 -h server.example.com -b "o=NetscapeRoot"
"(objectclass=nsAdminConfig)" dn
version:1
dn: cn=configuration, cn=admin-serv-example, cn=Red Hat
Administration Server, cn=Server Group, cn=server.example.com,
ou=example.com, o=NetscapeRoot
b. The Admin Server entry can be edited using ldapmodify. The access and error log settings
are stored in the nsAccessLogs and nsErrorLogs attributes, respectively. For example:
/usr/lib/mozldap/ldapmodify -D "cn=directory manager" -w secret -p
389 -h server.example.com
dn: cn=configuration, cn=admin-serv-example, cn=Red Hat
Administration Server, cn=Server Group, cn=server.example.com,
ou=example.com, o=NetscapeRoot
changetype:modify
replace:nsAccessLog
nsAccessLog:/var/log/dirsrv/admin-serv//access_new
Hit Enter twice to submit the operation, and then Control+C to close ldapmodify.
2. Open the Admin Server configuration directory.
cd /etc/dirsrv/admin-serv
Changing the Log Location in the Command Line
11

Advertisement

Table of Contents
loading

This manual is also suitable for:

8.1

Table of Contents