Thursday 28 August 2014

Webcenter Sites Installation Linux


Webcenter Sites Installation Linux

WEBCENTER SITES INSTALLATION ON RED HAT LINUX (FEDORA OS)

This blog would help one to setup Webcenter Sites (formerly a Fatwire Product) on Linux Operating system such as Fedora 17 (Red Hat Linux), running Oracle 11g Database and Tomcat as its App server.

SOFTWARES REQUIRED


The following Softwares are to be downloaded
apache-tomcat-6.0.35.zip (from http://projects.apache.org/projects/tomcat.html)
and
Assumption : Fedora 17 (http://fedoraproject.org/get-fedora) is already installed and Oracle 11g Database (http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html) is running with orcl service under port 1521 (Installation of database itself is out of scope in the current blog)
Note : the paths are relative to my system and my installation it might slightly differ on different systems , those marked in bold fonts are important commands to be run under linux for various operations such as startup or configurations,

SETTING UP DATABASE

1. Start Database
[james@james-laptop ~]$ 
cd /home/james/app/james/product/11.2.0/dbhome_1/bin
[james@james-laptop bin]$ 
export ORACLE_HOME=/home/james/app/james/product/11.2.0/dbhome_1
[james@james-laptop bin]$ 
export ORACLE_SID=orcl
[james@james-laptop bin]$ ./sqlplus /nolog
SQL*Plus: Release 11.2.0.3.0 Production on Wed Aug 1 18:49:32 2012
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
SQL> conn /as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 2471931904 bytes
Fixed Size      2230872 bytes
Variable Size    587204008 bytes
Database Buffers  1862270976 bytes
Redo Buffers     20226048 bytes
Database mounted.
Database opened.
SQL> quit
Disconnected from Oracle Database 11g Release 11.2.0.3.0 - 64bit 
[james@james-laptop bin]$ ./lsnrctl start
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 01-AUG-2012 
Copyright (c) 1991, 2011, Oracle.  All rights reserved.
Starting /home/james/app/james/product/11.2.0/dbhome_1/bin/tnslsnr:
2. Open SQL Worksheet in SQL Developer connect as SYS user
login to database as sys create user csuser
CREATE USER csuser IDENTIFIED BY welcome1 ;
GRANT CREATE session, CREATE table, CREATE view, 
CREATE synonym, CREATE Trigger, Create Sequence TO csuser ;
GRANT UNLIMITED TABLESPACE TO csuser ; 
commit;

SETTING UP TOMCAT

1. Unzip Tomcat. eg /home/james/Oracle/apache-tomcat-6.0.35/
2. Edit /home/james/Oracle/apache-tomcat-6.0.35/conf/server.xml file
3. Add the following lines above end of host tag </Host>
<Context path="/cs" docBase="cs" reloadable="true" 
crossContext="true">
<Resource name="csDataSource" auth="Container" 
type="javax.sql.DataSource" maxActive="100" 
maxIdle="30" username="csuser" password="welcome1" 
driverClassName="oracle.jdbc.driver.OracleDriver" 
url="jdbc:oracle:thin:@//localhost:1521/orcl"/>
4. Copy paste ojdbc6.jar under lib folder of Tomcat that is.
/home/james/Oracle/apache-tomcat-6.0.35/lib
5. Edit catalina.sh file under bin of tomcat directory
/home/james/Oracle/apache-tomcat-6.0.35/bin
add the following lines above resolve links block. (you can find these in the Catalina.sh file)
 # lines taken from Holy Book by James Smith :-)  
export JUMPHOME="/home/james/Oracle/webcenter/sites/wem"
export CATALINA_HOME="/home/james/Oracle/apache-tomcat-6.0.35"
export JAVA_HOME="/home/james/Oracle/jdk1.6.0_30"
export CLASSPATH="/home/james/Oracle/jdk1.6.0_30/lib/tools.jar:
/home/james/Oracle/webcenter/sites/bin":$CLASSPATH  
export JAVA_OPTS="-Xms1024M -Xmx1024M 
-XX:PermSize=256M -XX:MaxPermSize=256M 
-Dfile.encoding=UTF-8 
-Dcs.useMilliseconds=true 
-Dcs.useEhcache=true 
-Dnet.sf.ehcache.enableShutdownHook=true"
export PATH="/home/james/Oracle/jdk1.6.0_30/lib/tools.jar:
/home/james/Oracle/webcenter/sites/bin":$PATH
export CATALINA_PID="$CATALINA_HOME"/tomcat.pid
# lines taken from Holy Book by James Smith
Important comment this below line in the catalina.sh file using # before classpath
# CLASSPATH= must be commented

START AND STOP TOMCAT – TEST CONFIGURATIONS

tomcat can be started and stopped with following commands
[james@james-laptop bin]$ ./shutdown.sh -force
Using CATALINA_BASE:   /home/james/Oracle/apache-tomcat-6.0.35
Using CATALINA_HOME:   /home/james/Oracle/apache-tomcat-6.0.35
Using CATALINA_TMPDIR: /home/james/Oracle/apache-tomcat-6.0.35/temp
Using JRE_HOME:        /home/james/Oracle/jdk1.6.0_30
Using CLASSPATH:       /home/james/Oracle/jdk1.6.0_30/lib/tools.jar:
/home/james/Oracle/webcenter/sites/bin::/home/james/Oracle
/apache-tomcat-6.0.35/bin/bootstrap.jar
Using CATALINA_PID:    
/home/james/Oracle/apache-tomcat-6.0.35/tomcat.pid
Killing Tomcat with the PID: 1913
[james@james-laptop bin]$ ./startup.sh
Using CATALINA_BASE:   /home/james/Oracle/apache-tomcat-6.0.35
Using CATALINA_HOME:   /home/james/Oracle/apache-tomcat-6.0.35
Using CATALINA_TMPDIR: /home/james/Oracle/apache-tomcat-6.0.35/temp
Using JRE_HOME:        /home/james/Oracle/jdk1.6.0_30
Using CLASSPATH:       /home/james/Oracle/jdk1.6.0_30/lib/tools.jar:
/home/james/Oracle/webcenter/sites/bin::/home/james/Oracle/
apache-tomcat-6.0.35/bin/bootstrap.jar
Using CATALINA_PID:    
/home/james/Oracle/apache-tomcat-6.0.35/tomcat.pid
Open the Browser and try http://localhost:8080/ you should be able to see the homepage

INSTALLATION OF WEBCENTER SITES

Unzip ofm_sites_generic_11.1.1.6.0_disk1_1of1.zip , it creates Webcenter sites directory, go to
./WebCenterSites/WCS_Sites_11.1.1.6.0/WCS_Sites_11.1.1.6.0/ContentServer
Edit 
csInstall.sh add the following line
Your Java Home Directory might differ please change accordingly,
export JAVA_HOME="/home/james/Oracle/jdk1.6.0_30"
sh ./Sun/common/jvcheck.sh csInstall $*

LAUNCH THE INSTALLER

ensure that tomcat directory has read/write permissions
chmod 777 *
Next change to installation directory
and launch csInstall.sh and follow these screens
In our case we have configured for Oracle Database 11gR1
Click on Installation Button , Test Button if needed.

POST INSTALLATION CHECK

Use SQL Developer login with username as csuser/welcome1 , service name as orcl and port as 1521 (this might change in your installation)
check if new tables have been created.
Start Tomcat and Acccess the following URL http://localhost:8080/cas/login
login as admin / welcome1
Select AdminSite
AVI Sports site that was setup during Installation
Click on View -> Preview in New Window you can see the sport site as shown

ORACLE ENTERPRISE LINUX DISABLE FIREWALL

If you wish to access the URLs of your Machine from another Machine or VM,  then you may need to disable the firewall settings as shown below. if not you will not be able to access URLs such as http://ipaddr:8080/cs/wem/fatwire/wem/Welcome
[oracle@oel62 wc_domain]$ su root
Password: ******
[root@oel62 wc_domain]# 
service iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]
[root@oel62 wc_domain]# 
service iptables stop
iptables: Flushing firewall rules: [ OK ]
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Unloading modules: [ OK ]

WHAT NEXT

Changing look and feel of a Website as an User >> , We will now convert the sample Avi Sports Site into a Health care Portal without writing a single line of code.

No comments:

Post a Comment