- 浏览: 61573 次
- 性别:
- 来自: 成都
文章分类
最新评论
-
lg70124752:
确实哈,现在真的不好找哦,看来JAVAEE真的没有什么竟争力, ...
JAVA四年值好多 -
rkikbs:
貌似四年好像是个砍似的。我也有同感。平时工作中,最多的不就是增 ...
JAVA四年值好多 -
qinq4312:
...
RedHat RHEL 6.1安装gcc的方法
Installing Oracle 11.2.0.3 on CentOS 6.3 on VMWare Workstation 8.
Posted on November 11, 2012 by oraclejedi • Posted in ASM, Linux, Oracle, VMware • Tagged 11.2.0.3, CentOS 6, CentOS 6.3, install, raw disk, RHEL 6, udev, udev rules • 6 Comments
In this blog post, we are going to install Oracle 11.2.0.3 64-bit on CentOS 6.3 using VMWare Workstation 8. Given that Oracle no longer offers ASMLib for non Oracle branded Linux, we are going to use UDEV rules to manage the disk presentation to ASM.
In my 10-part post on installing Oracle RAC on VMWare Workstation I deliberately used an excessive number of screen shots to guide readers through the process. This time I am going to assume you are already comfortable with the Oracle GUI installers, and will skip over excess details to condense this down into a single blog post.
Time Required: 120 minutes
Class Materials:
An x86 64-bit computer with 2GB RAM and 5GB of hard disk space.
A minimum of a 1024×768 display with 256 colors.
VMWare Workstation 8 or better.
Whatever OS VMWare Workstation needs to run on. In my case I run it on Windows 7 Professional.
Oracle Grid and Database software version 11.2.0.3.
You can download the software you need from the following links.
Note that for Oracle, we need the 11.2.0.3 version of the software, not the 11.2.0.1 that is available from download.oracle.com. Oracle 11.2.0.1 is not supported on CentOS 6. As far as I know you will need to get this from My Oracle Support, and you are looking for patch number 10404530 which will give you access to seven zip files. You only need the first three zip files.
Software Download Summary:
Software Product Download Link
VMWare Workstation VMWare Workstation download
CentOS 6.3 64-bit CentOS Linux download
Oracle 11.2.0.3 Database Oracle 11gR2 11.2.0.3 Grid for x86 64-bit Download
Oracle 11.2.0.3 Grid Oracle 11gR2 11.2.0.3 Database for x86 64-bit Download
Part I – Create the CentOS VM.
Time Required: 10 mins.
First we need to create a CentOS VM. I created a new VM using the VMWare Workstation wizard. VMWare Workstation 8 recognizes the CentOS 6.3 install ISO image as CentOS 64-bit and allows Easy Installer to do most of the work.
I created my VM with 2GB RAM and a single 20GB SCSI disks. Pretty basic but then I am just using this for play space.
Part II – Add Required RPMs.
Time Required: 10 mins.
Oracle 11.2.0.3 requires extra RPMs from the install media.
The following command should load all needed RPMs for 11.2.0.3 Grid and Database.
rpm -ivh compat-libstdc++-33-3.2.3-69.el6.*.rpm \
elfutils-devel-0.152-1.el6.x86_64.rpm \
elfutils-libelf-devel-0.152-1.el6.x86_64.rpm \
gcc-c++-4.4.6-4.el6.x86_64.rpm \
glibc-2.12-1.80.el6.i686.rpm \
glibc-devel-2.12-1.80.el6.i686.rpm \
libaio-devel-0.3.107-10.el6.x86_64.rpm \
libaio-0.3.107-10.el6.i686.rpm \
libgcc-4.4.6-4.el6.i686.rpm \
libstdc++-devel-4.4.6-4.el6.x86_64.rpm \
libtool-ltdl-2.2.6-15.5.el6.i686.rpm \
nss-softokn-freebl-3.12.9-11.el6.i686.rpm \
readline-6.0-4.el6.i686.rpm \
ncurses-libs-5.7-3.20090208.el6.i686.rpm \
libcap-2.16-5.5.el6.i686.rpm \
libattr-2.4.44-7.el6.i686.rpm \
compat-libcap1-1.10-1.*.rpm
Please note that not all the above RPMs are listed by the Oracle Installer as required. However testing has shown that they are needed to complete the install.
With our install DVD ISO mounted to the VM, log in as root, shift to the package install directory and execute the command:
[root@localhost ~]# cd "/media/CentOS_6.3_Final/Packages/"
CentOS should respond with:
warning: compat-libstdc++-33-3.2.3-69.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID c105b9de: NOKEY
Preparing... ########################################### [100%]
1:libstdc++-devel ########################################### [ 5%]
2:elfutils-libelf-devel ########################################### [ 11%]
3:libgcc ########################################### [ 16%]
4:elfutils-devel ########################################### [ 21%]
5:nss-softokn-freebl ########################################### [ 26%]
6:glibc ########################################### [ 32%]
7:compat-libstdc++-33 ########################################### [ 37%]
8:gcc-c++ ########################################### [ 42%]
9:glibc-devel ########################################### [ 47%]
10:compat-libcap1 ########################################### [ 53%]
11:libaio ########################################### [ 58%]
12:ncurses-libs ########################################### [ 63%]
13:libattr ########################################### [ 68%]
14:libaio-devel ########################################### [ 74%]
15:libcap ########################################### [ 79%]
16:readline ########################################### [ 84%]
17:compat-libstdc++-33 ########################################### [ 89%]
18:libtool-ltdl ########################################### [ 95%]
19:compat-libcap1 ########################################### [100%]
If you want the pdksh RPM then you will have to download it from the web. Luckily it seems CentOS 6.3 has all the required packages to support it already, so there is no RPM dependency hell for this one.
[root@localhost ~]# rpm -ivh pdksh-5.2.14-30.x86_64.rpm
warning: pdksh-5.2.14-30.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 73307de6: NOKEY
Preparing... ########################################### [100%]
1:pdksh ########################################### [100%]
Part III – Configure the Kernel.
Time Required: 10 mins.
Next we need to configure the CentOS 6.3 Linux kernel to support Oracle 11gR2 11.2.0.3.
Before we can install Oracle 11.2.0.3 on our new VM, we need configure the Linux kernel. The following steps modify key settings to allow Oracle to execute.
Edit the /etc/sysctl.conf and add following lines:
# added for Oracle 11.2.0.3
kernel.shmall = 2097152
kernel.shmmax = 982431744
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
Now execute sysctl -p command to apply the new settings:
Edit the /etc/pam.d/login file and add following line:
# added for Oracle 11.2.0.3
session required pam_limits.so
Edit the /etc/security/limits.conf file and add following lines:
# added for Oracle 11.2.0.3
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
Check current status of SELinux:
[root@localhost ~]# /usr/sbin/getenforce
Enforcing
If output is Enforcing then change mode to Permissive as follows:
[root@localhost ~]# /usr/sbin/setenforce 0
To make the change permanent, modify the /etc/sysconfig/selinux change value of SELINUX variable to disabled:
[root@localhost ~]# cat /etc/sysconfig/selinux
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted
Now we have the CentOS 6.3 Linux kernel ready for Oracle 11.2.0.3.
Part IV – Add the Oracle User.
Time Required: 10 mins.
Next we need to create the Oracle user account, OS groups and mount point.
The Oracle software will be installed and owned by the oracle user account. In additional several OS groups are created that allow other non oracle OS users privileged access to the database and grid resources.
Login as root and create the user oracle account and the OS groups:
[root@localhost ~]# groupadd dba
[root@localhost ~]# groupadd oinstall
[root@localhost ~]# groupadd asmdba
[root@localhost ~]# groupadd asmadmin
[root@localhost ~]# useradd -g oinstall -G dba,asmdba,asmadmin oracle
Now set the password for the oracle user. Since this is development, I suggest we stick with “oracle”.
[root@localhost ~]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
Now we create a directory into which the oracle software will be installed. We need to set this new directory to be owned by oracle:
[root@localhost ~]# mkdir /u01
[root@localhost ~]# mkdir /u01/app
[root@localhost ~]# chown oracle:dba /u01/app
Now we can log into our new oracle account and configure the bash profile:
[root@localhost ~]# su - oracle
[oracle@localhost ~]$ vi ~/.bash_profile
Add the following lines to the profile script:
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_HOSTNAME=`hostname`; export ORACLE_HOSTNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
Part V – Add Disk for ASM.
Time Required: 20 mins.
At this point we are going to shut down our VM and add a second SCSI disk. Using the VMWare Workstation menu, select Create a new virtual disk and then select SCSI. Do not check Independent. Disk size should be 5GB or larger. It doesn’t matter if the disk is fully allocated immediately or if the disk is split into multiple parts.
Once the disk is added, navigate to the directory where the VM files are stored and edit the VMX file. Add the following directive:
disk.EnableUUID = "TRUE"
This directive is needed to allow VMWare Workstation to provude unique SCSI identifiers to Linux.
Now you can restart the VM.
When the VM is restarted, log in as root and use fdisk to partition the new disk. In this example we have added /dev/sdb
Set the partition offset to 2048 sectors.
[root@localhost ~]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): u
Changing display/entry units to sectors
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First sector (63-10485759, default 63): 2048
Last sector or +size or +sizeM or +sizeK (2048-10485759, default 10485759):
Using default value 10485759
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
With the new disk added, we can use scsi_id to determine the SCSI identifier of the new device:
[root@localhost ~]# scsi_id -g -u -d /dev/sdb
36000c2980c56d98cc5150a0ac103058d
So the SCSI identifier of the new disk is 36000c2980c56d98cc5150a0ac103058d. We can now use this with UDEV rules to set the permission of the new device as well as an alias.
We are going to create (or edit) a file in the /etc/udev/rules.d directory. In this case we are calling our file 50-udev.rules.
[root@localhost ~]# vi /etc/udev/rules.d/50-udev.rules
And we add the following line – this should all be one line:
KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent",
RESULT=="36000c2980c56d98cc5150a0ac103058d", NAME="oracleasm/asm-disk1",
OWNER="oracle", GROUP="dba", MODE="0660"
In the above example we have instructed CentOS to create an alias called /dev/oracleasm/asm-disk-1 when it finds the SCSI ID 36000c2980c56d98cc5150a0ac103058d. The alias will be owned by the oracle user and have permissions of 660.
I chose this alias as it matches those used by the old ASMLib.
Once the file is created, we restart udev as follows:
[root@localhost ~]# /sbin/start_udev
Starting udev: [ OK ]
We can now check that the alias exists:
[root@localhost ~]# ls -al /dev/oracleasm/*
total 0
drwxr-xr-x 2 root root 60 Nov 6 12:27 .
drwxr-xr-x 19 root root 3900 Nov 6 12:27 ..
brw-rw---- 1 oracle dba 8, 17 Nov 6 12:27 asm-disk1
Part VI – Install Grid.
Time Required: 30 mins.
Next we will install the Grid Infrastructure home to provide support for ASM.
For Oracle 11.2.0.3 this means unzipping file p10404530_112030_platform_3of7.zip.
This will create a grid directory. Change into the grid directory and launch the runInstaller script.
The Grid install menu consists of ten steps. Since I am not taking screen shots this time, here are the basic steps involved:
Step 1:
Skip Software Updates.
Step 2:
Configure Oracle Grid Infrastructure for a Standalone Server.
Step 3:
Choose the languages you want.
Step 4:
Select the Change Discovery Path button and enter /dev/oracleasm.
This should present the /dev/oracleasm/asm-disk-1 option we created in the last step.
Select that disk, external redundancy, 1MB AU size and a diskgroup name of DATA.
Step 5:
Set the passwords for the SYS and ASMSNMP accounts:
Step 6:
Accept the defaults.
Step 7:
Accept the defaults.
Step 8:
Accept the defaults.
Step 9:
If you completed parts 2, 3 and 4 correctly, we should jump straight to step 10.
Step 10:
Click Install.
Step 11:
A window will appear at 76% complete prompting to execute two scripts as root:
/u01/app/oraInventory/orainstRoot.sh
/u01/app/oracle/product/11.2.0/db_1/root.sh
If you have completed all steps thus far, this should be a simple process:
[root@localhost ~]# cd /u01/app/oraInventory
[root@localhost oraInventory]# ./orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@localhost oraInventory]# cd /u01/app/oracle/product/11.2.0/grid
[root@localhost grid]# ./root.sh
Performing root user operation for Oracle 11g
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/11.2.0/grid
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...
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 script.
Now product-specific root actions will be performed.
Using configuration parameter file: /u01/app/oracle/product/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user 'oracle', privgrp 'oinstall'..
Operation successful.
LOCAL ONLY MODE
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4664: Node localhost successfully pinned.
Adding Clusterware entries to upstart
localhost 2012/11/10 22:01:51 /u01/app/oracle/product/11.2.0/grid/cdata/localhost/backup_20121110_220151.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server
Note if the root.sh script blows up with an error similar to:
/u01/app/oracle/product/11.2.0/db_1/bin/clscfg.bin: error while loading shared libraries: libcap.so.1: cannot open shared object file: No such file or directory
Failed to create keys in the OLR, rc = 32512, 32512
Then go back and re-check the RPM requirements from Step 2. The libcap-1 and libcap-2 RPMs are missing.
The installer should now continue and complete the Grid install.
Part VII – Install Database.
Time Required: 30 mins.
Next we will install the Database home and create a database.
For Oracle 11.2.0.3 this means unzipping files p10404530_112030_platform_1of7.zip and p10404530_112030_platform_2of7.zip. Note these should be unzipped into the same directory, and not separate directories as was the case in older releases.
This will create a database directory. Change into the database directory and launch the runInstaller script.
The Database install menu consists of twenty-one steps. Since I am not taking screen shots this time, here are the basic steps involved:
Step 1:
I don’t want any more spam thanks.
Step 2:
Skip the updates.
Step 3:
Create and configure a database.
Step 4:
Server Class.
Step 5:
Single instance database installation.
Step 6:
Advanced install.
Step 7:
Choose the languages you want.
Step 8:
Enterprise Edition.
Step 9:
Choose the defaults, but Grid and Database must be in different directories.
Step 10:
General Purpose / Transaction Processing.
Step 11:
Select a database name.
Step 12:
Add in the Sample Schemas.
Step 13:
Use Oracle Enterprise Manager Database Control for database management.
Step 14:
Use Automatic Storage Management.
I hope you remembered the password you selected back in Part VI.
Step 15:
Do not enable automated backups
Step 16:
Select the DATA diskgroup.
Step 17:
Set the passwords for the database.
Step 18:
Accept the defaults.
Step 19:
If you completed all parts properly, we should jump to step 20.
Step 20:
Click Install to start the installer.
Step 21:
At about 86% complete, DBCA will kick in and create your database.
When that is done, you will need to run the root.sh script.
[root@localhost db_1]# ./root.sh
Performing root user operation for Oracle 11g
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/11.2.0/db_1
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.
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 script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
Step 22:
Make a note of the Enterprise Manager URL and click Close.
That’s it, Oracle 11.2.0.3 on CentOS 6.3 on VMWare Workstation in two hours or less.
转自
http://gruffdba.wordpress.com/2012/11/11/installing-oracle-11-2-0-3-on-centos-6-3-on-vmware-workstation-8/
Posted on November 11, 2012 by oraclejedi • Posted in ASM, Linux, Oracle, VMware • Tagged 11.2.0.3, CentOS 6, CentOS 6.3, install, raw disk, RHEL 6, udev, udev rules • 6 Comments
In this blog post, we are going to install Oracle 11.2.0.3 64-bit on CentOS 6.3 using VMWare Workstation 8. Given that Oracle no longer offers ASMLib for non Oracle branded Linux, we are going to use UDEV rules to manage the disk presentation to ASM.
In my 10-part post on installing Oracle RAC on VMWare Workstation I deliberately used an excessive number of screen shots to guide readers through the process. This time I am going to assume you are already comfortable with the Oracle GUI installers, and will skip over excess details to condense this down into a single blog post.
Time Required: 120 minutes
Class Materials:
An x86 64-bit computer with 2GB RAM and 5GB of hard disk space.
A minimum of a 1024×768 display with 256 colors.
VMWare Workstation 8 or better.
Whatever OS VMWare Workstation needs to run on. In my case I run it on Windows 7 Professional.
Oracle Grid and Database software version 11.2.0.3.
You can download the software you need from the following links.
Note that for Oracle, we need the 11.2.0.3 version of the software, not the 11.2.0.1 that is available from download.oracle.com. Oracle 11.2.0.1 is not supported on CentOS 6. As far as I know you will need to get this from My Oracle Support, and you are looking for patch number 10404530 which will give you access to seven zip files. You only need the first three zip files.
Software Download Summary:
Software Product Download Link
VMWare Workstation VMWare Workstation download
CentOS 6.3 64-bit CentOS Linux download
Oracle 11.2.0.3 Database Oracle 11gR2 11.2.0.3 Grid for x86 64-bit Download
Oracle 11.2.0.3 Grid Oracle 11gR2 11.2.0.3 Database for x86 64-bit Download
Part I – Create the CentOS VM.
Time Required: 10 mins.
First we need to create a CentOS VM. I created a new VM using the VMWare Workstation wizard. VMWare Workstation 8 recognizes the CentOS 6.3 install ISO image as CentOS 64-bit and allows Easy Installer to do most of the work.
I created my VM with 2GB RAM and a single 20GB SCSI disks. Pretty basic but then I am just using this for play space.
Part II – Add Required RPMs.
Time Required: 10 mins.
Oracle 11.2.0.3 requires extra RPMs from the install media.
The following command should load all needed RPMs for 11.2.0.3 Grid and Database.
rpm -ivh compat-libstdc++-33-3.2.3-69.el6.*.rpm \
elfutils-devel-0.152-1.el6.x86_64.rpm \
elfutils-libelf-devel-0.152-1.el6.x86_64.rpm \
gcc-c++-4.4.6-4.el6.x86_64.rpm \
glibc-2.12-1.80.el6.i686.rpm \
glibc-devel-2.12-1.80.el6.i686.rpm \
libaio-devel-0.3.107-10.el6.x86_64.rpm \
libaio-0.3.107-10.el6.i686.rpm \
libgcc-4.4.6-4.el6.i686.rpm \
libstdc++-devel-4.4.6-4.el6.x86_64.rpm \
libtool-ltdl-2.2.6-15.5.el6.i686.rpm \
nss-softokn-freebl-3.12.9-11.el6.i686.rpm \
readline-6.0-4.el6.i686.rpm \
ncurses-libs-5.7-3.20090208.el6.i686.rpm \
libcap-2.16-5.5.el6.i686.rpm \
libattr-2.4.44-7.el6.i686.rpm \
compat-libcap1-1.10-1.*.rpm
Please note that not all the above RPMs are listed by the Oracle Installer as required. However testing has shown that they are needed to complete the install.
With our install DVD ISO mounted to the VM, log in as root, shift to the package install directory and execute the command:
[root@localhost ~]# cd "/media/CentOS_6.3_Final/Packages/"
CentOS should respond with:
warning: compat-libstdc++-33-3.2.3-69.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID c105b9de: NOKEY
Preparing... ########################################### [100%]
1:libstdc++-devel ########################################### [ 5%]
2:elfutils-libelf-devel ########################################### [ 11%]
3:libgcc ########################################### [ 16%]
4:elfutils-devel ########################################### [ 21%]
5:nss-softokn-freebl ########################################### [ 26%]
6:glibc ########################################### [ 32%]
7:compat-libstdc++-33 ########################################### [ 37%]
8:gcc-c++ ########################################### [ 42%]
9:glibc-devel ########################################### [ 47%]
10:compat-libcap1 ########################################### [ 53%]
11:libaio ########################################### [ 58%]
12:ncurses-libs ########################################### [ 63%]
13:libattr ########################################### [ 68%]
14:libaio-devel ########################################### [ 74%]
15:libcap ########################################### [ 79%]
16:readline ########################################### [ 84%]
17:compat-libstdc++-33 ########################################### [ 89%]
18:libtool-ltdl ########################################### [ 95%]
19:compat-libcap1 ########################################### [100%]
If you want the pdksh RPM then you will have to download it from the web. Luckily it seems CentOS 6.3 has all the required packages to support it already, so there is no RPM dependency hell for this one.
[root@localhost ~]# rpm -ivh pdksh-5.2.14-30.x86_64.rpm
warning: pdksh-5.2.14-30.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 73307de6: NOKEY
Preparing... ########################################### [100%]
1:pdksh ########################################### [100%]
Part III – Configure the Kernel.
Time Required: 10 mins.
Next we need to configure the CentOS 6.3 Linux kernel to support Oracle 11gR2 11.2.0.3.
Before we can install Oracle 11.2.0.3 on our new VM, we need configure the Linux kernel. The following steps modify key settings to allow Oracle to execute.
Edit the /etc/sysctl.conf and add following lines:
# added for Oracle 11.2.0.3
kernel.shmall = 2097152
kernel.shmmax = 982431744
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
Now execute sysctl -p command to apply the new settings:
Edit the /etc/pam.d/login file and add following line:
# added for Oracle 11.2.0.3
session required pam_limits.so
Edit the /etc/security/limits.conf file and add following lines:
# added for Oracle 11.2.0.3
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
Check current status of SELinux:
[root@localhost ~]# /usr/sbin/getenforce
Enforcing
If output is Enforcing then change mode to Permissive as follows:
[root@localhost ~]# /usr/sbin/setenforce 0
To make the change permanent, modify the /etc/sysconfig/selinux change value of SELINUX variable to disabled:
[root@localhost ~]# cat /etc/sysconfig/selinux
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted
Now we have the CentOS 6.3 Linux kernel ready for Oracle 11.2.0.3.
Part IV – Add the Oracle User.
Time Required: 10 mins.
Next we need to create the Oracle user account, OS groups and mount point.
The Oracle software will be installed and owned by the oracle user account. In additional several OS groups are created that allow other non oracle OS users privileged access to the database and grid resources.
Login as root and create the user oracle account and the OS groups:
[root@localhost ~]# groupadd dba
[root@localhost ~]# groupadd oinstall
[root@localhost ~]# groupadd asmdba
[root@localhost ~]# groupadd asmadmin
[root@localhost ~]# useradd -g oinstall -G dba,asmdba,asmadmin oracle
Now set the password for the oracle user. Since this is development, I suggest we stick with “oracle”.
[root@localhost ~]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
Now we create a directory into which the oracle software will be installed. We need to set this new directory to be owned by oracle:
[root@localhost ~]# mkdir /u01
[root@localhost ~]# mkdir /u01/app
[root@localhost ~]# chown oracle:dba /u01/app
Now we can log into our new oracle account and configure the bash profile:
[root@localhost ~]# su - oracle
[oracle@localhost ~]$ vi ~/.bash_profile
Add the following lines to the profile script:
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_HOSTNAME=`hostname`; export ORACLE_HOSTNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
Part V – Add Disk for ASM.
Time Required: 20 mins.
At this point we are going to shut down our VM and add a second SCSI disk. Using the VMWare Workstation menu, select Create a new virtual disk and then select SCSI. Do not check Independent. Disk size should be 5GB or larger. It doesn’t matter if the disk is fully allocated immediately or if the disk is split into multiple parts.
Once the disk is added, navigate to the directory where the VM files are stored and edit the VMX file. Add the following directive:
disk.EnableUUID = "TRUE"
This directive is needed to allow VMWare Workstation to provude unique SCSI identifiers to Linux.
Now you can restart the VM.
When the VM is restarted, log in as root and use fdisk to partition the new disk. In this example we have added /dev/sdb
Set the partition offset to 2048 sectors.
[root@localhost ~]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): u
Changing display/entry units to sectors
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First sector (63-10485759, default 63): 2048
Last sector or +size or +sizeM or +sizeK (2048-10485759, default 10485759):
Using default value 10485759
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
With the new disk added, we can use scsi_id to determine the SCSI identifier of the new device:
[root@localhost ~]# scsi_id -g -u -d /dev/sdb
36000c2980c56d98cc5150a0ac103058d
So the SCSI identifier of the new disk is 36000c2980c56d98cc5150a0ac103058d. We can now use this with UDEV rules to set the permission of the new device as well as an alias.
We are going to create (or edit) a file in the /etc/udev/rules.d directory. In this case we are calling our file 50-udev.rules.
[root@localhost ~]# vi /etc/udev/rules.d/50-udev.rules
And we add the following line – this should all be one line:
KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent",
RESULT=="36000c2980c56d98cc5150a0ac103058d", NAME="oracleasm/asm-disk1",
OWNER="oracle", GROUP="dba", MODE="0660"
In the above example we have instructed CentOS to create an alias called /dev/oracleasm/asm-disk-1 when it finds the SCSI ID 36000c2980c56d98cc5150a0ac103058d. The alias will be owned by the oracle user and have permissions of 660.
I chose this alias as it matches those used by the old ASMLib.
Once the file is created, we restart udev as follows:
[root@localhost ~]# /sbin/start_udev
Starting udev: [ OK ]
We can now check that the alias exists:
[root@localhost ~]# ls -al /dev/oracleasm/*
total 0
drwxr-xr-x 2 root root 60 Nov 6 12:27 .
drwxr-xr-x 19 root root 3900 Nov 6 12:27 ..
brw-rw---- 1 oracle dba 8, 17 Nov 6 12:27 asm-disk1
Part VI – Install Grid.
Time Required: 30 mins.
Next we will install the Grid Infrastructure home to provide support for ASM.
For Oracle 11.2.0.3 this means unzipping file p10404530_112030_platform_3of7.zip.
This will create a grid directory. Change into the grid directory and launch the runInstaller script.
The Grid install menu consists of ten steps. Since I am not taking screen shots this time, here are the basic steps involved:
Step 1:
Skip Software Updates.
Step 2:
Configure Oracle Grid Infrastructure for a Standalone Server.
Step 3:
Choose the languages you want.
Step 4:
Select the Change Discovery Path button and enter /dev/oracleasm.
This should present the /dev/oracleasm/asm-disk-1 option we created in the last step.
Select that disk, external redundancy, 1MB AU size and a diskgroup name of DATA.
Step 5:
Set the passwords for the SYS and ASMSNMP accounts:
Step 6:
Accept the defaults.
Step 7:
Accept the defaults.
Step 8:
Accept the defaults.
Step 9:
If you completed parts 2, 3 and 4 correctly, we should jump straight to step 10.
Step 10:
Click Install.
Step 11:
A window will appear at 76% complete prompting to execute two scripts as root:
/u01/app/oraInventory/orainstRoot.sh
/u01/app/oracle/product/11.2.0/db_1/root.sh
If you have completed all steps thus far, this should be a simple process:
[root@localhost ~]# cd /u01/app/oraInventory
[root@localhost oraInventory]# ./orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@localhost oraInventory]# cd /u01/app/oracle/product/11.2.0/grid
[root@localhost grid]# ./root.sh
Performing root user operation for Oracle 11g
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/11.2.0/grid
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...
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 script.
Now product-specific root actions will be performed.
Using configuration parameter file: /u01/app/oracle/product/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user 'oracle', privgrp 'oinstall'..
Operation successful.
LOCAL ONLY MODE
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4664: Node localhost successfully pinned.
Adding Clusterware entries to upstart
localhost 2012/11/10 22:01:51 /u01/app/oracle/product/11.2.0/grid/cdata/localhost/backup_20121110_220151.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server
Note if the root.sh script blows up with an error similar to:
/u01/app/oracle/product/11.2.0/db_1/bin/clscfg.bin: error while loading shared libraries: libcap.so.1: cannot open shared object file: No such file or directory
Failed to create keys in the OLR, rc = 32512, 32512
Then go back and re-check the RPM requirements from Step 2. The libcap-1 and libcap-2 RPMs are missing.
The installer should now continue and complete the Grid install.
Part VII – Install Database.
Time Required: 30 mins.
Next we will install the Database home and create a database.
For Oracle 11.2.0.3 this means unzipping files p10404530_112030_platform_1of7.zip and p10404530_112030_platform_2of7.zip. Note these should be unzipped into the same directory, and not separate directories as was the case in older releases.
This will create a database directory. Change into the database directory and launch the runInstaller script.
The Database install menu consists of twenty-one steps. Since I am not taking screen shots this time, here are the basic steps involved:
Step 1:
I don’t want any more spam thanks.
Step 2:
Skip the updates.
Step 3:
Create and configure a database.
Step 4:
Server Class.
Step 5:
Single instance database installation.
Step 6:
Advanced install.
Step 7:
Choose the languages you want.
Step 8:
Enterprise Edition.
Step 9:
Choose the defaults, but Grid and Database must be in different directories.
Step 10:
General Purpose / Transaction Processing.
Step 11:
Select a database name.
Step 12:
Add in the Sample Schemas.
Step 13:
Use Oracle Enterprise Manager Database Control for database management.
Step 14:
Use Automatic Storage Management.
I hope you remembered the password you selected back in Part VI.
Step 15:
Do not enable automated backups
Step 16:
Select the DATA diskgroup.
Step 17:
Set the passwords for the database.
Step 18:
Accept the defaults.
Step 19:
If you completed all parts properly, we should jump to step 20.
Step 20:
Click Install to start the installer.
Step 21:
At about 86% complete, DBCA will kick in and create your database.
When that is done, you will need to run the root.sh script.
[root@localhost db_1]# ./root.sh
Performing root user operation for Oracle 11g
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/11.2.0/db_1
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.
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 script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
Step 22:
Make a note of the Enterprise Manager URL and click Close.
That’s it, Oracle 11.2.0.3 on CentOS 6.3 on VMWare Workstation in two hours or less.
转自
http://gruffdba.wordpress.com/2012/11/11/installing-oracle-11-2-0-3-on-centos-6-3-on-vmware-workstation-8/
发表评论
-
tomcat连接数查看
2014-05-23 11:05 961netstat -na | grep ESTAB | grep ... -
用linux下常用命令wget进行整站下载(递归下载至本地)
2014-04-19 10:30 1943这个命令可以以递归的方式下载整站,并可以将下载的页面中的链接转 ... -
ERROR: ORA-01034:ORACLE not available ORA-27101:shared memory realm does not exi
2013-09-25 10:55 719ERROR: ORA-01034:ORACLE not ava ... -
Linux 的 /tmp 定期的刪除说明
2013-06-18 09:43 726/tmp是Linux 用來放暫存資料的地方, 系統有支排程在 ... -
Linux搭建SVN Server配置详解
2012-12-02 12:39 1185SVN简介和工作原理 subversion(简称svn)是近 ... -
ubuntu下使用vi是方向键变乱码 退格键不能使用的解决方法
2012-07-08 23:06 879一、编辑/etc/vim/vimrc.tiny ... -
ubuntu vi
2012-07-08 22:25 871最近在使用ubuntu,已经很少进入windows平台了。在l ... -
RedHat RHEL 6.1安装gcc的方法
2012-04-15 16:38 1872RHEL 6.1默认是没有gcc和gcc-c++环境的,而且我 ...
相关推荐
Oracle Database 11g Release 2 (11.2.0.3) RAC On Oracle Linux 6.3 Using VirtualBox This article describes the installation of Oracle Database 11g release 2 (11.2.0.3 64-bit) RAC on Linux (Oracle Linux ...
C:\Users\ehualu>mvn install:install-file -Dfile=C:/ojdbc6.jar -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0.3 -Dpackaging=jar -DgeneratePom=true [INFO] Scanning for projects... [INFO] ...
Installing 11.2.0.3 32-bit (x86) or 64-bit (x86-64) on RHEL6 Reports That Packages "elfutils-libelf-devel-0.97" and "pdksh-5.2.14" are missing
This is the README file for OPatch 11.2.0.3.15, the Oracle Interim One-off Patch Installer. This patch (6880880) installs the "OPatch" utility. OPatch is used for patching Oracle software. If you ...
Installing : docker-engine-1.12.6-1.el7.centos.x86_64 8/8 Verifying : libsemanage-python-2.5-11.el7.x86_64 1/8 Verifying : setools-libs-3.3.8-2.el7.x86_64 2/8 Verifying : policycoreutils-python-...
Nero.v11.2.00900.Crack.Tool.Kit.Incl.AdvrCntr.Module.v11.0.1.23-Kindly new crack tested 100% works... Nero.v11.2.00900.Crack.Tool.Kit.Incl.AdvrCntr.Module.v11.0.1.23-Kindly Installation and crack ...
8. **硬件兼容性**:Oracle Solaris 11.2支持广泛的硬件平台,包括x86和SPARC架构。在安装前,确认你的硬件是否在Oracle的硬件兼容性列表(HCL)上。 9. **许可证协议**:Oracle Solaris 11.2的使用受到Oracle的许可...
### 安装Oracle 10g R2在RHEL 5 & OEL 5 (x86_64)上的需求 #### 概述 本文档详细介绍了在Red Hat Enterprise Linux(RHEL)5和Oracle Enterprise Linux(OEL)5(x86_64架构)上安装Oracle 10g Release 2数据库的...
在本文中,我们将深入探讨如何在Linux环境下安装Oracle Database 11g,这是一个重要的数据库管理系统,广泛用于企业级数据存储和处理。Oracle 11g提供了高性能、高可用性和安全性,使其成为许多组织的核心数据库解决...
2. **静默方式安装EM Grid Control 10.2.0.3**: - 下载并解压Grid Control的安装文件。 - 使用响应文件进行静默安装,该响应文件包含了安装过程中所需的所有配置选项。 3. **升级EM Grid Control至10.2.0.5**: -...
本指南,即"Oracle Solaris 11.2 (Accessible) Quick Start Guide to Installing",是为用户提供快速入门安装Oracle Solaris 11.2的指引,旨在帮助用户在2014年8月发布后,能够迅速有效地完成系统的部署和更新。...
安装Oracle Database 10g在Sun Solaris 10操作系统上是一个技术性较强的步骤,"Installing Oracle Database 10 g on Sun Solaris 10 by Using RC"文档会详细指导这一过程。这通常包括硬件和软件需求分析、操作系统...
4. VMware Workstation 5.0 版本是最新的版本, supports installing Solaris 10 操作系统。 5. 安装 Solaris 10 操作系统需要满足一定的硬件要求,包括内存至少 128 MB、磁盘空间至少 12 GB、CPU 处理器速度至少 ...
### Fedora Linux Toolbox: 1000+ Commands for Fedora, CentOS, and Red Hat Power Users #### Chapter 1: Starting with Fedora Linux In this chapter, readers are introduced to Fedora Linux, an advanced ...
从压缩包文件`Installing Oracle9i on RedHat Linux 7_2, 7_3, 8_0, 9, AS 2_1, 3_0 (Red Hat Enterprise Advanced Server 3 - RHEL AS 3) (Oracle database installation, install Oracle software).htm`中,我们...
Updating / installing... 1:libcgroup-0.41-8.el7 ################################# [ 25%] 2:libcgroup-devel-0.41-8.el7 ################################# [ 50%] 3:libcgroup-pam-0.41-8.el7 ###########...