Before we begin, let me stress the point that it is not advisable to use FTP/tenlet; for production servers you should use secure channels such as SSH/SFTP or (win)SCP. This article’s intention is to get you up and running as soon as possible for testing, NOT for production environment implementations!
A Brief Pep talk: Preparation is a pain
In part 7 of this series, we started a detailed explanation of setting up a RHEL 4.2 or Centos 4.2 OS. This article works towards our goal by configuring the Network and Linux servers for Oracle readiness. In addition, we will take a brief look at Vmware Virtual Center.
Ok without any further ado, let’s pick up where we left off last time and continue to configure our Linux server. So what do we need to configure?
- Adjusting Network for IPC ( Interprocess communication)
- Setting up FTP/Telnet
- Setting up Oracle account
- Creating mount points for clusterware
- Creating partitions on Virtual Shared Disks
- Swap Space
- Memory
- Semaphores
- File handles
- Hangcheck-timer
- Remote access checks (both rsh – not recommended and scp – recommended)
- Final check on changes
- Verify required RPMs
Adjust Network Settings
Remember, we still are waiting for vmxnet support on the RHEL/Centos 4.2 Server but still vlance should be able to do the work. Anyway, do the following in order to get started.
With Oracle 9.2x onwards, Oracle uses UDP (User Datagram Protocol) for the Linux IPC and strongly recommends you use 256KB as the default and max size for the buffers. Therefore, both the send SO_SNDBUF and SO_RCVBUF sockets must have default and max values of 256KB.
Do the following to achieve the desired results and at the end, just edit the /etc/sysctl.conf to make it permanent should you need to reboot your OS.
Setting up FTP/Telnet
We need to set up the ftp server and root access.
Check to see if FTP (vsftpd) and Telnet (xinetd) are running, if not start them.
Add the following line for telnet. Allow for 10 telnet sessions for user root, which should be enough.
For FTP, edit the /etc/vsftpd.ftpusers
and /etc/vsftpd.user_list
and delete user root from both of these files.
Setting up Oracle Account
Creating the user.
Note: Make sure that the group (110) and user ids (170) are identical on all nodes!
Creating login script for Oracle user.
Log in to the console as user “Oracle” and open up the .bash_console file. (This is a hidden file and you can check on the windows to show hidden files).
##################################################################### # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi alias ls="ls -FA" # User specific environment and startup programs export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1 export ORA_CRS_HOME=$ORACLE_BASE/product/crs export ORACLE_PATH=$ORACLE_BASE/common/oracle/sql:.:$ORACLE_HOME/rdbms/admin # These must be unique per RAC node! export ORACLE_SID=brianrac1 export PATH=.:${PATH}:$HOME/bin:$ORACLE_HOME/bin export PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin export PATH=${PATH}:$ORACLE_BASE/common/oracle/bin export ORACLE_TERM=xterm export TNS_ADMIN=$ORACLE_HOME/network/admin export ORA_NLS10=$ORACLE_HOME/nls/data export LD_LIBRARY_PATH=$ORACLE_HOME/lib export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib export CLASSPATH=$ORACLE_HOME/JRE export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib export THREADS_FLAG=native export TEMP=/tmp export TMPDIR=/tmp #########################################################
Creating Mount points for Clusterware (OCR/spfileasm/votingdisks)
I typically create three mount points. Logged in as user “root”, do the following:
# mkdir -p /u02/oradata/ocr # chown -R oracle:dba /u02 # mkdir -p /u03/oradata/votingdisk # chown -R oracle:dba /u03 # mkdir -p /u04/oradata/spfileasm # chown -R oracle:dba /u04
Creating Partitions on Virtual Shared Disks
We have already seen our regular *.vmx file and we need to append these values to it, so that both (or more depending on your node count) machines can see these shared disks.
############################################################# disk.locking = "FALSE" diskLib.dataCacheMaxSize = "0" diskLib.dataCacheMaxReadAheadSize = "0" diskLib.dataCacheMinReadAheadSize = "0" diskLib.dataCachePageSize = "4096" diskLib.maxUnsyncedWrites = "0" scsi1.present = "TRUE" scsi1.virtualDev = "lsilogic" scsi1.sharedBus = "VIRTUAL" scsi1:1.present = "TRUE" scsi1:1.mode = "independent-persistent" scsi1:1.fileName = "E:\shared\ocr.vmdk" scsi1:1.deviceType = "plainDisk" scsi1:2.present = "TRUE" scsi1:2.mode = "independent-persistent" scsi1:2.fileName = "E:\shared\votingdisk.vmdk" scsi1:2.deviceType = "plainDisk" scsi1:3.present = "TRUE" scsi1:3.mode = "independent-persistent" scsi1:3.fileName = "E:\shared\spfileasm.vmdk" scsi1:3.deviceType = "plainDisk" scsi1:4.present = "TRUE" scsi1:4.mode = "independent-persistent" scsi1:4.fileName = "E:\shared\asm1.vmdk" scsi1:4.deviceType = "plainDisk" scsi1:5.present = "TRUE" scsi1:5.mode = "independent-persistent" scsi1:5.fileName = "E:\shared\asm2.vmdk" scsi1:5.deviceType = "plainDisk" scsi1:6.present = "TRUE" scsi1:6.mode = "independent-persistent" scsi1:6.fileName = "C:\shared\asm3.vmdk" scsi1:6.deviceType = "plainDisk" scsi0:0.redo = "" scsi1:1.redo = "" scsi1:2.redo = "" scsi1:3.redo = "" scsi1:4.redo = "" scsi1:5.redo = "" scsi1:6.redo = "" ##################################################################
After rebooting the nodes, go ahead and start fdisk. Check out the following print screens:
And go ahead and partition all the partitions. Starting with the three (OCR, Votingdisk and spfileasm: all 500mb and then the three ASM files).
Brief introduction of Vmware Virtual Center
I like to have all of my eggs in one basket. It is good to have monitoring tools like SoRAC, but it is also good to have one single console to monitor your RAC farm. So say hello to VMware Virtual Center. You can always download an evaluation version of Virtual Center together with ESX 2.5.2 server and look at it yourself. Here are a couple of screenshots to get you started.
My RAC farm
Performance Pane: CPU, Memory, Disk I/O and Network I/O
Tasks
Events
Alarms
Want to create custom alarms?
Or monitor CPU?
How about Triggers:
What action you want–email, run a script or both?
Inbuilt Console:
Permissions:
Add Users with specified privileges?
As you know, VMware has opened up its ESX 3.0 Server to a limited public. It is beta 2 and has a lot to offer. I also get a lot of mail regarding the VMware workstation and my advice is, since the release of the free VMware Server, go ahead and get that Enterprize level FREE Virtualization server product!
Oracle RAC is growing in popularity and many installations on Microsoft Windows are taking place. Oracle and Dell have launched a 64 bit campaign with Microsoft windows 2003 server as their front runner. I am in talks with Microsoft about writing some whitepapers on their newly launched site called http://www.microsoft-oracle.com. I am a firm believer of facts and proof. Is it really a perfect world when running Oracle RAC on a 64 bit Windows server? (I know there is a lot of memory available to the database, but is the memory the only issue?).
As soon as I get some time and servers on my hands, I will attempt to run this scenario of a typical Linux 64 bit against a Windows 64 bit side by side and see how they perform. Sure, there are many reasons not to abandon your Windows installations, but we need to know if the reasons are good enough to run a mission critical application like Oracle on Windows (or Linux for that matter).
Conclusion:
As you can see, there is a lot of preparation on Linux and you need to have a lot of patience as well. (While writing this article, I lost all of my VM backups due to the disk failure. Fortunately, I had copied it to another location!). It is this tweaking of the OS that makes Linux a very flexible and tunable OS. In addition, you have to take a look at the Virtual Center 1.3 from VMware. The Virtual Center 2.0 beta 2 is under strenuous testing by the Virtualization crazed community and we will look into this some other time.
In the next article, we will go ahead with configuring Swap, Shared memory, etc.
Note that it is not advisable to use FTP/tenlet but rely on secure channels such as SSH/SFTP or (win)SCP. This article series is to get you up and running as soon as possible, NOT for production environment implementations!