These are notes on installing oracle 9i on fc3, as found at http://ivan.kartik.sk/oracle/install_ora9_fedora.html. They are not really a play-by play so much as an exploration of what I did/tried while following the instructions at that (very helpful) URL.
Get compat-gcc-7.3-2.96.126.i386.rpm as instructed.
Unpack the rpm without actually installing it.
[root@demo required_rpms]# rpm2cpio < compat-gcc-7.3-2.96.126.i386.rpm | cpio -i --make-directories 13097 blocks [root@demo required_rpms]# ls compat-gcc-7.3-2.96.126.i386.rpm usr
Make a place to put the antiquated stuff:
[root@demo required_rpms]# mkdir /opt/ancient [root@demo required_rpms]# mv usr /opt/ancient/ [root@demo required_rpms]# ls /opt/ancient/ usr
Fix permissions on directories:
[root@demo opt]# cd ancient/ [root@demo ancient]# ls -l total 4 drwx------ 5 root root 4096 Aug 10 22:44 usr [root@demo ancient]# find . -type d -exec chmod 755 {} \; [root@demo ancient]# ls -l total 4 drwxr-xr-x 5 root root 4096 Aug 10 22:44 usr
Make the ancient gcc named gcc:
[root@demo oracle]# cd /opt/ancient/usr/bin/ [root@demo bin]# ln gcc296 gcc [root@demo bin]# ls -l total 252 -rwxr-xr-x 3 root root 81884 Aug 10 22:44 gcc -rwxr-xr-x 3 root root 81884 Aug 10 22:44 gcc296 -rwxr-xr-x 3 root root 81884 Aug 10 22:44 i386-redhat-linux7-gcc
Remember that we are using jre1.3.1_16, not jre1.3.1_15, as in the instructions. (Was not able to find jre1.3.1_15 anymore? I forget...)
Fix PATH and LD_LIBRARY_PATH and ORACLE_OEM_JAVARUNTIME for oracle user by altering oracle user's .bash_profile:
ORACLE_OEM_JAVARUNTIME=/opt/jre1.3.1_16 PATH=/opt/ancient/usr/bin:$PATH:$ORACLE_HOME/bin LD_LIBRARY_PATH=/opt/ancient/usr/lib:$ORACLE_HOME/lib:/lib:/usr/lib
You will need some deprecated x11 libraries for java to run:
[root@demo Disk1]$ yum install xorg-x11-deprecated-libs
Ensure oracle dir is there for installer
[root@demo ~]# cd /opt/ [root@demo opt]# ls ancient jre1.3.1_16 [root@demo opt]# mkdir oracle [root@demo opt]# chown oracle:dba oracle [root@demo opt]# ls -l total 12 drwxr-xr-x 3 root root 4096 Aug 10 22:47 ancient drwxrwxr-x 6 root root 4096 May 28 08:57 jre1.3.1_16 drwxr-xr-x 2 oracle dba 4096 Aug 10 23:51 oracle [root@demo opt]#
Notes from running installer:
- Oracle Home name will be OUIHome
- Path will be /opt/oracle/920
- Non OracleHome components go in /opt/oracle/oui
- Database Administrator (OSDBA) Group: dba
- Database Operator (OSOPER) Group: dba
- The Management Server will require a new repository
In creating the database...
Create New Database
- Global Database Name: orcl
- SID: orcl
- Use *no* Database Features (why pollute the schema?)
- Run in Dedicated Server mode (because connection pools will make this possible).
- Memory: used defaults (probably too small)
- Character Sets: AL32UTF8
- DB Sizing: default
- File Locations: default
- Archive: default
Saved database creation scripts in /opt/oracle/admin/orcl/scripts/generate_db ran them manually rather than using the stinking gui! Although it looks like oracle was not available, so will try again later.
Directory Configuration...
- Directory Type: Oracle Internet Directory
- Directory Service Hostname: demo
- Directory Service Port: 389
- Directory Service SSL Port: 636
From the end of the installation...
/opt/oracle/920/Apache/Apache/setupinfo.txt
http://demo:7777 http://demo:7778 https://demo:4443
Trying again:
- Database name db1
- SID db1
db creation scripts /opt/oracle/admin/db1/scripts
/opt/oracle/admin/db1/pfile/init.ora must likely be linked to /opt/oracle/920/dbs/initdb1.ora
Yes!
change ~oracle/.bash_profile:
ORACLE_SID=db1
* * * NOTE * * * Looks like you can safely re-upgrade the compat library after installing oracle and oracle will still work; hopefully whatever was required or compiled was done statically.
Here is the start/stop script I put in /etc/rc.d/init.d/oracle:
#!/bin/bash # # oracle This shell script takes care of starting and stopping # Oracle databases and the tnslistener. # # chkconfig: - 64 36 # description: Oracle and tnslistener # processname: ora_*, tnslsnr # config: /etc/oratab # Source oracle config . /home/oracle/.bash_profile case "$1" in start) echo "Starting Oracle database(s) listed in /etc/oratab..." sleep 2 su - oracle -c "$ORACLE_HOME/bin/dbstart" echo "Starting TNS listener..." sleep 2 su - oracle -c "$ORACLE_HOME/bin/lsnrctl start" touch /var/lock/subsys/dbora ;; stop) echo "Stopping TNS listener..." sleep 2 su - oracle -c "$ORACLE_HOME/bin/lsnrctl stop" echo "Stopping Oracle database(s) listed in /etc/oratab..." sleep 2 su - oracle -c "$ORACLE_HOME/bin/dbshut" rm -f /var/lock/subsys/dbora ;; status) ps -ax | grep -e ora_ -e tnslsnr ;; *) echo "Usage: oracle {start|stop|status}" exit 1 esac exit 0
Here is my (so far failed) attempt at limiting requests to particular hosts.
File: /opt/oracle/920/network/admin/sqlnet.ora:
tcp.validnode_checking=yes tcp.invited_nodes=(127.0.0.1, 66.135.32.165)
Will now try to install Oracle Advanced Security; was it needed? Probably good to have.
Make oracle user not log-onable from outside:
[root@demo ssh]# ls moduli ssh_host_dsa_key ssh_host_key.pub ssh_config ssh_host_dsa_key.pub ssh_host_rsa_key sshd_config ssh_host_key ssh_host_rsa_key.pub [root@demo ssh]# vi sshd_config
add this line to the very end of sshd_config:
DenyUsers oracle
Now restart sshd:
[root@demo ssh]# /etc/rc.d/init.d/sshd restart Stopping sshd: [ OK ] Starting sshd: [ OK ] [root@demo ssh]#