Tuesday, February 16, 2010

WebCenter Quick Install Guide


I know Oracle provides a good guide on how to perform quick install for WebCenter, but still, this is just a collection of steps I've been performing on my development machines, and it includes some things like configuring the connections to Wikis & Discussion server.
This is not meant for a enterprise deployment, but good enough for a developer, quick demo, or whenever you have a 4Gb Unix machine laying around... :-)
For this basic setup, we will be using 
WS-Security.


Resources

  1. You can get all the software from the following link - http://www.oracle.com/technology/software/products/middleware/htdocs/fmw_11_download.html

    1. Oracle Database 10g Express
    2. Repository Creation Utility (RCU 11.1.1.2.0) - used to create the necessary repositories
    3. WebLogic Server (10.3.2) - wls1032_linux32.bin
    4. Web Tier Utilities (11.1.1.2.0) - Oracle Apache installer
    5. WebCenter Suite (11.1.1.2.0) - WebCenter installer
    6. Content Management for WebCenter (10.1.3.5.1) - directory with Content Server install - to be used during WebCenter installation
  2. The best would be to install on Oracle Enterprise Linux machine, with 4Gb memory and around 10Gb~15Gb disk space. You may also try on Ubuntu, just ignore some of the failed checks.

Before you Continue...

Check out George Maggessy's great post about installation, with lots of screenshots that help visualize the steps below.



1. Install Oracle DB

Documentation
Quick Steps
1. Install Oracle XE


[oracle@mymachine E20Installers]$ su -c "rpm -i ./oracle-xe-univ-10.2.0.1-1.0.i386.rpm"
[oracle@mymachine E20Installers]$ su -c "/etc/init.d/oracle-xe configure"
  • You may also want to change the PROCESSES param to 300
[oracle@mymachine E20Installers]$ export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
[oracle@mymachine E20Installers]$ $ORACLE_HOME/bin/sqlplus sys/welcome1@xe as sysdba

SQL> alter system set processes=300 scope=spfile; 
SQL> exit;

[oracle@mymachine E20Installers]$ su -c "/sbin/service oracle-xe reload"



2. Configuring Spaces

Documentation
Quick Steps
1. Install WLS

[oracle@mymachine E20Installers]$  ./wls1032_linux32.bin
  • choose to create a new Middleware home under /u01/app/wls
  • continue with defaults
  • do not run the Quick Start at the end
2. Install WebTier

[oracle@mymachine E20Installers]$ ./webtier/Disk1/runInstaller
  • choose "Install & Configure"
  • Oracle Middleware Home is the one you just created /u01/app/wls
  • Step 5, select "Oracle HTTP Server" only and unselect the other boxes (webcache, associate with domain)
  • continue with defaults
  • once install is complete, you should be able to navigate to http://mymachine.us.oracle.com:7777
3. Create the Repository

[oracle@mymachine E20Installers]$ ./rcu/bin/rcu
  • choose "create"
  • your machine comes with Oracle XE, so for Step 2 use the following:

    • hostname = localhost
    • port = 1521
    • service name = xe
    • username = sys
    • password = welcome1
    • role = sysdba
  • during the "Checking Prerequisites" you should see a message complaining about the DB not being supported. Just click on "Ignore"
  • Step 3, keep the prefix as "DEV" and select "WebCenter Suite", along with "AS Common Schemas -> Metadata Services".
  • Step 4, use "welcome1" as password -- easy to remember
  • continue with defaults and RCU will create the tablespaces and users
4. Install WebCenter

[oracle@mymachine E20Installers]$ ./wc/Disk1/runInstaller
  • point JDK home to /u01/app/wls/jdk160_14_R27.6.5-32
  • Oracle Middleware Home is the one you just created /u01/app/wls
  • Step 4, let's install UCM as well:

  • Step 5, use the following:

    • Connect String = localhost:1521:xe - pay attention to this one!
    • Schema User Name = DEV_OCSERVER
    • Schema Password = welcome1
  • click "Install"
  • click "Next" to start the UCM install
  • point UCM Media Directory to /u01/oracle/software/E20Installers/ContentServer (or wherever we have the software)
  • click "Next" and wait for install to finish
5. Configure WebCenter domain

  • We need to create a new WLS domain to host our WebCenter stuff.
  • that is done by using the WLS Config tool

    [oracle@mymachine E20Installers]$ cd /u01/app/wls/Oracle_WC1/common/bin/
    [oracle@mymachine bin]$ ./config.sh
    
  • choose "Create a new Weblogic Domain"
  • check all the checkboxes, so all products are supported
  • for testing purposes, Domain name = boot_domain
  • use "welcome1" as password for user "weblogic"
  • go with "Development" and "Sun JDK"
  • Configure JDBC Component Schema

    • to make it simpler to edit, check all the checkboxes and make the 3 (and only 3) changes below:
    • DBMS/Service = xe
    • hostname = localhost
    • Schema Password = welcome1
    • click "Next" and make sure all the connection tests are ok
  • Select Optional Configuration -- there is no need to do any, but you might want to choose to have all services running on a Unix Machine.

    • refer to George's blog regarding this step
6. Start the services

  • To verify the install so far, let's start the servers
  • Weblogic Admin Server

    [oracle@mymachine bin]$ cd /u01/app/wls/user_projects/domains/boot_domain/
    [oracle@mymachine boot_domain]$ ./startWebLogic.sh
    
  • WebCenter Services

    • before you do that, let's create a boot.properties to avoid having to type username/pwd everytime

      [oracle@mymachine boot_domain]$ cd servers
      [oracle@mymachine servers]$ mkdir -p WLS_Services/security
      [oracle@mymachine servers]$ cd WLS_Services/security/
      [oracle@mymachine security]$ vi boot.properties
      ---- add these 2 lines
      username=weblogic
      password=welcome1
      ---- save and exit
      [oracle@mymachine security]$ cd ../../../bin
      [oracle@mymachine bin]$ ./startManagedWebLogic.sh WLS_Services
      
  • WebCenter Spaces

    • before you do that, let's create a boot.properties to avoid having to type username/pwd everytime

      [oracle@mymachine boot_domain]$ cd servers
      [oracle@mymachine servers]$ mkdir -p WLS_Spaces/security
      [oracle@mymachine servers]$ cd WLS_Spaces/security/
      [oracle@mymachine security]$ vi boot.properties
      ---- add these 2 lines
      username=weblogic
      password=welcome1
      ---- save and exit
      [oracle@mymachine security]$ cd ../../../bin
      [oracle@mymachine bin]$ ./startManagedWebLogic.sh WLS_Spaces
      
  • You should now be able to access:


3. Configuring UCM

Documentation
Quick Steps
1. Configure UCM to use HTTP

  • this is a quick step, to make sure UCM shows up on the URL we specified before - http://mymachine.us.oracle.com:7777/ucm
  • for this, we need to edit the http.conf file for the WebTier's Apache, and append 2 lines

    [oracle@mymachine E20Installers]$ cd /u01/app/wls/Oracle_WT1/instances/instance1/config/OHS/ohs1
    [oracle@mymachine ohs1]$ vi httpd.conf
    ---- append
    #needed for UCM
    include "/u01/app/wls/Oracle_WC1/ucm/data/users/apache22/apache.conf"
    
  • save and exit vi
  • bounce the HTTP server

    [oracle@mymachine ohs1]$ cd ../../../bin/
    [oracle@mymachine bin]$ ./opmnctl stopall
    opmnctl stopall: stopping opmn and all managed processes...
    [oracle@mymachine bin]$ ./opmnctl startall
    opmnctl startall: starting opmn and all managed processes...
    [oracle@mymachine bin]$
    
  • test by navigating to http://mymachine.us.oracle.com:7777/ucm
2. Register the UCM Server connection

  • Login to Fusion EM http://mymachine.us.oracle.com:7001/em
  • Navigate to "Farm" -> "WebCenter" -> "WebCenter Spaces" -> "webcenter"
  • right-click to open the context menu, and select "Settings" -> "Service Configuration"
  • click on "Content Repository" -> "Add"

    • Connection name = boot_ucm
    • Repository type = Oracle Content Server
    • Active Connection = check
    • Administrator User Name = sysadmin
    • Root Folder = /bootcamp
    • Application Name = bootcamp
    • RIDC Socket Type = Socket
    • Server Host = localhost -- MUST be localhost
    • Server Port = 4444
    • continue with defaults
  • save and bounce WLS_Spaces
  • you should now be able to login to Spaces and see your Documents

    • go to "Page Actions" -> "Manage Pages" and select "Documents" to show up

4. Configuring Discussion Forums

Documentation
Quick Steps
1. Configure WS-Security

  • we need to generate the certificates
  • open a new Terminal window and do the following:

    [oracle@mymachine wls]$ cd /u01/app/wls/
    [oracle@mymachine wls]$ mkdir keystore
    [oracle@mymachine wls]$ cd keystore/
    [oracle@mymachine keystore]$ ../jdk160_14_R27.6.5-32/bin/keytool -genkeypair -keyalg RSA \
        -dname "cn=mymachine,dc=us,dc=oracle,dc=com" -alias orakey -keypass welcome1 -keystore \
        webcenter.jks -storepass welcome1 -validity 1064
    
    [oracle@mymachine keystore]$ ../jdk160_14_R27.6.5-32/bin/keytool -exportcert -v \
        -alias orakey -keystore webcenter.jks -storepass welcome1 -rfc -file orakey.cer
    Certificate stored in file 
    
    [oracle@mymachine keystore]$ ../jdk160_14_R27.6.5-32/bin/keytool -importcert \
        -alias webcenter_spaces_ws -file orakey.cer -keystore webcenter.jks \
        -storepass welcome1
    Certificate already exists in keystore under alias 
    Do you still want to add it? [no]:  yes
    Certificate was added to keystore
    
    [oracle@mymachine keystore]$ cp webcenter.jks /u01/app/wls/user_projects/domains/boot_domain/config/fmwconfig/
    
  • login to Fusion EM - http://mymachine.us.oracle.com:7001/em
  • navigate to "Farm_boot_domain" -> "Weblogic Domain" -> "boot_domain"
  • right-click to open the context menu, and select "Security" -> "Security Provider Configuration"
  • scroll down to "Keystore", expand it, and click "Configure"
  • un-check the box "Configure Keystore Management" and click "Ok" -- this is to reset the configuration
  • go back to "Keystore", and click "Configure"
  • check the box "Configure Keystore Management" and enter the following info

    • Keystore Path = ./webcenter.jks
    • Password = welcome1 -- Confirm Pwd = welcome1
    • Signature Key Alias = orakey
    • Signature Password = welcome1 -- Confirm Pwd = welcome1
    • Encryption Key Crypt Alias = orakey
    • Crypt Password = welcome1 -- Confirm Pwd = welcome1
  • restart the WLS Admin Server
2. Configure Discussion Server

  • back on the Terminal, make sure you are still in the keystore folder -- /u01/app/wls/keystore

    [oracle@mymachine keystore]$ ../jdk160_14_R27.6.5-32/bin/keytool -importcert -alias df_orakey_public \
        -file orakey.cer -keystore owc_discussions.jks -storepass welcome1
    Owner: CN=mymachine, DC=us, DC=oracle, DC=com
    Issuer: CN=mymachine, DC=us, DC=oracle, DC=com
    Serial number: 4b69f328
    Valid from: Wed Feb 03 17:05:28 EST 2010 until: Wed Jan 02 17:05:28 EST 2013
    Certificate fingerprints:
             MD5:  3C:7A:D7:33:1A:21:9F:BA:24:A2:D1:9E:09:F6:FC:93
             SHA1: 59:B6:3F:78:8D:5B:28:E4:E8:8C:7E:B1:9A:22:A9:20:F6:39:F1:20
             Signature algorithm name: SHA1withRSA
             Version: 3
    Trust this certificate? [no]:  yes
    Certificate was added to keystore
    
    MAKE SURE keystore.properties HAS NO EXTRA SPACES!!! DOUBLE CHECK EACH LINE TO MAKE SURE OF THAT!!!
    
    [oracle@mymachine keystore]$ vi keystore.properties
    org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
    org.apache.ws.security.crypto.merlin.keystore.type=jks
    org.apache.ws.security.crypto.merlin.keystore.password=welcome1
    org.apache.ws.security.crypto.merlin.keystore.alias=df_orakey_public
    org.apache.ws.security.crypto.merlin.file=/u01/app/wls/keystore/owc_discussions.jks
    
  • edit the following file, to make sure the CLASSPATH can reach this properties file

    [oracle@mymachine keystore]$ vi ../user_projects/domains/boot_domain/bin/setDomainEnv.sh
    ---- add the following lines to the end of this file
    if [ "${CLASSPATH}" != "" ] ; then
      CLASSPATH="${CLASSPATH}${CLASSPATHSEP}/u01/app/wls/keystore/"
      export CLASSPATH
    else
      CLASSPATH="/u01/app/wls/keystore/"
      export CLASSPATH
    fi
    
  • Login to the Jive Admin tool - http://mymachine.us.oracle.com:8890/owc_discussions/admin - weblogic/welcome1
  • Go to "System Properties"
  • Modify the value of webservices.soap.custom.crypto.fileName so that it points to the properties file you just created

    • webservices.soap.custom.crypto.fileName = keystore.properties
    • ! note that you don't need to specify full path, as you made the change to the CLASSPATH
    • click "Save Property"
  • Let's also add/edit the jiveURL so that RSS feeds are correctly setup

    • jiveURL = mymachine.us.oracle.com:8890/owc_discussions
    • click "Save Property"
3. Register Discussion Server connection

  • login to Fusion EM - http://mymachine.us.oracle.com:7001/em
  • Navigate to "Farm" -> "WebCenter" -> "WebCenter Spaces" -> "webcenter"
  • right-click to open the context menu, and select "Settings" -> "Service Configuration"
  • click on "Discussions and Announcements" -> "Add"

    • Connection name = boot_discussions
    • Repository type = Oracle Content Server
    • Active Connection = check
    • Server URL = http://mymachine.us.oracle.com:8890/owc_discussions
    • Administrator User Name = weblogic
    • Connection Secured = check
    • Expand "Additional Properties" and click "Add" for the following properties

      keystore.location/u01/app/wls/user_projects/domains/boot_domain/config/fmwconfig/webcenter.jks
      keystore.typejks
      keystore.passwordwelcome1 -- To encrypt the password, check "Is Property Secured"
      encryption.key.aliasorakey
      encryption.key.passwordwelcome1 -- To encrypt the password, check "Is Property Secured"
      group.mappingforum -- that is the default value
  • save and bounce everything - WLS_Admin, WLS_Services, WLS_Spaces
  • you should now be able to login to Spaces and see your Discussions

    • go to "Page Actions" -> "Manage Pages" and select "Documents" to show up

5. Configuring Wiki

Documentation
Quick Steps
1. Generate the Passcode

  • login to Fusion EM - http://mymachine.us.oracle.com:7001/em
  • navigate to "Farm_boot_domain" -> "Weblogic Domain" -> "boot_domain"
  • right-click to open the context menu, and select "Security" -> "Credentials"
  • click "Create Map" to create a new credential map

    • Map Name = owc_wiki
  • select the owc_wiki map, and click "Create Key"

    • Select Map = owc_wiki
    • Key = wsPasscode
    • Type = Password
    • User Name = weblogic -- does not really matter
    • Password = welcome1
  • click OK.
2. Register the WIKI Server connection

  • Login to Fusion EM http://mymachine.us.oracle.com:7001/em
  • Navigate to "Farm" -> "WebCenter" -> "WebCenter Spaces" -> "webcenter"
  • right-click to open the context menu, and select "Settings" -> "Service Configuration"
  • click on "Wiki and Blog Server" -> "Add"

  • save and bounce WLS_Spaces & WLS_Services
  • you should now be able to login to Spaces and add WIKIs/Blogs to a page

Setting it all up -- I meant the blog :)

Ok, after talking to a bunch of people about how great it is to share your ideas, discoveries, tips, tricks, etc. through the use of blogs/wikis/twitters/facebooks/etcs..... finally, I decided to listen to myself.

The goal here will be to publish tips & tricks of using Oracle Fusion Middleware to deploy Enterprise 2.0 applications. We will use Oracle Webcenter a lot, and all the goodies that accompany it - Content Management, Wikis, Blogs, Discussions, Collaboration, Communication (Presence), etc.

As a initial series of posts, I plan to cover installation, configuration, security, integration between services, all with lots of samples, and (hopefully :) quick steps to do things. That should be enough for a quick development environment, and you can always refer to the docs for further instructions on different types of deployments.

BTW, you might (should) also follow these guys here -- GeorgeMaikoMartin, RicJava2goWebCenterPeter MoskovitsFusion SecurityDuncanShay.

About this blog
I wrote a bunch of WIKI pages before, and was looking for a blog that would consume the contents from Confluence. I gave up on that, once I found out I could just copy-paste the page itself from Confluence directly on Blogger :)

Let's see what happens when I try to copy source code... looks like there is a bunch of sites/apps for the job:
  • Java2Html - http://www.java2html.de/applet.html
  • Source Code Formatter - http://codeformatter.blogspot.com/2009/06/about-code-formatter.html