blob: a4528794d5085f58ff194e85164082d9ad931966 [file] [log] [blame]
Title: 2.2.5 - Generic Instance Layout
NavPrev: 2.2.4-windows-instance-layout.html
NavPrevText: 2.2.4 - Windows Instance Layout
NavUp: 2.2-instance-layout.html
NavUpText: 2.2 Instance Layout
NavNext: 3-admin-model.html
NavNextText: 3 - Administrative Model
Notice: Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
.
http://www.apache.org/licenses/LICENSE-2.0
.
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
# 2.2.5 - Generic Instance Layout
This installer just contain everything needed to start *ApacheDS* but it will not create a daemon not a Windows Service. Would one like to start *ApacheDS*, it will have to start the <em>apacheds.sh</em> or <em>apacheds.bat</bat> script shell.
The installer is just a raeball that needs to be oepend and deflated at the selected position :
tar xzpf apacheds-<version>.tar.gz
or
gunzip apacheds-<version>.zip
The layout is quite simple :
apacheds-<version>
|
+-- lib/
| |
| +-- apacheds-service-<version>.jar
|
+-- instances/
| |
| +-- default/
| |
| +-- run/
| |
| +-- partitions/
| |
| +-- log/
| |
| +-- conf/
| | |
| | +-- log4j.properties
| | |
| | +-- config.ldif
| |
| +-- cache/
|
+-- bin/
| |
| +-- apacheds.bat
| |
| +-- apacheds.sh
| |
| +-- cpappend.bat
|
+-- NOTICE
|
+-- LICENSE
In order to start the server, you will have to make the shell script executable (it is not by default):
$ chmod u+x apacheds-<version>/bin/apacheds.sh
## Starting the server
Starting the server is as simple as starting the script :
$ ./apacheds-<version>/bin/apacheds.sh start
Using ADS_HOME: .../apacheds-<version>
Using JAVA_HOME: /Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home/
Starting ApacheDS instance 'default'...
$
## Stopping the server
The server is now started. To stop it, you have to execute this command :
$ ./apacheds-<version>/bin/apacheds.sh stop
Using ADS_HOME: .../apacheds-<version>
Using JAVA_HOME: /Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home/
Stoping ApacheDS instance 'default' running as 23080
ApacheDS instance 'default' stopped successfully
## Selection a different instance
You can start many instances of the server, assuming you have duplicated the content of teh <em>instances/default</em> directory, and modified the <em>instances/default/conf/config.ldif</em> file (cahnge the transports so that there is no collision between servers)
## Logs
You can check what's going on in the <em>apacheds-<version>/instances/<instance-name>/log/apacheds.log</em> file, which is created using the configuration set in <em>apacheds-<version>/instances/<instance-name>/conf/log4j.properties</em>.
Typically, when you start the server, you will get such log :
$ more apacheds.log
[10:53:05] WARN [org.apache.directory.server.core.DefaultDirectoryService] - You didn't change the admin password of
directory service instance 'default'. Please update the admin password as soon as possible to prevent a possible
security breach.
and from the <em>apacheds-<version>/instances/<instance-name>/log/apacheds.out</em> file, which contains everything the server writes on the console, you will read :
$ more apacheds.out
[10:53:05] WARN [org.apache.directory.server.core.DefaultDirectoryService] - You didn't change the admin password of
directory service instance 'default'. Please update the admin password as soon as possible to prevent a possible
security breach.
_ _ ____ ____
/ \ _ __ ___ ___| |__ ___| _ \/ ___|
/ _ \ | '_ \ / _` |/ __| '_ \ / _ \ | | \___ \
/ ___ \| |_) | (_| | (__| | | | __/ |_| |___) |
/_/ \_\ .__/ \__,_|\___|_| |_|\___|____/|____/
|_|
### Log configuration
You can configure the log level and content by changing the content of the <em>/var/lib/apacheds-&lt;version&gt;/&lt;instance&gt;/&lt;conf&gt;/log4j.properties</em> file.
The default configuration is given below :
log4j.rootCategory=WARN, R, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=${apacheds.log.dir}/apacheds.log
log4j.appender.R.MaxFileSize=1024KB
# Keep some backup files
log4j.appender.R.MaxBackupIndex=5
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=[%d{HH:mm:ss}] %p [%c] - %m%n
log4j.appender.stdout.layout.ConversionPattern=[%d{HH:mm:ss}] %p [%c] - %m%n
# with these we'll not get innundated when switching to DEBUG
log4j.logger.jdbm.recman.BaseRecordManager=FATAL
log4j.logger.org.apache.directory.server.OPERATION_LOG=FATAL
log4j.logger.org.apache.directory.server.OPERATION_TIME=FATAL
log4j.logger.org.apache.directory.api.CODEC_LOG=FATAL
log4j.logger.org.apache.directory.server.ACI_LOG=FATAL
# Replication logs
log4j.logger.org.apache.directory.server.PROVIDER_LOG=FATAL
log4j.logger.org.apache.directory.server.CONSUMER_LOG=FATAL
# Search log
log4j.logger.org.apache.directory.CURSOR_LOG=FATAL
# Other logs
log4j.logger.org.apache.directory.api=FATAL
log4j.logger.org.apache.directory.server=FATAL
log4j.logger.net.sf.ehcache=FATAL
log4j.logger.org.apache.mina=FATAL