Install
Overview
* Default OSGi container is Apache Felix
* Embedded Servlet engine is Jetty
* Embedded database is OrientDB (noSQL)
Download
* Download from project download site, e.g. OpenIDM 2.0.3
Build From Source
* See here for detail instructions
Checkout Trunk
* Checkout OpenIDM trunk from SVN URL: https://svn.forgerock.org/openidm/trunk
Compile and Package Source Codes
* Install Maven 3 if not already done
* Run Maven command:
mvn package
Install
* Unzip either the binary download or compiled zip file located in openidm-zip/target directory onto a local directory, e.g. /opt
[jli@localhost opt]$ mkdir openidm [jli@localhost opt]$ cd openidm [jli@localhost openidm]$ unzip /mnt/hgfs/vmshare/openidm-2.0.3.zip ... [oracle@openidmbox forgerock]$ pwd /opt [jli@localhost openidm]$ ls openidm [jli@localhost openidm]$ cd openidm/ [jli@localhost openidm]$ ls bin cli.sh connectors logs script shutdown.sh startup.sh bundle conf db samples security startup.bat workflow
Setup MySQL Data Store
* OpenIDM is bundled with OrientDB for demo purposes
* Install MySQL for non-demo use
* Install MySQL
# Install mysql server and client yum install mysql-server mysql # Start mysqld service mysqld start # Connect to mysqld mysql -u root
* Download MySQL Connector/J, e.g. mysql-connector-java-5.1.22.zip. Extract and copy jdbc driver jar file, e.g. mysql-connector-java-5.1.22-bin.jar, to the bundle directory
cp /mnt/hgfs/vmshare/downloads/mysql/mysql-connector-java-5.1.22-bin.jar bundle/
* Shutdown OpneIDM if running
./shutdown.sh
* Remove conf/repo.orientdb.json
rm conf/repo.orientdb.json
* Copy samples/misc/repo.jdbc.json to the conf directory
cd $OPENIDM_HOME cp samples/misc/repo.jdbc.json conf
* Create OpenIDM schema in MySQL
mysql -u root -p < $OPENIDM_HOME/db/scripts/mysql/openidm.sql
* Check openidm schema:
mysql -u root mysql> use openidm; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> show tables; +-----------------------------+ | Tables_in_openidm | +-----------------------------+ | auditaccess | | auditactivity | | auditrecon | | configobjectproperties | | configobjects | | genericobjectproperties | | genericobjects | | internaluser | | links | | managedapplication | | managednotification | | managedobjectproperties | | managedobjects | | manageduserapplicationlnk | | manageduserapplicationstate | | objecttypes | +-----------------------------+ 16 rows in set (0.00 sec)
* Optionally, setup specific database user (instead of root). For example:
CREATE USER 'openidm'@'localhost' IDENTIFIED BY 'openidm'; GRANT ALL ON openidm.* TO 'openidm'@'localhost';
* Edit conf/repo.jdbc.json to use MySQL schema
cat repo.jdbc.json { "connection" : { "dbType" : "MYSQL", "jndiName" : "", "driverClass" : "com.mysql.jdbc.Driver", "jdbcUrl" : "jdbc:mysql://localhost:3306/openidm", "username" : "root", "password" : "", "defaultCatalog" : "openidm", "maxBatchSize" : 100, "maxTxRetry" : 5, "enableConnectionPool" : true },
Start OpenIDM Services
Prerequisites
* Check Java version. Need to be newer than 1.6.0_24
[jli@localhost openidm]$ java -version java version "1.6.0_35" Java(TM) SE Runtime Environment (build 1.6.0_35-b10) Java HotSpot(TM) 64-Bit Server VM (build 20.10-b01, mixed mode)
* Check Jetty listening port
cd conf vi jetty.xml
<Set name="host"><Property name="jetty.host" /></Set> <Set name="port">8080</Set>
Start Felix Container
[jli@localhost openidm]$ ls bin cli.sh connectors logs script shutdown.sh startup.sh bundle conf db samples security startup.bat workflow [jli@localhost openidm]$ ./startup.sh ./startup.sh Using OPENIDM_HOME: /opt/openidm/openidm Using OPENIDM_OPTS: -Xmx1024m Using LOGGING_CONFIG: -Djava.util.logging.config.file=/opt/openidm/openidm/conf/logging.properties Using boot properties at /opt/openidm/openidm/conf/boot/boot.properties ->
Interactive Commands
help
-> help refresh bundlelevel start find sysprop log stop install ps shutdown update startlevel cd help version inspect uninstall resolve headers scr Use 'help <command-name>' for more information.
ps
* List installed bundles
-> ps START LEVEL 12 ID State Level Name [ 0] [Active ] [ 0] System Bundle (4.0.2) [ 1] [Active ] [ 10] Commons Codec (1.5) [ 2] [Active ] [ 10] Commons Lang (2.6) [ 3] [Active ] [ 10] OpenICF Framework (1.1.0.0) [ 4] [Resolved ] [ 10] OpenICF Framework - Internal (1.1.0.0) [ 5] [Active ] [ 10] OpenICF Framework - OSGi (1.1.0.0) [ 6] [Active ] [ 10] Groovy Runtime (1.8.3) [ 7] [Active ] [ 10] Apache HttpClient OSGi bundle (4.1.2) [ 8] [Active ] [ 10] Apache HttpCore OSGi bundle (4.1.2) [ 9] [Resolved ] [ 10] OpenICF Framework - logging over SLF4J (1.1.0.0) [ 10] [Active ] [ 10] Jackson JSON processor (1.9.5) [ 11] [Active ] [ 10] Data mapper for Jackson JSON processor (1.9.5) [ 12] [Active ] [ 10] Servlet 2.1 API (1.0.0) [ 13] [Active ] [ 10] jcl-over-slf4j (1.6.4) [ 14] [Active ] [ 10] file:/opt/openidm/openidm/bundle/json-crypto-cli-1.1.0.jar [ 15] [Active ] [ 10] JSON Crypto core library (1.1.0) [ 16] [Active ] [ 10] JSON Fluent (1.1.0) [ 17] [Active ] [ 10] JSON Patch library (1.0.0) [ 18] [Active ] [ 10] JSON Schema Draft-03 Validator (1.0.0) [ 19] [Active ] [ 10] JavaMail API (compat) (1.4.4) [ 20] [Active ] [ 10] OpenIDM audit module (2.0.3) [ 21] [Active ] [ 10] OpenIDM core (2.0.3) [ 22] [Active ] [ 10] OpenIDM enhanced Configuration classes (2.0.3) [ 23] [Active ] [ 10] OpenIDM external email service (2.0.3) [ 24] [Active ] [ 10] OpenIDM external REST service (2.0.3) [ 25] [Active ] [ 10] OpenIDM authentication filter (2.0.3) [ 26] [Active ] [ 10] OpenIDM http context (2.0.3) [ 27] [Active ] [ 10] OpenIDM provisioner (2.0.3) [ 28] [Active ] [ 10] OpenIDM provisioner using OpenICF (2.0.3) [ 29] [Active ] [ 10] OpenIDM repository common (2.0.3) [ 30] [Active ] [ 10] OpenIDM Restlet integration (2.0.3) [ 31] [Resolved ] [ 10] OpenIDM System Fragment (2.0.3) [ 32] [Active ] [ 10] OpenIDM utility classes (2.0.3) [ 33] [Active ] [ 10] OPS4J Base - Lang (1.2.3) [ 34] [Active ] [ 10] Apache Felix Gogo Runtime (0.10.0) [ 35] [Active ] [ 10] Apache Felix Log Service (1.0.1) [ 36] [Active ] [ 10] Apache Felix Declarative Services (1.6.0) [ 37] [Active ] [ 10] Apache Felix Shell Service (1.4.3) [ 38] [Active ] [ 10] Apache Felix Shell TUI (1.4.1) [ 39] [Active ] [ 10] Apache Felix Web Management Console (3.1.8) [ 40] [Active ] [ 10] Apache ServiceMix :: Bundles :: quartz (1.8.4.2) [ 41] [Active ] [ 10] Apache ServiceMix :: Bundles :: js (1.0.0.7R2_3) [ 42] [Active ] [ 10] JSON Resource core (1.2.2) [ 43] [Active ] [ 10] JSON Resource Restlet integration (1.2.2) [ 44] [Active ] [ 10] Restlet utility classes (1.0.0) [ 45] [Active ] [ 10] ForgeRock Utility Classes (1.0.0) [ 46] [Active ] [ 10] OSGi R4 Compendium Bundle (4.1.0) [ 47] [Active ] [ 10] OSGi R4 Core Bundle (4.1) [ 48] [Active ] [ 10] Restlet API (2.0.9.0) [ 49] [Active ] [ 10] Restlet Extension - Apache HTTP Client (2.0.9.0) [ 50] [Active ] [ 10] Restlet Extension - Jackson (2.0.9.0) [ 51] [Active ] [ 10] Restlet Extension - Servlet (2.0.9.0) [ 52] [Active ] [ 10] OPS4J Pax Swissbox :: OSGi Core (1.4.0) [ 53] [Active ] [ 10] OPS4J Pax Swissbox :: Extender (1.4.0) [ 54] [Active ] [ 10] OPS4J Pax Swissbox :: Lifecycle (1.4.0) [ 55] [Active ] [ 10] OPS4J Pax Swissbox :: Optional JCL (1.4.0) [ 56] [Active ] [ 10] Rhino Debugger (1.0.300.v201109150503) [ 57] [Active ] [ 10] slf4j-api (1.6.4) [ 58] [Resolved ] [ 10] slf4j-jdk14 (1.6.4) [ 59] [Active ] [ 10] Debug Transport (1.0.100.v201109150330) [ 60] [Resolved ] [ 1] OpenIDM fragment for jetty security (2.0.3) [ 61] [Resolved ] [ 1] OpenIDM JAAS login module for Repository (2.0.3) [ 62] [Resolved ] [ 1] OpenIDM Jetty Fragment (2.0.3) [ 63] [Active ] [ 12] OPS4J Pax Web - Extender - Whiteboard (1.1.1) [ 64] [Active ] [ 12] OpenIDM scheduler (2.0.3) [ 65] [Active ] [ 11] OPS4J Pax Web - Jetty Bundle (1.1.1) [ 66] [Active ] [ 3] Apache Felix Configuration Admin Service (1.2.8) [ 67] [Active ] [ 3] Apache Felix File Install (3.1.10) [ 68] [Active ] [ 2] OpenIDM repository using JDBC (2.0.3) [ 69] [Active ] [ 2] OpenIDM repository using OrientDB (2.0.3) [ 70] [Active ] [ 1] OpenIDM configuration support (2.0.3) [ 71] [Active ] [ 1] OpenIDM cryptography service (2.0.3) ->
Run in Background
* Silence Console Ouput
vi conf/logging.properties
java.util.logging.ConsoleHandler.level = OFF
* Disable Interactive Console
– Remove bundle/org.apache.felix.shell.tui-
mv org.apache.felix.shell.tui-1.4.1.jar org.apache.felix.shell.tui-1.4.1.jar.ori
* Run in background
nohup ./startup.sh &
Shutdown
* From command line: ./shutdown.sh
* From Admin Console: System Information > Stop
* From interactive console: -> shutdown
Admin Console
Access and Login
* URL: http://openidmbox:8080/system/console
* Default login: admin/admin
Bundles
OpenIDM Components
Shell
System Information
UI
Install
* You need to download the 2.1.0 nightly build in order to see UI.
* For example,
$ unzip /mnt/hgfs/vmshare/openidm-2.1.0-SNAPSHOT_nightly.zip $ cd openidm/ $ ls audit cli.bat connectors logs security startup.sh bin cli.sh db samples shutdown.sh ui bundle conf felix-cache script startup.bat workflow $ ./startup.sh ./startup.sh Using OPENIDM_HOME: /opt/openidm/openidm-2.1.0-SNAPSHOT_nightly/openidm Using OPENIDM_OPTS: -Xmx1024m Using LOGGING_CONFIG: -Djava.util.logging.config.file=/opt/openidm/openidm-2.1.0-SNAPSHOT_nightly/openidm/conf/logging.properties Using boot properties at /opt/openidm/openidm-2.1.0-SNAPSHOT_nightly/openidm/conf/boot/boot.properties -> OpenIDM version "2.1.0-SNAPSHOT" (revision: 1199) ->
Login URL
* UI can be accessed from URL: http://openidmbox:8080/openidmui/index.html
Login as Admin
* Admin account is: openidm-admin/openidm-admin
User Provisioning
* Add user
* Edit or delete user:
User Login
* Login as new user jdoe@example.com
* User profile
* Change password:
* Change avatar: