FOR EDITING.. This is just a couple of notes from my Oracle testing a few weeks back that I forgot to post..

**A. Installing **

  1. Check for rpm packages:
rpm -q binutils compat-db control-center gcc gcc-c++ glibc glibc-common gnome-libs libstdc++ libstdc++-devel make pdksh sysstat xscreensaver libaio openmotif21 elfutils-libelf libaio-devel libgcc

NOTE: For 10g, you need libXp.so.6 installed. It seems the oracle installer is messed up with some i386 modules pointing to x86? Anyway, I was able to resolve the problem by installing the libXp.i386.rpm version.

  1. install the necessary rpm packages:
rpm -ivh compat-db-4.2.52-5.1.x86_64.rpm 
rpm -ivh libgnome-2.16.0-6.el5.x86_64.rpm 
rpm -ivh sysstat-7.0.0-3.el5.x86_64.rpm 
rpm -ivh libaio-devel-0.3.106-3.2.x86_64.rpm 
rpm -ivh lm_sensors-2.10.0-3.1.x86_64.rpm
rpm -ivh beecrypt-devel-4.1.2-10.1.1.x86_64.rpm elfutils-devel-0.125-3.el5.x86_64.rpm net-snmp-devel-5.3.1-19.el5.x86_64.rpm elfutils-devel-static-0.125-3.el5.x86_64.rpm net-snmp-5.3.1-19.el5.x86_64.rpm net-snmp-libs-5.3.1-19.el5.x86_64.rpm
  1. vim /etc/profile
ORACLE_BASE=/opt/oracle/product
ORACLE_SID=csdbora
ORACLE_HOME=/opt/oracle/product/11.1.0/db_1
 
export ORACLE_BASE ORACLE_SID ORACLE_HOME
 
PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
  1. Create oracle Account
groupadd oinstall
groupadd dba
useradd -m -g oinstall -G dba oracle
id oracle

uid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba)

  1. Run modify_kernel.sh
cat >> /etc/sysctl.conf << EOF
kernel.shmall = 2097152
kernel.shmmax = 1073741824 
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1025 65000
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_max = 262144
EOF
  1. vim /etc/sysctl.conf and comment kernel.shmall and kernel.shmmax because if
    you don’t then we will have double results

  2. /sbin/sysctl -p

  3. Create Directories:

mkdir -p /u01
mkdir -p /opt/oracle
mkdir -p /opt/oracle/product
chown -R oracle:oinstall /u01
chown -R oracle:oinstall /opt/oracle
chmod -R 755 /u01
chmod -R 755 /opt/oracle
chmod -R 755 /opt/oracle/product
  1. Run sh -v modify_shelllimits.sh

  2. Add the ff lines in /etc/pam.d/login
    session required /lib/security/pam_limits.so
    session required pam_limits.so

  3. cp -rf /home/installers/linux.x64_11gR1_database.zip /opt/oracle

  4. chown oracle:oinstall /opt/oracle/linux.x64_11gR1_database.zip

  5. Clost all terminals and logout as root from desktop.

  6. Login as oracle

  7. Follow tutorial until installing oracle
    Installing Oracle 11g on CentOS under VMWare on a Macbook.doc

To extract: cpio -idmv < 10201_database_linux_x86_64.cpio

vim /etc/redhat-release
Redhat 4
  1. Run the 2 scripts after the dialog:

[root@cs5ora11g db1]# sh root.sh
Running Oracle 11g root.sh script…

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /opt/oracle/product/11.1.0/db1

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.sh script.
Now product-specific root actions will be performed.
Finished product-specific root actions.

  1. Open your firewall to 1158

  2. Go to https://192.168.1.155:1158/em

– Login as SYSMAN:[password] (nickname+wife)

  1. Install Oracle Instant Client for your distro [MacOS]

http://www.oracle.com/technology/software/tech/oci/instantclient/index.html

a. Add exports to runsqlplus.sh
b. copy tnsnames.ora from centos to mac
c. add in firewall: 1521
d. sh runsqlplus.sh

  1. do sqlplus
    Enter user-name: SYSMAN@cybersof
    Enter password:

Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 – 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>

You are now connected successfully.

  1. Check for oracle processes: ps -ef grep ora
SQLPLUS DBINSTANCE:
oraclecybersof (LOCAL=NO)
 
 
ORACLE LISTENER:
/opt/oracle/product/11.1.0/db1/bin/tnslsnr LISTENER -inherit
 
ORACLE ENTERPRISE MANAGER:
oracle   14487     1   15:37 ?        00:00:00
/opt/oracle/product/11.1.0/db1/perl/bin/perl
/opt/oracle/product/11.1.0/db1/bin/emwd.pl dbconsole
/opt/oracle/product/11.1.0/db1/cs5ora11g_csmlcc/sysman/log/emdb.nohup
oracle   14511 14487  2 15:37 ?        00:00:36
/opt/oracle/product/11.1.0/db1/jdk/bin/java -server -Xmx512M
-XX:MaxPermSize=1024M -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=40
-DORACLE_HOME=/opt/oracle/product/11.1.0/db1
-Doracle.home=/opt/oracle/product/11.1.0/db1/oc4j
-Doracle.oc4j.localhome=/opt/oracle/product/11.1.0/db1/cs5ora11g_csmlcc/sysman
-DEMSTATE=/opt/oracle/product/11.1.0/db1/cs5ora11g_csmlcc
-Doracle.j2ee.dont.use.memory.archive=true
-Djava.protocol.handler.pkgs=HTTPClient
-Doracle.security.jazn.config=/opt/oracle/product/11.1.0/db1/oc4j/j2ee/OC4J_DBConsole_cs5ora11g_csmlcc/config/jazn.xml
-Djava.security.policy=/opt/oracle/product/11.1.0/db1/oc4j/j2ee/OC4J_DBConsole_cs5ora11g_csmlcc/config/java2.policy
-Djavax.net.ssl.KeyStore=/opt/oracle/product/11.1.0/db1/sysman/config/OCMTrustedCerts.txt-Djava.security.properties=/opt/oracle/product/11.1.0/db1/oc4j/j2ee/home/config/jazn.security.props
-DEMDROOT=/opt/oracle/product/11.1.0/db1/cs5ora11g_csmlcc
-Dsysman.md5password=true -Drepapi.oracle.home=/opt/oracle/product/11.1.0/db1
-Ddisable.checkForUpdate=true
-Doracle.sysman.ccr.ocmSDK.websvc.keystore=/opt/oracle/product/11.1.0/db1/jlib/emocmclnt.ks
-Dice.pilots.html4.ignoreNonGenericFonts=true -Djava.awt.headless=true -jar
/opt/oracle/product/11.1.0/db1/oc4j/j2ee/home/oc4j.jar -config
/opt/oracle/product/11.1.0/db1/oc4j/j2ee/OC4J_DBConsole_cs5ora11g_csmlcc/config/server.xml
  1. Set Oracle Environment
# su - oracle
# vim ~/.bash_profile
ORACLE_BASE=/opt/oracle/product
ORACLE_SID=cybersof
ORACLE_HOME=/opt/oracle/product/11.1.0/db1
export ORACLE_BASE ORACLE_SID ORACLE_HOME
 
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
  1. Shutdown and Startup of Oracle
$ . oraenv
<enter your SID>
 
$ sqlplus "/ as sysdba"
SQL> startup
SQL> exit
 
$ lsnrctl
LSNRCTL> start
LSNRCTL> exit
 
$ cd $ORACLE_HOME/bin
./emctl start dbconsole

B. Creating Users

Login to https://192.168.1.155:1158/em
username:sysman
password: [nickname+wifey]
connect as “sysdba”

  1. Creating admin user:

http://download.oracle.com/docs/cd/B28359_01/server.111/b28301/admqs_administer_users.htm#CHDBDBGI

em > Setup > Administrators > Create

  1. Create appdev user:
    em > Server > Roles

http://download.oracle.com/docs/cd/B28359_01/server.111/b28301/admqs_administer_users.htm

CREATE USER "APPDEV" PROFILE "DEFAULT" IDENTIFIED BY "*******" DEFAULT TABLESPACE "USERS" TEMPORARY TABLESPACE "TEMP" ACCOUNT UNLOCK
GRANT UNLIMITED TABLESPACE TO "APPDEV";
GRANT "CONNECT" TO "APPDEV";
GRANT "RESOURCE" TO "APPDEV";

Picture 1.png

Part II. Installing Oracle10g on CentOS5

  1. Choose Advanced Installation”

Picture 1.png

  1. If its just network prerequisite.. ignore it. It’s not a big deal.

Picture 2.png

  1. ORACLE_HOME: /opt/oracle/product/10.2.0/db_1

Picture 3.png

  1. ORACLE_SID: orcl, CHARSET: utf8

Picture 4.png

  1. EM Installed…

Picture 6.png

  1. ISQLPLUS

Picture 7.png

  1. Run root.sh

Picture 9.png

output…

Picture 8.png

  1. Other settings

Picture 10.png

  1. Oracle Environment Variables

Picture 12.png