After writing my post on RHCE, I remembered a document I wrote long time ago wrt Oracle 10g AS Webcache on RHEL4. I thought it can be useful so I’m sharing it on my blog.
INSTALLATION OF LINUX OS
Webcache OS : Red Hat Enterprise 4
Webcache SW : Oracle Application Server Web Cache 10g Release 2
systat-5[1].0.5-11.rhel4.i386.rpm : Depending on what packages you have installed on the OS, this utility may not be installed on your system.
HW REQUIREMENTS
· VGA screen, keyboard, mouse
· Any PC which has following specs :
- Supported by RHEL 4
- at least 2 GIG of RAM
- at least 36 GIG HDISK
- at least 3 GIG-E COPPER ETHERNET INTERFACES or 2 GIGE COPPER ETHERNET + 1 10/100 MBIT ETHERNET IFS
The hardware used for the document is HP DL360 G5 with :
Intel(R) Xeon(R) CPU 5140 Quad Core @ 2.33GHz
2 Gig RAM
72*2 RAID 0+1 HDD
HP NC364T PCI Express Quad Port Gigabit
Install of Linux OS
1. Boot your computer with Red Hat Installation CD 1 / DVD.
NOTE : For Text installation of Red Hat. If you only have a keyboard without a mouse, type linux text + ENTER.
Then follow the items in graphical installation (the sequence of graphical and text install is the same)
Graphical installation of Red Hat.
- Press ENTER to begin graphical installation of Red Hat.
- Press Skip to skip media test.
- Click Next
- Select English for Installation Language and click Next
- Select U.S. English(or the appropriate language) for system keyboard and click Next
- Select Manually partition with Disk Druid and click Next
The webcache which are installed on Hp DL360G5 with 2GB RAM and 72*2 (RAID 1+0) disks.
Device | Mount Point | Type | Size (MB) |
/dev/cciss/c0d0p1 | /boot | ext3 | 102 |
/dev/cciss/c0d0p2 | /opt | ext3 | 11719 |
/dev/cciss/c0d0p3 | / | ext3 | 5373 |
/dev/cciss/c0d0p5 | /u01 | ext3 | 3891 |
/dev/cciss/c0d0p6 | swap | 4095 | |
/dev/cciss/c0d0p7 | /usr | ext3 | 4095 |
/dev/cciss/c0d0p8 | /var | ext3 | 3891 |
/dev/cciss/c0d0p9 | /u02 | ext3 | 8087 |
/dev/cciss/c0d0p10 | /tmp | ext3 | 8189 |
/dev/cciss/c0d0p11 | /home | ext3 | 8189 |
/dev/cciss/c0d0p12 | /home2 | ext3 | rest |
- Click Next to complete manual partitioning.
- Leave the boot loader settings as defaults, and click Next.
- Configure Ethernet interfaces
If you have multiple interfaces on your machine it will be best to enable them all by clicking the checkboxes of the required interfaces. Also give an appropriate hostname for the machine. The Quad Ethernet Card is not detected by the system at the initial setup we will install it later after the setup completes. Click Next
- Disable Firewall and SELinux
Disable Firewall and SELinux and click Next. These features are not required by our application. Click Proceed when you have a firewall warning.
- System language is default English
Leave the system language to default English(USA) and click Next
Select correct timezone depending your location.
I selected Europe/Brussels for time zone and click Next
- Enter root password and NEXT
- Customize software packages to be installed
Click Customize software packages to be installed and click Next
Please make sure that the following packages are installed :
gcc-3.4.3-22.1
gcc-c++-3.4.3-22.1
openmotif21-2.1.30-11.RHEL4.4
setarch-1.6-1
pdksh-5.2.14-30
sysstat-5.0.5-1
gnome-libs-1:1.4.1.2.90-44.1
libstdc++-3.4.3-22.1
libstdc++-devel-3.4.3-22.1
compat-libstdc++-296-2.96-132.7.2
compat-db-4.1.25-9
control-center-2.8.0-12
glibc-common-2.3.4-2.9
binutils-2.15.92.0.2-13
make-1:3.80-5
xscreensaver-4.18-5.rhel4.2
NOTE 1 : You can disable unnecessary packages like Web Server, Windows File Server, Printing Support etc.
NOTE 2 : gcc is required during intallation of ORACLE AS. So, even if you go for production install, then Development tools MUST ALSO be installed .
Click Next and Continue to begin installation.
- Reboot after installation completes
After installation completes click Reboot
- Appearance of welcome screen
After the reboot welcome screen will appear. Click Next.
Accept license agreement and click Next.
- Configure correct date and time
Configure correct date and time, click Next.
Configure your display settings and click Next.
- Product registration (is not needed)
There is no need to register the product so
Next screen click Tell me why I need to register.. and click Next.
Next screen click I can not complete registration.. and click Next.
- Creation of system user (not needed)
Don’t create a system user click Next and then Continue.
- Complete post install tasks.
Click Next in the following two screens to complete post install tasks.
By using your credentials log on to the system.
- Installing HP NC364T PCI Express Quad Port Gigabit
1. First download the Quad Card Driver from
http://h18023.www1.hp.com/support/files/networking/us/download/27412.html
2. Install the source RPM package.
# rpm -ivh e1000-<version>.src.rpm
3. Build the binary RPM for the e1000 driver.
# cd /usr/src/redhat
# rpmbuild -bb SPECS/e1000.spec
4. Check for the existence of a current version of the e1000 package as follows
# rpm -q e1000
If an old version of the package exists, the RPM package should be removed.
# rpm -e e1000
Verify that the old e1000 package has been removed as follows:
# rpm -q e1000
5. Install the new RPM package. This installs the e1000 driver and man page.
Do NOT use the U (Upgrade) flag in the RPM command below - previous e1000 drivers must be removed as described in step 4 above before installing this version.# rpm -ivh RPMS/<arch>/e1000-<version>.<arch>.rpm
The e1000.o module is installed in the following directory:
On 2.6 kernels a e1000.ko module will be installed instead of e1000.o/lib/modules/<kernel_version>/kernel/drivers/net
6. Configure your network setting and address using the below config files :
/etc/sysconfig/network-scripts/ifcfg-eth*
/etc/sysconfig/network
8. You can now reboot your server. Upon reboot the network should start with the e1000 driver loaded and the correct network configuration.
To verify that the e1000 driver is loaded use the following command.
# lsmod
If e1000 is listed then the e1000 driver is loaded. You can also verify that the correct e1000 driver is loaded through any of the following methods. Note that version of the driver loaded should be same as that of the package version.;
Look for driver load messages in the system log.
#dmesg | grep Intel
You should see messages of the following type,
Intel(R) PRO/1000 Network Driver - version x.x.x
- Create /usr/system directory and add it to PATH variable.
In this directory we will add additional tools (as root user) which might be very handy.
mkdir /usr/system
then edit /etc/profile and add following line after the line containing :
after pathmunge /usr/X11R6/bin
add following 2 lines :#needed for /usr/system
pathmunge /usr/system after
This will make sure that the /usr/system dir is in your path and that commands put in there will always be executed. Exit the session and relogin the session to make the changes effective. Check with echo $PATH to verify if /usr/system is in your path variable.
- Disable some useless processes with chkconfig
chkconfig --level 2345 cups off
chkconfig --level 2345 sendmail off
INSTALL ORACLE 10GR2 WEBCACHE
Preinstall Tasks for Oracle10gR2 Webcache
- Change the kernel security parameters
Add the following lines to the /etc/sysctl.conf file:
kernel.msgmnb=65535
kernel.msgmni=2878
kernel.msgmax = 8192
kernel.shmmax=4294967295
fs.file-max=206173
kernel.sem = 256 32000 100 142
kernel.shmmni=4096
net.ipv4.ip_local_port_range = 20000 65000
Then run :
/sbin/sysctl –p
Add the following lines to the /etc/security/limits.conf file:
* soft nproc 16384
* hard nproc 16384
* soft nofile 65536
* hard nofile 65536
Create new groups and oracle user (as root)
groupadd oinstall
groupadd dba
groupadd operuseradd -g oinstall -G dba oracle
passwd oracle
Create the directories in which the Oracle software will be installed:
mkdir -p /u01/app/oracle/product/10gr2
chown -R oracle:oinstall /u01
chown -R oracle:oinstall /u02
As oracle user edit the /home/oracle/.bash_profile file and after the line :
“# User specific environment and startup programs “ add following entries :
ORACLE_BASE=/u02
ORACLE_HOME=/u01/oracle/product/10gr2
ORACLE_SID=test
ORACLE_TERM=xterm
export ORACLE_BASE
export ORACLE_HOME
export ORACLE_SID
export ORACLE_TERM
# Set shell search paths
PATH=$PATH:$ORACLE_HOME/bin:$HOME/bin
export PATH
unset USERNAME
Make sure that export PATH and unset USERNAME commands are created as above.
NOTE : We are doing these steps as oracle user
- Transfer and install systat-5[1].0.5-11.rhel4.i386.rpm
Oracle requires sysstat packages to install completely. Check first if it is installed by running the sar (sar is one of the apps installed by sysstat) command.
If the OS cannot find then it has to be reinstalled.
Download systat-5[1].0.5-11.rhel4.i386.rpm and transfer it to the root directory of the WC server.
as root run :
gzip –d sysstat-[1].0.5-11.rhel4.i386.rpm.gz
followed by
rpm –ivh sysstat-5[1].0.5-11.rhel4.i386.rpm
note it is possible that rpm will not detect the [] characters in the rpm filename. In that case first rename sysstat-5[1].0.5-11.rhel4.i386.rpm to sysstat.rpm
mv sysstat-5[1].0.5-11.rhel4.i386.rpm to sysstat.rpm
and then run
rpm –ivh sysstat.rpm
Run sar to check if sysstat installed correctly. if you get the error :
cannot find directory /var/log/sa/sa29 then reboot the machine.
- Transfer oracle SW in /u01/app/oracle/SW directory
Transfer as_linux_x86_webcache_101202.cpio file into /u01/app/oracle/SW and run :
cpio -idmv < as_linux_x86_webcache_101202.cpio
NOTE 1 : You can transfer the cpio file as root user, then move it into ./SW dir and then do
NOTE 2 : Do NOT forget the < between –idmv and as_linux….cpio !chmod 777 as_linux_x86_webcache_101202.cpio
chown oracle:oinstall as_linux_x86_webcache_101202.cpio
NOTE 3 : After decompressing using cpio you can remove the original as_linux_x86_webcache_101202.cpio file in order to save some diskspace
Running RunInstaller
As oracle user open a terminal and then run :
/u01/app/oracle/SW/Disk1/runInstaller
following screen will popup :
- Specify Inventory directory and credentials.
IMPORTANT : Change the default /u02/oraInventory to : /u01/app/oracle
IMPORTANT : Make sure that the Operating System group name is oinstall AND NOT dba
Then click NEXT.
- Run /u01/app/oracle/orainstRoot.sh
Important : A popup window will appear telling you need to run /u01/app/oracle/orainstRoot.sh as root before pushing CONTINUE. So open a terminal and su – to root and execute that script.
As root (so in a different terminal), run /u01/app/oracle/orainstRoot.sh before proceeding with the install.[root@wc oraInventory]# /u02/oraInventory/orainstRoot.sh
Creating the Oracle inventory pointer file (/etc/oraInst.loc)
Changing groupname of /u02/oraInventory to oinstall.
NOTE : If you get the message to run u02/oraInventory/orainstRoot.sh then this means that at the beginning or oracle you aceepted the default values which is not recommended. In that case restart the install of oracle using the correct install directory
Click continue after running run /u01/app/oracle/orainstRoot.sh
Specify file locationsLeave the Source path as /u01/app/oracle/SW/Disk1/stage/products.xml
Leave destination name as oracleas1
Change Destination path to : /u01/oracle/product/10gr2
NOTE : This is the same as ORACLE_HOME. (do : set | grep ORACLE as oracle user in a separate terminal to check)
- Specify Web Cache Admin Password (at least one char should be numeric)
- Product-specific prerequisite checks
The installer will now execute some checks.
IMPORTANT NOTE : in case you get a warning in the prerequisite checks
If you did not install sysstat-5-XX before as mentioned in the manual above then you will get a warning.
Depending on your installed packages during LINUX RHEL 4 OS, it might be that sysstat-5- is not installed.This means that the checks will result in following error :
“Checking recommended operating system packages” with status = WARNING.
Further examination of the window tells us that sysstat-5-0.5.-1 is not installed.- Begin Oracle Universal Cache Top 10.1.2.1.0 installation
Click Install to begin installation.
- After the installation execute /u01/oracle/product/10gr2/root.sh as root
So open new terminal window and as root then run/u01/oracle/product/10gr2/root.sh
accept the default /usr/local/bin path
Running Oracle10 root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/oracle/product/10gr2
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...Creating /etc/oratab file...
Adding entry to /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
After execution of the root.sh script, click OK
- Note the end of installation messageClick exit to finish installation
Post-install Tasks for Oracle10gR2 Webcache
- Change the default runlevel to 3
as root user, vi /etc/inittab and look for the line :
id:5:initdefault:
and modify it to
id:3:initdefault:
runlevel 3 uses less memory + reboot the machine
- Create some aliases (optional):
As root in /etc/bashrc, look for following line …
#Even for non-interactive, non-login shells
… and insert following lines.
alias xmlvid='vi /u01/oracle/product/10gr2/webcache/webcache.xml'
alias vi='vi'
alias gobin='cd /u01/oracle/product/10gr2/webcache/bin'
alias goconf='cd /u01/oracle/product/10gr2/webcache'
alias gologs='cd /u01/oracle/product/10gr2/webcache/logs'
alias gobin='cd /u01/oracle/product/10gr2/webcache/bin'
alias eventlog='tail -f /u01/oracle/product/10gr2/webcache/logs/event_log'
alias accesslog='tail -f /u01/oracle/product/10gr2/webcache/logs/access_log'
alias wcstatus='/u01/oracle/product/10gr2/webcache/bin/webcachectl status'
alias wcstart='/u01/oracle/product/10gr2/webcache/bin/webcachectl start'
alias wcstop='/u01/oracle/product/10gr2/webcache/bin/webcachectl stop'
By doing this, these aliases will be visible both for root and oracle users
As oracle user do wcstop.
Check with wcstatus if all 3 processes are stopped
Change privilege rights of webcached binary
In the “gobin”(see aliases) directory the privileges of wecached by default are :
In order to open ports lower then 1024 (port 80) you need to change ownerschip as root as follows :#ls –al webcached :
-rwxr-x--- 1 oracle oinstall 17074 Aug 21 17:01 webcached
[root@wc]# chown root webcached
[root@wc]# chmod 4750 webcached
After this operation the privileges of webached MUST look as follows : (of course, date can be different)
-rwsr-x--- 1 root oinstall 3565001 Aug 21 17:01 webcached
NOT doing this will result that webcached will not have the prvileges to open port 80 ( < 1024) and will not start.
- Running webcached with Root Privilege
Webcached must run as the root privilege in the following cases:
· Privileged port numbers less than 1024 are being used for OracleAS Web Cache listening ports.
· There are more than 1,024 file descriptors being used for connections to OracleAS Web Cache.
· The current opmnctl or webcachectl user does not match the configured user in the Process Identity page (Properties > Process Identity) of OracleAS Web Cache Manager.
To run webcached with the root privilege:
1. Change the process identity of the OracleAS Web Cache processes.
To establish the process identity of a restricted user first connect to the WC from http://localhost:9400 and:
a. In the navigator frame, select Properties > Process Identity.
The Process Identity page appears in the right pane.
b. In the Process Identity page, choose Change IDs.
The Change Process Identity dialog box appears.
c. Enter the new user in the New User ID field and the group ID of the user in the New Group ID field.
d. Click Submit.
e. In the OracleAS Web Cache Manager main window, click Apply Changes.
2. Use the webcache_setuser.sh script as follows to run OracleAS Web Cache as a different user, such as root/root, and add set-user ID permission to the webcached executable:
3. webcache_setuser.sh setidentity <user_ID
4. where <user_ID> is the user you specified in the New User ID field of the Process Identity page.
For example, to run OracleAS Web Cache as root/root, enter:
webcache_setuser.sh setidentity root
5. Log out of the computer, and re-login as the user configured in the Process Identity page.
Make sure that alls WC processes are stopped ( wcstatus or ps –ef | grep oracle) and reboot WC.
Then you will be sure that WC is started up in runlevel 3.
Start WC + connect to management port 9400
Make sure that WC processes are running
Login as root and do wcstatus. if not running then type wcstart and check again if they are running.
Now from any windows machine that has IP connectivity to the WC, open the browser and type
at the right-top of the window screen, select “LOG on to OracleAS Web Cache Manager”
NOTE : The default listening port of the WC for management has been changed from 4000 to 9400.
Optimizing your WEBCachehttp://download-west.oracle.com/docs/cd/B14099_19/core.1012/b14001/optwebc.htm#CIHJFBDI
Troubleshooting your WEBcache
http://download-uk.oracle.com/docs/cd/B14099_02/caching.1012/b14046/trouble.htm
No comments:
Post a Comment