ORU-10027: buffer overflow, limit of 2000 bytes

Set oracle output to unlimited

ORU-10027: buffer overflow, limit of 2000 bytes

BEGIN -- initialization section
  dbms_output.enable(null);
end;

Install Mail::Sender

open firewall ports to cpan
cpan
install Mail::Sender

/usr/bin/perl

perl version

locate Sender.pm

/usr/local/share/perl5/Mail/Sender.pm

root python /usr/share/rhn/virtualization/poller.py errors in cron

[cron.d]# cat rhn-virtualization.cron
0-59/2 * * * * root python /usr/share/rhn/virtualization/poller.py

 

Message 1:
From root@  Fri Jun 22 11:40:01 2012
Date: Fri, 22 Jun 2012 11:40:01 -0400
From: root (Cron Daemon)
To: root
Subject: Cron <root> python /usr/share/rhn/virtualization/poller.py
Content-Type: text/plain; charset=UTF-8
Auto-Submitted: auto-generated
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/root>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=root>
X-Cron-Env: <USER=root>

libvir: error : no connection driver available

rpm -qa | grep libvirt
rpm -e rhn-virtualization-host

Install Oracle Xpress 11g Database on Amazon AWS micro

 

C:\>pscp –i <privatekey> <dbsoftware> <server>:<filename>

yum install libaio

unzip <filename>

 

dd if=/dev/zero of=/swapfile1 bs=1024 count=524288
dd if=/dev/zero of=/swapfile2 bs=1024 count=1048576
mkswap /swapfile1
mkswap /swapfile2
swapon /swapfile1
swapon /swapfile2

vi /etc/fstab
/swapfile1 swap1 swap defaults 0 0
/swapfile2 swap2 swap defaults 0 0

 

yum install binutils-2.*
yum install compat-libstdc++-33*
yum install elfutils-libelf-0.*
yum install elfutils-libelf-devel-*
yum install gcc-4.*
yum install gcc-c++-4.*
yum install glibc-2.*
yum install glibc-common-2.*
yum install glibc-devel-2.*
yum install glibc-headers-2.*
yum install ksh-2*
yum install libaio-0.*
yum install libaio-devel-0.*
yum install libgcc-4.*
yum install libstdc++-4.*
yum install libstdc++-devel-4.*
yum install make-3.*
yum install sysstat-7.*
yum install unixODBC-2.*
yum install unixODBC-devel-2.*

 

su - root
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba,oinstall oracle
passwd oracle
chown oracle:oinstall /u01

vi /etc/sysconfig/network
HOSTNAME=<yourHostName>
vi /etc/hosts
Add  <yourHostName> to the line containing 127.0.0.1
service network restart

rm -rf /var/lib/rpm/__db.0*
rpm --rebuilddb

  • vi /etc/security/limits.conf
  • oracle soft nproc 2047
  • oracle hard nproc 16384
  • oracle soft nofile 1024
  • oracle hard nofile 65536
  • oracle soft stack 10240

Download after copying from http fox in mozilla – first register and login to oracle click the link capture the authorized link and use wget on local machine

 

wget -c --user=<email> --password=<passwd> http://download.oracle.com/otn/linux/oracle11g/xe/oracle-xe-11.2.0-1.0.x86_64.rpm.zip?AuthParam=<authcode>

11g Oracle Acl Rules to allow web or email calls out (utl_http, utl_smtp, utl_mail)

http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_networkacl_adm.htm

<myupperaccountname> = user name in upper case
<mydomain> = domain you want to access in lower case
<mypartdomain> = *.your domain name you want to access
<myport> = port number
port ranges
<mylowport> = port number
<myhighport> = port number

 

Using dbconsole or grid to manage acl’s

image

 

image

 

image

 

-- Check users writes to a specific location
SELECT host, lower_port, upper_port, acl,
     DECODE(
         DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE_ACLID(aclid, '<myupperaccountname>', 'connect'),
            1, 'GRANTED', 0, 'DENIED', null) privilege
     FROM dba_network_acls
    WHERE host IN
      (SELECT * FROM
         TABLE(DBMS_NETWORK_ACL_UTILITY.DOMAINS('<mydomain>')));


-- create the acl
BEGIN
  DBMS_NETWORK_ACL_ADMIN.create_acl (
    acl          => 'base_acl.xml',
    description  => 'Configure the base ACL functionality for all access',
    principal    => '<myupperaccountname>',
    is_grant     => TRUE,
    privilege    => 'connect',
    start_date   => SYSTIMESTAMP,
    end_date     => NULL);

  COMMIT;
END;
/
--assign a network to the acl
BEGIN
  DBMS_NETWORK_ACL_ADMIN.assign_acl (
    acl         => 'base_acl.xml',
    host        => '<mypartdomain>',
    lower_port  => <myport>,
    upper_port  => null);

  COMMIT;
END;
/


-- Unassign an acl
BEGIN
  DBMS_NETWORK_ACL_ADMIN.unassign_acl (
    acl         => 'base_acl.xml',
    host        => '<mypartdomain>',
    lower_port  => <myport>,
    upper_port  => NULL);
  COMMIT;
END;
/
-- Assign a range
BEGIN
  DBMS_NETWORK_ACL_ADMIN.assign_acl (
    acl         => 'base_acl.xml',
    host        => '<mypartdomain>',
    lower_port  => <mylowport>,
    upper_port  => <myhighport>);
  COMMIT;
END;
/

-- check assignment as app user
/*
SELECT host, lower_port, upper_port, acl
FROM   dba_network_acls;
SELECT *
FROM   user_network_acl_privileges;
SELECT *
FROM   TABLE(DBMS_NETWORK_ACL_UTILITY.domains('<mydomain>'));
*/

 

Example 2:

BEGIN
  DBMS_NETWORK_ACL_ADMIN.create_acl (
    acl          => 'www_acl.xml',
    description  => 'Configure the web access acl',
    principal    => 'SYSDOCS',
    is_grant     => TRUE,
    privilege    => 'connect',
    start_date   => SYSTIMESTAMP,
    end_date     => NULL);

  COMMIT;
END;
/

BEGIN
  DBMS_NETWORK_ACL_ADMIN.assign_acl (
    acl         => 'www_acl.xml',
    host        => '*.snapdedo.com',
    lower_port  => 80,
    upper_port  => 80);

  COMMIT;
END;
/

BEGIN
  DBMS_NETWORK_ACL_ADMIN.assign_acl (
    acl         => 'www_acl.xml',
    host        => '*.google.com',
    lower_port  => 80,
    upper_port  => 80);

  COMMIT;
END;
/

Checking folder size in Linux

du -h --max-depth=1

Start db2 console

Steps to start db2 console.

create a vncsession and go into the graphical console.

[~]$ xhost +
access control disabled, clients can connect from any host
[~]$ sudo su - root
[~]# cat /etc/passwd | grep db2
db2inst1:x:503:105::/home/db2inst1:/bin/bash
db2inst2:x:504:106::/home/db2inst2:/bin/bash
[~]# su - db2inst2
[~]$ db2cc

VMware Server does not show all free space

After doing some cleaning on one of my drives to build some additional servers I noticed the free space had not been made available to my VMware Server. 

Refresh the free space by choosing “Commands” and then “Refresh Datastore”.

image

image

Logging into the db2 control console

If you’re an oracle admin you probably know little about db2 control panel.

sign into the server with your user

start vncsession

xhost +

sudo su – root

su – <myinstanceuser> –l

db2cc

This will start the db2 command console and allow you to view the table structure.

Windiows Live Write converts characters to emoticons

When using windows live writer I noticed it will convert certain characters to emoticons without me wanting it to. A simple trick to get around this is to go to the source view and remove emoticon and convert to encoded html tags. Like :< can be changed in the code to be :&lt;

The terminal server has exceeded the maximum number of allowed connections

qwinsta /server:<myserver>

logoff <mysession> /server:<myserver>

Log into bladecenter

IBM Bladecenter’s have remote management consoles to manager your servers.

Go to a browser enter your bladecenter ip address http://<mybladeip>

If your certificate is not installed choose “continue to website”

Enter your password

Choose start new session

Under Blade tasks choose remote control

Choose Start Remote Control

Choose yes to all java questions and run.

Select your blade in the kvm and media tray owner and the remote control console.

Install Oracle Linux from network

 

Download the Oracle Linux Dvd to a web server.

mount -o loop -t iso9660 <mywebdirectory>/isos/OEL6-U2-x86_64-V29459-01.iso <mywebdirectory>/isos/oel6u2

http://<mywebip>/isos/oel6u2
http://10.7.2.3/isos/oel6u2

mkdir /www/isos/oel6u2 -p
chown <mywebuser>.<mywebgroup> /www/isos -R
chown <mywebuser>.<mywebgroup> /www/isos/OEL6-U2-x86_64-V29459-01.iso

mount -o loop -t iso9660 <mywebdirectory>/isos/OEL6-U2-x86_64-V29459-01.iso <mywebdirectory>/isos/oel6u2
Examples:
mount -o loop -t iso9660 /www/isos/OEL6-U2-x86_64-V29459-01.iso /www/isos/oel6u2
mount -o loop -t iso9660 /var/www/html/isos/OEL6-U2-x86_64-V29459-01.iso /var/www/html/isos/oel6u2

You could also mount it to a non standard directory and add an alias so as to avoid large back ups of your web directories.

If you have an issue connecting check you ip configurations and your firewall. I install multiple instances 1 in local network and 1 in dmz to avoid requiring access through firewall to unsecure areas.

System Crash during patches causes issue

After a patch set which had a system crash our system starting having these problems.

Reports failed and the wls diagnostic log showed errors like such

java.io.IOException: No locks available

 

Our ofm11g test instance uses nfs to reduce cost, this is not a supported configuration for Oracle and on occasion will cause us issue. The nfs mount is used to share the reports and cache directory instead of ocfs.

 

When researching I found the issue was related to a crashed nfs service, some work around talked about using nolock option but that does not seem necessary although it should pose no risk as long as just your reports and cache are in these directories and not your instance files.

 

[/var/log]# /etc/init.d/nfslock status
rpc.statd dead but pid file exists

[/var/log]# rpcinfo –p

[/var/log]# /etc/init.d/nfslock restart
Stopping NFS locking: [  OK  ]
Stopping NFS statd: [  OK  ]
Starting NFS statd: [  OK  ]
[/var/log]# /etc/init.d/nfslock status
rpc.statd (pid  13972) is running...

I also found the following services in a failed status and restarted them

[/var/log]# service sendmail status
sendmail dead but pid file exists
[/var/log]# service sendmail start
Starting sendmail: [  OK  ]
[/var/log]# vi message.txt
[/var/log]# mail -s "test" <myemail> < message.txt

[/var/log]# service crond status
crond dead but pid file exists
[/var/log]# service crond start
Starting crond: [  OK  ]

After restarting the services the oracle instance needed to be bounced to clear up all issues.

If you can bounce the whole node to make sure all services are cleared up you should be in better shape.

 

 

Troubleshooting a asp.net app

I recently ran into a problem with a asp.net system that was missing pieces of mail. The developers who owned the system had been downsized due to economy and the business users only knew what the end outcome should be. Developers owning systems being downsized and leaving no technical resources is not an uncommon problem where I work. I am not proficient in asp but it falls in my job role to resolve problems of all forms. After having the business owner walk me through what the asp app end goal was I was able to determine which application it was using. The issue was email was not being sent for certain domains. The logic was straight forward an asp program had an include file was which pointed to a function to send email using a Aspmail 4.x by “ServerObjects.com”. This mail logic looked straight forward and I assumed debugging would be a snap. The only way to run this application seemed to be in a production mode. Since I did not have access to the mail logs of the mail server this service sent to I switched the smtp server to a server I did have access to. This is an easy change in “RemoteHost” configuration of the Aspmail object and had little risk. I took a back up modify the file and proceed to test. To my surprise the mail to the domain that did work still came from the old smtp and the mail that did not work still did not work. This baffled me for awhile since switching the smtp server should have been instant. I looked everywhere to figure out why it had not been routed through my mail server as expected. Finally to my surprise I found an if statement above the send, “if (false)”. What’s this “if (false)”? A little research but me to the understanding that this “if (false)” meant a developer had commented out the whole section of code. Now I was really stuck since now I did not know how the email that was getting sent was sent. I searched all the code and found an insert into a database with the email content and destination. Now I just needed to find a job sending this content. I looked through all the source code and was also surprised to find that the windows search feature “in files” had not even found my reference to the email table. Here I found there is an issue with the windows search feature that does not search all file types. I found a bug note but could not apply the fix do to the instance being production. I copied the source code to another machine and ran ultra edit search on it. There I found a single reference to the code the insert. I finally got the admin of the mail server the mail was coming from to send me his mail logs. I found the log line which should the mail coming from a different box. I found this box had a java program running every ten minutes sending the email, I reconfigured this java app to point to my smtp server. Reran the test to both the email account failing and the one succeeding and monitored the logs, there I found what I expected and access denied from the mail server receiving this mail.

Why run a custom built server for testing?

I like using both hosting solutions and Amazon cloud solutions, especially since now Amazon has a micro server for 12 months free. In my case I need higher performance local and little external bandwidth or traffic for testing database and Oracle application servers. When building test servers you do not want to rely on network bandwidth and performance for a large database or many copies. I’ll stick to a custom built pc design to run large databases which can be built and rebuilt with little to no additional cost to me. If you invest about a $1000.00 in todays market you can build a server with a hex core processor, 24gb of ram and 240gb ssd disk and 1tb 7200rpm disk. This type of computing power gives the home user the capability to run and build full installs in minutes rather then hours.

If you don’t have the need to learn technology this is probably not the solution for you, but those of us competing in todays technology market should invest in hardware to meet the demands of our learning appetite.

Running a Test Server at Home (Tutorial)

Running a test server at home has many challenges. First off your network is most likely not designed to run wide area applications exposed such as web pages. Second the home hardware is not the same quality as professional hardware. Third hardware is becomes quickly expensive to justify for testing at home. Forth your home wide area network provider may not allow exposed services. Finally your home machine should be set to install updates as available which may automatically bounce your system when your not around.

Although all of these issues have many ways to address, I’ll go over some simple tricks to help reduce some of these issues. This does not mean I can solve your issues with your network provider but most other areas you can reduce issues with.

Tools:
Windows Vista/7
Microsoft Security Essentials
Team Viewer
VMware Server
Oracle Linux/Centos
Quad/Hex Core processor
Memory (8GB-24GB)

Goals:
Install a test database and web server which can be accessed from the outside world to test and demo application features.

Other options:
Hosting solutions are available from many sites these are fairly inexpensive but often have different limitations and performance issues when dealing with large test databases. Amazon Cloud Solutions (AWS) currently has a free micro cloud offering for 12 months but then you will need to address this cost on going and move your tool.

Why Custom Home machine?

Running webtier on port 443 or 80 ‘> 1024’ http server

The webtier has two main components the http server and the cache server. This doc explains the steps to change ports on the http server with no cache server installed. You will install a http server only if you have no need for a cache server, like a token service, or credit card clearing application. These types of applications can not cache any data and do not need the extra component installed to cause greater security risk.

set your instance home

cd $INSTANCE_HOME/ohs/bin
chown root .apachectl
chmod 6750 .apachectl

Change your port in your httpd.conf file or your gui Middleware control and restart the httpd component

nohup: ignoring input and appending output to `nohup.out'

When running a script using nohup piping your output to a log you may receive this message “nohup: ignoring input and appending output to `nohup.out'”. This is just a notice to tell you that standard error message will also be sent to standard out which is being redirect to a log file. This is nothing to worry about but if you would prefer not to have the message printed you can tell nohup that you want both stderr and stdout to go to the same file very easily. This is ideal for scripts run in cron or schedule to avoid unnecessary log messages.

Example of message when running a script

nohup $DOMAIN_HOME/startWebLogic.sh > ~/logs/start_$1_domain.`date +%y%m%d%H%M%S`.log &

nohup: ignoring input and appending output to `nohup.out'

 

Do the following to avoid this message.

nohup $DOMAIN_HOME/startWebLogic.sh > ~/logs/start_$1_domain.`date +%y%m%d%H%M%S`.log 2>&1 &

java.io.IOException: No locks available Oracle Report Server

Using nfs with Oracle Report Server instead of ocfs.

If you run into the java.io.IOException: No locks available while running a report server using nfs to test rather then ocfs. Check this.
If this happens to you check also /var/log/messages /var/log/dmesg no errors for me.

[/var/log]# /etc/init.d/nfslock status
rpc.statd dead but pid file exists

[/var/log]# rpcinfo -p
   program vers proto   port
    100000    2   tcp    111  portmapper
    100000    2   udp    111  portmapper
    100011    1   udp    880  rquotad
    100011    2   udp    880  rquotad

[/var/log]# /etc/init.d/nfslock restart
Stopping NFS locking: [  OK  ]
Stopping NFS statd: [  OK  ]
Starting NFS statd: [  OK  ]
[/var/log]# /etc/init.d/nfslock status
rpc.statd (pid  13972) is running...
[/var/log]#


[~]# service portmap restart
Stopping portmap: [  OK  ]
Starting portmap: [  OK  ]
[~]# service nfs restart
Shutting down NFS mountd: [FAILED]
Shutting down NFS daemon: [FAILED]
Shutting down NFS quotas: [FAILED]
Starting NFS services:  [  OK  ]
Starting NFS quotas: [  OK  ]
Starting NFS daemon: [  OK  ]
Starting NFS mountd: [  OK  ]
[~]# cd /<mymount>/

Configure Virtual ips in /etc/rc.d/rc.local

When working with multiple secure domains on a single server you will need multiple virtual ip’s. For unsecure web address you can use virtual hosting using a domain name but secure address require that the packet be decrypted so the ip address is the method to split the virtual domains.

# Virtual Network Connections
# <mydomain1>
ifconfig eth0:2 172.16.2.115 netmask 255.255.255.0 up
route add -host 172.16.2.115 dev eth0:2
# <mydomain2>
ifconfig eth0:10 172.16.2.195 netmask 255.255.255.0 up
route add -host 172.16.2.195 dev eth0:10
# <mydomain3>
ifconfig eth0:21 172.16.2.97 netmask 255.255.255.0 up
route add -host 172.16.2.97 dev eth0:21

 

Run the same commands in a ssh terminal to make changes take effect immediately.

Run the below commmand to check that all virtual ips are set up correctly.

ifconfig

Bug when opening ofm11g webcache standalone and using Middleware Control

I found this bug after just opening the standalone gui tool for Oracle webcache, luckily the fix was easy just a reregister.

Oracle Doc on fix

Unable to fetch or parse webcache.xml from : Authentication failed: password mismatch.

Unable to generate or transfer webcache.xml from : Authentication failed: password mismatch.

The fix was to simply reregister the component.

$ORACLE_INSTANCE/bin/opmnctl updatecomponentregistration –componentName <mywebcachename>

$ORACLE_INSTANCE/bin/opmnctl updatecomponentregistration -componentName webcache1

 

Also found that you may need to bounce the Middleware control to have it stop erroring after this occurs.

Opening Ports for standalone Ofm11g Middleware Control to webtier

Ports
6701
4443
7777
9999
7785-7789

Reregister Fusion Middleware home Error Fail to invoke operation mbeans

Register the ofm11g instance with the middleware home due to fail to invoke operation error. This is supposed to only be required after a software upgrade but I have seen it several times.

 

Solution
1. Make sure the AdminServer is up and running.
2. Run the <as instance home>/bin/opmnctl unregisterinstance command.
e.g. <as instance home>/bin/opmnctl unregisterinstance -instanceName instance1 -adminHost myhostname -adminPort 7001
3. Run the opmnctl redeploy command.
e.g. <as instance home>/bin/opmnctl redeploy -adminHost myhostname -adminPort 7001
the command will prompt for the weblogic username and password. Just provide them to complete the command run.
4. Run the opmnctl registerinstance command.
e.g. <as instance home>/bin/opmnctl registerinstance -adminHost myhostname -adminPort 7001

eMail checking your spf record

Your spf record is used to validate your from domain in your email is allowed to be sent from the mail server which is sending your mail. This helps mail systems catch spammers using false from lines but also effects you if you do not set it up for your company and send using a service.

A couple places let you check your spf record online with a simple interface.

Microsoft SPF wizard

MxToolBox

WebsitePulse

Configure ssl on ofm11g webcache to front end apps

Oracle webcache provides many enhancement features to web apps. The following steps will set up webcache to be used in front of the webtier with a port 443 configuration. I’ll use this for oracle owa, front end similar to apex or Oracle htmldb.

Oracle webcache admin guide
Oracle Fusion Middleware Webtier Documentation

1.

Verifying your admin server “ofm 11g Middleware Console” has shutdown properly

At times I noticed that when I went to start the Middleware Console after just having stopped the Middleware Console that there was an error can not get lock on file.
I found that this means that the Middleware Console was still running although it claimed it successfully shutdown.

To check this

ps -ef | grep Admin

kill –9 <myadminpid>

startup

Checking spam score on email

Spamscore is highly important to people sending lots of email. Your spam score helps determine one if email will be delivered and two if it will go directly into someone’s junk email folder. SpamAssassin is one of the leading spam score tools, and can be easily plugged into most apps. If you do not have the capability of plugging in SpamAssassin use the below trick to test your email.

 

1. Download MailCheck
2. Send your email to your emailbox
3. Save your email as “.txt”
4. Change the file extension from “.txt” to “.eml”
5. Start Mailcheck tool and select your email and choose “check”
6. Your score and additional info will be provided.

Parsing Linux maillogs for bounces

 

# Take yesterdays root emails and moves it to production server .
# Run as prod connect as application account.
# Only root can read the maillogs

cp /var/mail/root /app_data/maillog/rootmail.`TZ=CST+24 date +%Y%m%d`.dat
> /var/mail/root

cat /app_data/maillog/rootmail.`TZ=CST+24 date +%Y%m%d`.dat | egrep '(Final-Recipient:)|(Diagnostic-Code:)' > /app_data/maillog/MR.$HOSTNAME.`TZ=CST+24 date +%Y%m%d`.dat

touch /app_data/maillog/MR.$HOSTNAME.`TZ=CST+24 date +%Y%m%d`.ctl

scp /app_data/maillog/MR.$HOSTNAME.`TZ=CST+24 date +%Y%m%d`.dat  <appusername>@<myprodcentralserver>:/app_data/LoadFile/webp1/web_admin/DownLoaded/MR.$HOSTNAME.`TZ=CST+24 date +%Y%m%d`.dat

scp /app_data/maillog/MR.$HOSTNAME.`TZ=CST+24 date +%Y%m%d`.ctl  <appusername>@<myprodcentralserver>:/app_data/LoadFile/webp1/web_admin/DownLoaded/MR.$HOSTNAME.`TZ=CST+24 date +%Y%m%d`.ctl

Use egrep to grep multiple strings in linux

For OR in grep use egrep

cat /var/mail/root | egrep '(Final-Recipient)|(Action)|(Status)|(Diagnostic-Code)'

Linux Configure Files to rotate Weekly

vi /etc/logrotate.conf

/usr/local/httpd-2.2.14/logs/mod_jk.log {
weekly
rotate 4
postrotate
service apache2 restart
endscript
compress
}

Set the Listen Ip for Multiple Middleware Managers on the same server

Got this error on one Middleware management console when it could not access my webtier

configuration settings are unavailable because

The Webtier was up but it was not recognized as up found this metalink doc ID 1424924.1 and made these changes and it worked from then on out.

Set the Middleware Management Console Listen port mine by default was empty even though I do not have multiple addresses on the server.

I also had to restart the server, I am guessing this is because I have multiple Middleware Management Servers on a single node.

ServerUpInstanceshowsDown

Create Weblogic start script with nohup and log

sudo su – oracle
mkdir log
chmod 775 log
cd bin
vi start_<mydomain>_domain.sh

Creating a csr for certificate creation

<MyDomain> = Your domain name

openssl req -new -newkey rsa:2048 -nodes –keyout <MyDomain>.key -out <MyDomain>.csr

Country Name (2 letter code) [GB]:<MyCountry>
State or Province Name (full name) [Berkshire]:<MyState>
Locality Name (eg, city) [Newbury]:<MyCity>
Organization Name (eg, company) [My Company Ltd]:<MyCompanyName>
Organizational Unit Name (eg, section) []:<MyGroup>
Common Name (eg, your name or your server's hostname) []:<MyHostName>

All others leave blank

PCI Compliance Apache ssl.conf (linux)

Making your ssl.conf compliant for pci.

By default your ssl.conf usually includes weak protocols this will not pass a pci audit the fix is easy.

1. Make a back up of your current ssl.conf for roll back purposes

cp  /etc/httpd/conf.d/ssl.conf /etc/httpd/conf.d/ssl.conf.`date +%y%m%d%H%M%S`

2. Verify your back up was created as expected

ls -l /etc/httpd/conf.d/ | grep ssl.conf

3. Edit the protocol and ciphersuite lines

/etc/httpd/conf.d/ssl.conf

comment out

#SSLProtocol all –SSLv2

#SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW

Add in

SSLProtocol -ALL +SSLv3 +TLSv1
SSLCipherSuite ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM

4. Restart Apache

service apache restart

or

service httpd restart

Set Webtier start up scripts

 

vi set_Webtier1_profile.sh

export INSTANCE_NAME=instance1
export HOME_NAME=WebTier1

export ORACLE_HOME=/app/oracle/product/ofm11g/$HOME_NAME
export MW_HOME=/app/oracle/product/ofm11g
export INSTANCE_HOME=/app/oracle/product/ofm11g/<home>/instances/$INSTANCE_NAME
export ORACLE_INSTANCE=$INSTANCE_HOME

vi start_Webtier1.sh

. ~/bin/set_Webtier1_profile
$ORACLE_HOME/opmn/bin/opmnctl startall

Install ofm11g Webtier software

Download Installer:
ofm11g Webtier download

Software:
cd /software/oracle11gappserver/weblogic/webtier/11.1.1.6/Disk1 <- As of 11.1.1.6 full installer not just patch


Login to graphical interface (vncsession)


xhost +
su - oracle
cd /software/oracle11gappserver/weblogic/webtier/11.1.1.6/Disk1
./runInstaller

Specify OracleInventory location and run script
/app/oracle/oraInventory
sudo su – root
/app/oracle/oraInventory/createCentralInventory.sh
Welcome
     > Next
Install Software Updates
     > Oracle support
     > username
     > password
     > Search for Updates
     > Next
Install Type
     > Install and configure
     > Next
Prerequiste check
     > Next
Install Location
     > /app/oracle/product/ofm11g
     > WebTier1
     > Next
Security Updates
     > username
     > password
     > Next
Configure Components
     > Http
     > Cache
     > Associate with Domain
     > Next
Weblogic Domain Configuration
     > (oraappman.snapdedo.com)
     > 7001
     > weblogic
     > password
     > Next
Specify Component Details
     > /app/oracle/product/ofm11g/WebTier1/instances/instance1
     > instance1
     > ohs1
     > webcache1
     > Next
Cache Admin Password
     > password
     > Next
Configure Ports
     > Auto Port Configure
     > Next
Security Updates
     > Email
     > Password
     > Next
Install Summary
     > webtier11.1.1.6.response.txt
     > Save
     > Install
Install Progress
     > Got webcache failure?
     > Continue
     > Next
Install Complete
     > webtier11.1.1.6installsummary.txt
     > Save
     > Finish

If webcache does not start as above it may be ipv6 issue.
Log in to Admin console
> WebTier
     > webcache1
          > control
               > start
If it fails (doc 1113163.1)
     cd $MW_HOME/WebTier1/instances/instance1/config/WebCache/webcache1
     vi webcache.xml
     Add <IPV6 ENABLED=”NO”/> tag below the </MULTIPORT> tag
Log in to Admin console
> WebTier
     > webcache1
          > control
               > start

Accessible URLs
                Oracle HTTP Server URL : http://localhost.localdomain:7777
                Oracle HTTP Server SSL URL : https://localhost.localdomain:4443
                Oracle Web Cache URL : http://localhost.localdomain:7785
                Oracle Web Cache SSL URL : https://localhost.localdomain:7789
                Oracle Web Cache Administration URL : http://localhost.localdomain:7786
                Oracle Web Cache Statistics URL : http://localhost.localdomain:7787

Install Web Tier connected to Fusion Middleware Control


Date: July 5th 2012

Level: 2

Purpose: This tutorial will walk you through the steps of installing an Oracle 11g Webtier connected to a standalone Fusion Middleware Control.

  1. Install Oracle Linux 6 Update 2
  2. Disable Firewall and SELinux
  3. Disable Network Manager
  4. Configure Oracle Yum Repository
  5. Create Oracle User
  6. Configure limits.conf
  7. Create Personal User Accounts
  8. Install Latest JDK currently 7up4
  9. Create OFM11g Home
  10. Create OFM11g Application Set Up Scripts
  11. Install ofm11g Webtier Software

 

 

Create Weblogic Start Script with nohup and log

sudo su – oracle
vi .bashrc
Add
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
vi .bash_aliases
Add a line for each domain
alias set_<instancename>='. ~/bin/set_domain.sh <instancename>'
alias start_<instancename>='. ~/bin/start_domain.sh <instancename>'
alias stop_<instancename>='. ~/bin/stop_domain.sh <instancename>'
mkdir bin
mkdir logs
chmod 775 logs
cd bin
vi set_mw_home.sh
export MW_HOME=/app/oracle/product/ofm11g
vi set_domain.sh
. ~/bin/set_mw_home.sh
export DOMAIN_HOME=/app/oracle/product/ofm11g/user_projects/domains/$1
vi stop_domain.sh
. ~/bin/set_domain.sh $1
nohup $DOMAIN_HOME/bin/stopWebLogic.sh > ~/logs/stop_$1_domain.`date +%y%m%d%H%M%S`.log 2>&1 &
vi start_domain.sh
. ~/bin/set_domain.sh $1
nohup $DOMAIN_HOME/startWebLogic.sh > ~/logs/start_$1_domain.`date +%y%m%d%H%M%S`.log 2>&1 &
chmod 775 *

# To Watch your logs simply
tail -f ../logs/stop*
tail -f ../logs/start*

# Start Instance
sudo su – oracle
start_<instancename>

# Stop Instance
sudo su – oracle
stop_instancename

Configure weblogic boot.properties to not require password on start or stop

# You must start the server once to get the "servers/AdminServer" directory to be created.
Start Weblogic Admin and Domain Interface
sudo su - oracle
cd ~
cd bin
set_<domainname>
cd $DOMAIN_HOME
./startWeblogic.sh
cd $DOMAIN_HOME/bin
./stopWeblogic.sh
./startWeblogic.sh

set boot.properties to allow passwordless start up in nohup

set_<domainname>
cd servers/AdminServer
mkdir security
chmod 775 security
cd security
vi boot.properties
username=weblogic
password=<your Password>

Create a Weblogic Domain for Fusion Enterprise Manager

Use a vncsession for graphical interface

xhost +
sudo su - oracle
cd /app/oracle/product/ofm11g/wlserver_10.3/common/bin
./config.sh

Welcome screen
     > Create new weblogic domain
     > Next
Generate Domain
     > oracle enterprise manager
     > oracle jrf
     > next
Specify domain
     > (your_domain)
     > /app/oracle/product/ofm11g/user_projects/domains
     > /app/oracle/product/ofm11g/user_projects/applications
     > Next
Admin username and password
     > weblogic
     > Enter Password
     > Next
Weblogic startup mode
     > production
     > jdk sun jdk
Optional Configuration
     > Administration server
     > Next
Configure admin server
     > AdminServer
     > Alll Local Addresses
     > (7001)
     > Next
Configuration screen
     > Create
Creating domain
     > Done

Domain Location: /app/oracle/product/ofm11g/user_projects/domains/<your domainname>
Admin Server URL: http://<servername>:7001

Install Application Development Framework 11.1.1.6 for Enterprise Manager

Download:

Oracle 11.1.1.6 Application Development Framework runtime download

Software:
ofm_appdev_generic_11.1.1.6.0_disk1_1of1.zip

Purpose:
The application development runtime give the java required files for other products such as enterprise manager control.

xhost +
sudo su - oracle
cd /software/oracle11gappserver/weblogic/application_development_runtime/11.1.1.6/Disk1
./runInstaller
/usr/java/default

If no oraInventory exists it may request orainventory and root script first.
     > /app/oracle/oraInventory
     > run root script as root
/app/oracle/oraInventory/createCentralInventory.sh
     > ok
     > Next
Welcome Screen:
     > Next
Software Update Screen:
Enter creds.
Prerequiste Checks Screen:
     > Next
Install location
     > /app/oracle/product/ofm11g
     > Next
Application Server
     > Weblogic
     > Next
Installation summary
     > appdev.11.1.1.6.response.txt
     > Save
     > Install
Install progress
     > appdev.11.1.1.6.installsummary.txt
     > save
     > Finish

 

 

 

Install Weblogic 10.3.6

Download Weblogic 10.3.6 Generic Installer from Oracle

mkdir /software/oracle11gappserver/weblogic/weblogic/10.3.6 –p
chmod 775 /software –R
gunzip wls1036_generic.jar.zip

From a vncsession
 
xhost +
sudo su - oracle
cd
/software/oracle11gappserver/weblogic/weblogic/10.3.6 
java -Xmx1024m -jar wls1036_generic.jar

Welcome Screen
     > Next
Choose Middleware Home Directory
     > Create a New Middleware Home
     > /app/oracle/product/ofm11g
     > Next
Register for Security Updates Screen
     > <Your Metalink Username>
     > I wish to receive updates (uncheck, if you do not have a metalink subscription)
     > <Your Metalink Password>
     > Next
Choose Install Type
     > Typical
     > Next
Jdk Selection
     > sun jdk
     > Next
Choose Product Installation directories
     > /app/oracle/product/ofm11g/wlserver_10.X
     > /app/oracle/product/ofm11g/coherence_3.X
     > Next
Installation Summary
     > Next
Installation screen
     > Next
Installation Complete screen
     > uncheck run quickstart
     > Done

Create OFM11g Home

mkdir -p /app/oracle/product/ofm11g
chown oracle.oinstall /app –R
chmod 775 /app -R

Create OFM11g Application Set Up Scripts

<Domain> = The name for your first domain
                     Example web_dev_domain

sudo su - oracle
cd ~
mkdir bin
chmod 775 bin
cd bin
vi set_mw_home.sh
     export MW_HOME=/app/oracle/product/ofm11g
vi set_<Domain>_home.sh
     export DOMAIN_HOME=/app/oracle/product/ofm11g/user_projects/domains/<Domain>
chmod 775 *

Execute Set Up by:
. ~/bin/set_mw_home.sh

Configure the limits.conf for Weblogic/FMW

Fusion middleware expects the limits.conf soft file setting to by 4096.

vi /etc/security/limits.conf

change “oracle softfiles” to 4096

Install Weblogic/Fusion Middleware Required Packages

I do this one because it performs all but one of the required steps for fusion middleware and installs all but a few of the required packages for fusion middleware even though it is the database preinstall rpm. Feel free to manually install these packages.

yum install oracle-rdbms-server-11gR2-preinstall compat-libstdc++-33.i686 libstdc++.i686 libstdc++-devel.i686 compat-libstdc++-33 glibc-devel.i686 openmotif22

Create Oracle User

mkdir -p /app/oracle/product
chmod -R 775 /app
groupadd -g 501 oracle
groupadd -g 503 dba
groupadd -g 504 oinstall
useradd -u 501 -g oinstall -G dba oracle
passwd oracle
chown -R oracle:oinstall /app

Using Vncserver in Oracle Linux 6

One of the most common ways to install Oracle products is the graphical installer. Here are some simple steps to use vncserver on Oracle Linux 6.

Configure Standard rpms to get vnc binaries.

1. From a shell run
  vncserver :1
  enter a password:
2. vi ~/.vnc/xstartup
  replace the twm in this line with gnome-session to give you a graphical session
  xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
  twm &
  Becomes:
  xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
  gnome-session &
3. kill the current vncsession and restart
  vncserver –kill :1
4. restart vncserver
  vncserver :1
5. Use a vnc client to manage your sessions
  Free version is realvnc or tightvnc viewer
6. standard port is “1” or “5901”
  so you will enter your ip : port
7. Once started to allow other accounts access to the windows terminal run
  xhost +(your ip)

Yum another app is currently holding the yum lock

Sometimes you may run into an issue when installing multiple apps using yum where the process id is still locking the yum application. This most often occurs when running the command line yum with a graphical screen open rather then in a shell.

Here is the most common fix for this type of problem.

yum clean all
rpm –rebuilddb

 

On occasion you will have completed an update and the process will still lock the yum by having not cleaned the yum.pid file.

When you run yum clean all an output like another copy is running as pid <pid>

kill –9 <pid>
yum clean all
rpm –rebuilddb

 

If this still does not resolve it

sudo kill $(cat /var/run/yum.pid)
killall –9 safe_yum
yum clean all
rpm –rebuilddb