|
ORACLE 8.1.7.0.1 install for Linux
Oracle 8.1.7.0.1 for RedHat Linux 6.2
These are my notes (jkl@ccl.net, Jan Labanowski) on installing
Oracle 8.1.7.0.1 for Linux on Pentium III computer with 256MB of memory,
with 2 256M swap partitions (SwapTotal: 385440 kB as given by:
cat /proc/meminfo).
I am using RH Linux 6.3 with current updates (as of Feb 15, 2001)
I am using GNOME as my desktop environment in X-windows.
Disclaimer: All below is a nonsence. If you want to learn the truth, hire
a competent lawyer. They will tell you what is right for a fee.
Installing RH6.2 Linux
Booted from the CD Nr. 1 in the Linux 6.2 distribution (CD Version: 10539-1)
and hit Enter. Since I also have a Adaptex SCSI controller on board, it loaded
driver aic7xxx. Then showed the the GUI.
I chose English, Generic 101PC Keyboard Model with US ENglisg/ISO 9995-3
layout., enabled dead keys, and 3 button PS/2 mouse.
My partitions were done before, on previous install with fdisk:
Device Boot Start End Blocks Id System Mount Point
/dev/hda1 * 1 1023 8217216 c Win95 FAT32 (LBA) /win
/dev/hda2 1024 1040 136552+ 83 Linux /boot
/dev/hda3 1041 1171 1052257+ 83 Linux /ftp
/dev/hda4 1172 3720 20474842+ 5 Extended
/dev/hda5 1172 1204 265041 82 Linux swap swap
/dev/hda6 1205 1237 265041 82 Linux swap swap
/dev/hda7 1238 3720 19944666 83 Linux /
So I did not bother them, but just assigned /boot, /ftp, and / to them
on the page by clicking on Edit after highlighting a partition.
Then chose Time zone, Root password (did not create any users at this time).
CHose no MD5 pass, but enabled shadow passwords. The packages I chose were:
* Printer Support * Samba server
* X Window * Anon FTP
* Gnome * Web Server
* KDE * SQL Server/Postgress
* Mail/WWW/News Tools * Network Management Workstation
* Dos/Windows connectivity * Authoring/Publishing
* Graphic Manipulations * Emacs
* Multimedia Support * Development
* Networked Workstation * Kernel development
* Dial up Workstation * Utilities.
* NFS Connectivity
My monitor is Cornerstone c1025. It is not on the list, so I took
default "DDC Probed Montor/CRN0018, and entered: 30-95 kHz as horizontal
scan, and 50-160 Hz as vertical sync (from the monitor manual book).
I have ATI XPERT 98 PCI with 8Megs, so I clicked on ATI Xpert 98,
8192k, [Test this configuration], checked [Customize X Config].
I said Yes on the next test screen asking me if I can see the question.
In Customize X screen I chose 1280x1024 16 bits as my resolution settings.
It installed all packages, but froze on me when creating boot diskette.
I rebooted the machine from CD, but chose UPGRADE (not the INSTALL) on the
screen which asked for type of installation.
Clicked on Next, which got me to Installing 118 Packages.
Then, it created the Boot Diskette. Then I removed CD and Diskette and
computer rebooted. It went through fsck to repair the disk left with
bad inodes after it froze during install.
When I logged in, and did startx the X was at wrong resolution and
wrong sync. I used Xconfigurator to fix it. It never wanted to
ask me for the amount of memory on the video card, so I had to do [Back]
several times at the X Configuration screen to get to the appropriate screen.
Getting Oracle and Docs
First, I went to the Oracle OTN site: http://otn.oracle.com/.
You need to register, if you did not already do so. Register by clicking
on "Membership" on the top bar on OTN home page.
Then from the OTN home page: http://otn.oracle.com/ I clicked on:
"Top Downloads" and Oracle8i Database on the top of right column.
It lead me to: http://otn.oracle.com/software/products/oracle8i/software_index.htm.
From here I clicked on Oracle 8i Downloads, Release 3, Version 8.1.7
"Oracle8i Enterprise Edition Release 3 (8.1.7.0.1) for Linux (Intel), with OPS"
I had to sign up, etc, and finally downloaded over 500MBytes tar file.
I also downloaded Installation and Release Notes as PDF files.
Then I went to documentation site http://otn.oracle.com/docs/index.htm
and kept downloading PDF files until I filled up my disk {:-)}.
I then burned a CD with all this stuff for my personal use (it would be
a crime to give it to someone!!!), so I have an easy way to keep
reinstalling and trying, and erasing, and trying again. {:-(}.
Beside the "official" Installation Manual from Oracle, I also looked for
the docs on the web, and found:
http://jordan.fortwayne.com/oracle/817.html (my local copy is here)
which I am following closely here (great page), and
http://www.zx81.org.uk/computing/oracle/oracle-howto/oracle-howto.html
(my local copy is here) which is slightly out of date by full
of great ideas and prescriptions when you actually want to use Oracle.
Getting some upgrades for Red Hat Linux 6.2
First, I installed a utility called wget. It allows retrieving files
from Web and Anon FTP easily on a command line. I got it from the original
RH6.2 CD Number 1. Somehow, it was not installed as default:
a) Put your RH CD1 in the drive
b) wait until it is mounted itself [DO NOT RUN AUTORUN!!!]
c) check iif it is mounted (df -k will list /mnt/cdrom).
d) If did not mount bu itself, do mount /mnt/cdrom
Then install it:
rpm -Uhv /mnt/cdrom/RedHat/RPMS/wget-1.5.3-6.i386.rpm
I went to ftp.rpmfind.net late at night (whey US sleeps, and Europe did not
wake up yet ) and retrieved the updates:
ftp ftp.rpmfind.net
Name: anonymous
Password: quest
cd linux/redhat/updates/6.2
binary
prompt
!mkdir i386
lcd i386
cd i386
mget *
!mkdir ../i586
lcd ../i586
cd ../i586
mget *
!mkdir ../i586
lcd ../i586
cd ../i586
mget *
!mkdir ../i686
lcd ../i686
cd ../i686
mget *
!mkdir ../i686
lcd ../i686
cd ../i686
mget *
!mkdir ../SRPMS
lcd ../SPRMS
cd ../SRPMS
get kernel-2.2.17-14.src.rpm
To tell you the truth, I burned a CD with this stuff, since I have 6 PCs
to update. And it is so much easier than copying and downloading
several times the same thing. You can get the updates from the RedHat itself,
ftp://updates.redhat.com but this site is usuall overbooked. So go to
the list of mirrors http://www.redhat.com/download/mirror.html and pick
up the one which is not under siege.
The first update I made was to update the updating package, i.e., RPM.
In my case, as you remember, I have it on the CD.
cd /mnt/cdrom/6.2/i386
rpm -Uhv rpm*
I also needed badly the ssh. And to compile ssh, I needed openssl.
While there is a newer openssl out there, I took the older one from
the Red Hat updates RPM, so it is known as a RPM package to the system,
since other RPMs are dependent on it. I also installed pam, since ssh needs it.
cd /mnt/cdrom/6.2/i386
rpm -Uhv openssl*
rpm -Uhv pam*
Now, I took the OpenSsh
cd /root/updates
wget ftp://ftp.eecs.umich.edu/pub/OpenBSD/OpenSSH/portable/openssh-2.3.0p1.tar.gz
tar zxvf openssh-2.3.0p1.tar.gz
cd openssh-2.3.0p1
Looked at INSTALL file and did
./configure
make
make install
PATH=${PATH}://usr/local/bin
export PATH
Updating packages
Before updating kernel, I installed all updates but kernel itself.
Updating other packages
Note that it is assumed that openssl and pam are already installed as
described above.
cd /mnt/cdrom/6.2/i386
rpm -Uhv SysVinit*
rpm -Uhv apache-*
rpm -Uhv bash*
rpm -Uhv ed*
rpm -Uhv emacs*
rpm -Uhv esound*
rpm -Uhv fetchmail*
rpm -Uhv gdm*
rpm -Uhv ghostscript*
rpm -Uhv glibc*
rpm -Uhv gnorpm*
rpm -Uhv gnu*
rpm -Uhv gpm*
rpm -Uhv imap*
rpm -Uhv inetd*
rpm -Uhv iputils*
rpm -Uhv joe*
rpm -Uhv krb*
rpm -Uhv libtiff*
rpm -Uhv lpr*
rpm -Uhv mailx*
rpm -Uhv man*
rpm -Uhv mgetty*
rpm -Uhv mod_perl*
rpm -Uhv modutils*
rpm -Uhv mutt*
rpm -Uhv ncurses*
rpm -Uhv netscape*
rpm -Uhv nfs-utils*
rpm -Uhv nscd*
rpm -Uhv openldap* nss_ldap*
rpm -Uhv perl*
rpm -Uhv php*
rpm -Uhv pine*
rpm -Uhv popt*
rpm -Uhv python*
rpm -Uhv rmt*
rpm -Uhv samba*
rpm -Uhv slocate*
rpm -Uhv sysklogd*
rpm -Uhv tcsh*
rpm -Uhv textutils*
rpm -Uhv tmpwatch*
rpm -Uhv traceroute*
rpm -Uhv transfig*
rpm -Uhv umb-scheme*
rpm -Uhv wu-ftpd*
rpm -Uhv xchat*
rpm -Uhv xpdf*
rpm -Uhv up2date* usermode* ../noarch/*.rpm
Then, I rebooted the machine.
Updating the kernel for Red Hat Linux 6.2
The updates contained also a newer kernel (the kernel which I originally
installed was: 2.2.14-5.0. You can check your kernel version with
uname -a
The latest Red Hat kernel update is 2.2.17-14. The latest kernel 2.2.X
on the http://www.kernel.org/pub/linux/kernel/v2.2/ site is
2.2.18. I decided to go with the 2.2.18 upgrade from
http://www.us.kernel.org/pub/linux/kernel/v2.2/linux-2.2.18.tar.gz
I first saved the sources, binaries, and config files of the 2.2.14-5.0 kernel
just in case.
Before you start upgrading the kernel, you should
read the piece "Upgrading the Linux Kernel on Red Hat Linux Systems"
which is available from:
http://www.redhat.com/support/docs/howto/kernel-upgrade/kernel-upgrade.html.
This were my actions:
Save/Backup whatever you can...
cd /usr/src
# remove link to linux-2.2.14
rm linux
# make a copy of /boot dir
mkdir /boot-old
cd /boot
tar cvf - . | ( cd /boot-old; tar xvf - )
mkdir /etc-old
cd /etc
tar cvf - . | ( cd /etc-old; tar xvf - )
Make boot-up/rescue disk
First check what is your current kernel and enter its version for mkbootdisk
uname -r
fdformat /dev/fd0H1440
mkbootdisk --device /dev/fd0H1440 2.2.14-5.0
I rebooted the computer with a dikette in the drive to see that disk really
works.
Saving old configuration
I was running X.
To make sure that my option for the working kernel will be passed over
to the new build, I saved the old kernel options:
cd /usr/src/linux-2.2.14
make xconfig
# pushed Store Configuration to File
# /root/config-2.2.14-5.0
# pushed Quit Without Saving
I also copied a file from configs directory:
cp /usr/src/linux-2.2.14/configs/kernel-2.2.14-i686.config /root
Quite frankly, I am not sure which one corresponds to the config of the
Kernel which came with the distribution. The differences between them
are quite minor:
diff config-2.2.14-5.0 kernel-2.2.14-i686.config
13c13
< CONFIG_M386=y
---
> # CONFIG_M386 is not set
18,21c18,27
< # CONFIG_M686FX is not set
< # CONFIG_X86_PN_OFF is not set
< # CONFIG_X86_FX is not set
< # CONFIG_X86_CPU_OPTIMIZATIONS is not set
---
> CONFIG_M686FX=y
> CONFIG_X86_WP_WORKS_OK=y
> CONFIG_X86_INVLPG=y
> CONFIG_X86_BSWAP=y
> CONFIG_X86_POPAD_OK=y
> CONFIG_X86_TSC=y
> CONFIG_X86_GOOD_APIC=y
> CONFIG_X86_PN_OFF=y
> CONFIG_X86_FX=y
> CONFIG_X86_CPU_OPTIMIZATIONS=y
38c44
< # CONFIG_BIGMEM is not set
---
> CONFIG_BIGMEM=y
83,86d88
Upgrading Linux kernel
I retrieved new kernel to /usr/src directory from the
standard www.country.kernel.org site, in my case www.us.kernel.org.
The latest was: 2.2.18:
cd /usr/src
wget http://www.us.kernel.org/pub/linux/kernel/v2.2/linux-2.2.18.tar.bz2
Then I unpacked it as (make sure that linux link is deleted from /usr/src):
cd /usr/src
tar Ixvf linux-2.2.18.tar.bz2
mv linux linux-2.2.18
ln -s linux-2.2.18 linux
While obviously, this is the virgin source, I still go by the book:
cd /usr/src/linux
make mrproper
make xconfig
The last one brought a GUI. I clicked first on the
[Load Configuration from File] and entered /root/kernel-2.2.14-i686.config
as a file.
In another terminal window I did:
diff /usr/src/linux/arch/i386/defconfig \
/root/kernel-2.2.14-i686.config | more
To see what are the differences between default settings of the virgin kernel
and the RedHat settings.
Then I went through the options to see what they say and change some.
I first clicked at the upper leftmost button [Code Mature] and than
at [Next] button of each table. I made changes indicated with the
***********. You probably should leave the original defaults, if you are
using different hardware (namely motherboard) than I do. I use: ASUS P3V133.
It has the VIA VT82C596B PCI to ISA bridge and also all this USB stuff which I
do not use.
Code Maturity
Prompt for development: Y
Processor type
PPro Processor Family
/dev/cpu/microcode - Intel P6 CPU microcode: M
/dev/cpu/*/msr - Model specific register support: N
/dev/cpu/*/cpuid -- CPU info support: N
1GB Max Physical Memory
Math Emulation: Y
MTRR: Y
Symmetric Multiprocessing: N
Loadable Module Support
Enable loadable: Y
Set version info on all symbols: Y
Kernel module loader: Y
General Setup:
Networking: Y
PCI support: Y
[Any] PCI Access Mode: ANY
PCI quirks: Y
PCI bridge optimization: N
Backward compatible /proc/pci: Y
MCA Support: N
SGI SUpport: N
System V IPC: Y
BSD Process Accounting: Y
Sysctl: Y
Kernel support for a.out: M
Kernel support for ELF: Y
Kernel support for Misc: Y
Kernel support for Java Binaries: M
Parallel port Support: M
PC-style hardware: M
Support for Foreign hardware: N
Advvanced Power Management BIOS support: Y
Ignore USER SUSPEND: N
Enable PM at boot time: N
Make CPU Idle calls when idle: N
Enable console blanking using APM: N
RTC stores time in GMT: Y
Allow interrupts during APM BIOS calls: N
Use real mode APM Bios call to power off: N
Toshiba Laptop Support: N
Plug and Play support
Plug and Play support: Y
Auto-probe for Paralle devices: M
Block Devices
Floppy: Y
Enhanced IDE: Y
Use old disk: N
Include IDE/ATA-2: Y
Include IDE/ATAPI CDROM: Y
Include IDE/ATAPI Tape: M
Include IDE/ATAPI Floppy: M
Include SCSI emulation: M
CMD640 chipset: Y
CMD640 enhanced support: N
RZ1000 chipset: Y
Generic PCI IDE: Y
Generic PCI bus-master: Y
Generic PSI bus-master DMA support: Y
Boot off-board chipsets first support: N
Use DMA by default when available: Y **********
OPTi82C621 chipset: N
ALI15X3 chipset: N
Tekram TRM290 chipset: N
NS87415 chipset: N
VIA82 C586 chipset: Y **********
CMD646 chipset: Y
Cyrix CS5530 MediaGX chipset: N
Other IDE chipset: N
Additional Block Devices: M
Network block device: M
Myltiple device driver support: Y
Linear mode: M
RAID-0: M
RAID-1: M
RAID-4/5: M
RAM disk support: Y
Default RAM disk size: 4096
XT hard disk support: N ************
Mylex DAC960: M
Parallel port IDE support: M
Parallel IDE high level drivers
Parallel port IDE disk: M
Parallel port ATAPI CD-ROMS: M
Parallel port ATAPI disks: M
Parallel port ATAPI tapes: M
Parallel port generic ATAPI devices: M
Prallel IDE protocol modules
ATEN EH-100: M
MicroSolutions: M
Data Store Commuter: M
FIT TF-2000: M
FIT TF-3000: M
Shuttle EPAT/EPEZ: M
Shuttle EPIA: M
Freecom IQ ASIC-2: M
Freecom powewr: M
King Byte: M
KT PHd: M
OnSpec 90c20: M
OnSpec 90c26: M
Compaq SMART2: M
Compaq CISS Array: N
Networking options:
Packet socket: Y
Kernel/User netling: Y
Routing messages: Y
Netlink device emulation: Y
Network firewals: Y
Socket Filtering: Y
Unix domain sockets: Y
TCP/IP Networking: Y
IP multicasting: Y
Advanced router: N
...
IP:kernel: N
...
IP:firewalling: Y
IP:firewall packed netling: Y
IP:transparent proxy: Y
IP:masquerading: Y
Protocol-specific masquerading as modules
IP:ICMP masquerading: Y
Protocol-specifc masquerading support
IP:masq special: Y
IP:ipautofw: M
IP:ipportwf: M
IP:ip fwmark mask: M
IP:optimize: N
IP:tunnel: M
IP:GRE: M
IP: multicast routing: N
...
IP:aliasing: Y
IP:ARP: N
IP: TCP syncookie support: Y
IP: Reverse ARP: M
IP: Allo large window: M
The IPv6: N
........
The IPX: M
IPX full internal IPX net: N
IPX SPX network: N
Appletalk DDP: M
CCITT X.25: N
LAPB: N
Bridging: N
Frame diverter: N
802.2 LLC: N
Acorn: N
...
WAN router: M
Forwarding between high speed interfaces: N
CPU is too slow to handle full bandwith: N
QoS:
None checked
Telephony Support:
Linux telephony support: M
QuickNet Internet: M
SCSI Support
SCSI Support: Y
SCSI disk support: Y
SCSI tape support: M
SCSI CD-ROM support: Y
Enable vendor specific extensions: Y
SCSI Generic Support: M
Proble all LUNs on each SCSI device : Y
Verbose SCSI Error: Y
SCSI loggin: Y
SCSI low-level drivers:
3ware Hardware: N
7000FASST: M
ACARD SCSI: M
Adaptec AHA152X: M
Adaptec AHA1542: M
Adaptec AHA1740: M
Adaptec Raid: M
Adaptec AIC7xxx: M
Enable Tagged Command: N
Max number of TCQ: 8
Collect Stats to report in /proc: Y
Delay in seconds after SCSI reset: 5
IBM ServeRAID: M
Advansys Support: M
Advansys IN200: M
AMI: M
Buslogic: M
Omit FlashPoint: N
Compaq Fibre: N
DTC3180: M
EATA: M
enable tagged command queueing: Y
enable elevator sorting: N
16 Maximum number of queued commands
EATA-DMA: M
EATA-PIO: M
Future DOmain: M
GDT: M
Generic NCR5380: M
Enable NCR53c400 extensions: N
PORT: NCR5380/53c400 mapping
Initio 9100U: M
Initio INI: M
IOMEGA parallel ppa: M
IOMEGA parallel imm: M
ppa/imm option slow: N
ppa/imm option assume slow: N
NCR53c406a: M
symbios 53c416: M
Simple: 53c710: M
... and so on... Did not change anything.
I2O device support
I2O Support: N
Network device support:
Network device support: Y
ARCnet:
Dummy net driver: M
Bonding: M
EQL: M
Ethertap: M
General Instruments Surf: N
Ethernet (10 or 100MBit)
Ethernet (1000 Mbut)
FDDI driver: Y
Digital DEFEA: N
SysKonnect FDDI PCI: M
Hippi driver: N
Appletalk devices
PLIP: M
PPP: M
SLIP: M
CSLIP: Y
Keepalive: Y
Six bit SLIP: Y
Wireless LAN: Y
STRIP: M
ATT: M
Airnet: M
Token Ring
Fibre Channel: Y
Interphase: M
RedCreek: M
Traffic: M
WAN interfaces
SBNI12-xx: M
ARCnet devices
ARCnet support: N
Ethernet (10 and 100Mbit)
Ethernet: Y
3COM cards: Y
3c501: M
3c503: M
3c505: M
3c507: M
3c509/3c579: M
3c515 ISA: M
3c590/3c900: M
AMD LANCE: M
Wester DIgital/SMC cards: Y
WD80*3 support: M
SMC Ultra: M
SMC Ultra32: M
SMC 9194: M
RacalInterlan: Y
NI6010: M
NI5210: M
NI6510: M
RealTek 8129: M
RealTek 8139: N
Other ISA: Y
ATI70/1720: M
Cabletron: M
... accepted all defaults
Ethernet (1000MBit)
Alteon: M
Packet Engines GNIC-II: N
Packet Engines Yellowfin: M
SysKonnect: M
Appletalk devices
Took defaults
Token Ring devices
Took defaults
Wan Interaces:
Took defaults
Amateur Radio Support:
Amateur Radio: N
IrDA support
Defaults
Infrared-port device drivers
Defaults
ISDN Subsystems
Defaults
ISDN Features
Defaults
...
Passive ISDN
Defaults
Active ISDN
Defaults
Old CDROM Drivers
Defaults
Character devices:
Defaults
Mice:
ATIXL busmouse: M
Logitech busmouse: M
Microsoft busmouse: M
PS2 Mouse: Y
C&T 82C710 mouser: M
PC1010 digitizer pad: M
Joystick:
Default
Video for Linux
Default
Ftape, Floppy tape device:
Default
Watchdog card:
Default
I2C Support
I2C Support: N
Hardware sensors support
none
USB Support
Support for USB: M
USB verbose: N
Miscelaneous USB Options
Preliminary USB device filesystem: N
Support for hot: N
Enforce: N
USB Controllers:
UHCI: M
UHCI Alternative: M
OHCI: M
USB Devices:
USB printer: M
USB Scanner: M
USB Modem : M
USB Serial Convertor: M
USB Generic Serial Driver: N
Filesystems
Quota support: Y
Kernet automounter: Y
AFFS: N
Amiga: N
Apple: N
DOS FAT: M
MSDOS fs support: M
UMSDOS Unix like: M
VFAT: M
ISO9660: Y
MS Joiliet: Y
Minix: N
NTFS: M
OS/2 HPFS: M
Network file systems:
Coda: N
NFS: Y
NFS Version 3 support: Y
NFS Server support: Y
NFS Server Ver3 support: Y
SMB: M
Use a default NLS: N
NCP: N
Partition types:
BSD: Y
Macintosh : Y
SMD: Y
Solaris: Y
Unixware: Y
Native language support:
Default: cp437
437: Y
737: M
775: M
850: M
852: M
855: N
860: N
861: N
862: N
863: N
864: N
865: N
866: M
869: M
874: N
932: N
936: N
949: N
950: N
8859-1: M
8859-2: M
8859-3: N
8859-4: N
8859-5: M
8859-6: N
8859-7: M
Console Drvers
VGA TEXT: Y
Video mode selection: Y
MDA: M
SUpport for frame buffer: Y
Permedia2: M
ATI MAch64: M
VESA VGA: N
VGA 16: N
Matrox acceleration: M
Millenium: Y
Mistique: Y
G100/G200: Y
Multihead: Y
Sound
SOund card Support: M
Support for C-Media: M
Enable legacy FM
Enable legacy MPU-401
Crystal SoundFusion: M
Creative SBLive: M
Ensonic AudioPCI: M
Creative Ensonic AudioPCI 97: M
ESS Mastro: M
ESS Maesto3: M
Rest took defaults
Additional low level sound:
Additional low lever sound drivers: Y
Took defaults
Kernel hacking
Magic SysRq Key: Y
Then, at the end I clicked on:
Main Menu,
Store Configuration File: /root/kernel_config_1
Save and Exit
Then, in the xterm window I ran:
make dep
Then I made the following changes in header files, as suggested on the
page 2-2 of Oracle Installation Guide:
cd /usr/src/linux/include/asm
cp -p shmparam.h shmparam.h-orig
and edited shmparam.h (the 0x8000000 is half of my memory in hex):
#define SHMMAX 0x2000000 --> #define SHMMAX 0x8000000
(I have 256Megs, i.e. 0x10000000 of it and 0x8000000 is half)
#define SHMMNI (1<<_SHM_ID_BITS) --> #define SHMMNI 100
#define SHMSEG SHMMNI --> #define SHMSEG 10
and then
cd /usr/src/linux/include/linux
cp -p sem.h sem.h-orig
and edited sem.h:
#define SEMOPM 32 --> #define SEMOPM 100
then edited the Makefile in /usr/src/linux and changed:
EXTRAVERSION = --> EXTRAVERSION = -01
Now I was ready to build kernel and modules:
cd /usr/src/linux
make bzImage
make modules
make modules_install
After doing this the directory /lib/modules/2.2.18-01 was created, as well
as new kernel and System.map. I installed the files in /boot partition and
made a RAM disk:
cd /boot
rm vmlinuz
cp /usr/src/linux/arch/i386/boot/bzImage vmlinuz-2.2.18-01
ln -s vmlinuz-2.2.18-01 vmlinuz
rm System.map
cp /usr/src/linux/System.map System.map-2.2.18-01
ln -s System.map-2.2.18-01 System.map
mkinitrd /boot/initrd-2.2.18-01.img 2.2.18-01
Now is time to fix lilo. I first edited /etc/lilo.conf to be:
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
linear
default=linux
image=/boot/vmlinuz-2.2.18-01
label=test
initrd=/boot/initrd-2.2.18-01.img
read-only
root=/dev/hda7
image=/boot/vmlinuz-2.2.14-5.0
label=linux
initrd=/boot/initrd-2.2.14-5.0.img
read-only
root=/dev/hda7
other=/dev/hda1
label=dos
It will load new kernel when you type test after boot: prompt.
Then I ran lilo to put these changes on hard drive.
lilo -v
This generated the following output:
# lilo -v
LILO version 21, Copyright 1992-1998 Werner Almesberger
Reading boot sector from /dev/hda
Merging with /boot/boot.b
Boot image: /boot/vmlinuz-2.2.18-01
Mapping RAM disk /boot/initrd-2.2.18-01.img
Added test
Boot image: /boot/vmlinuz-2.2.14-5.0
Mapping RAM disk /boot/initrd-2.2.14-5.0.img
Added linux *
Boot other: /dev/hda1, loader /boot/chain.b
Added dos
/boot/boot.0300 exists - no backup copy made.
Writing boot sector.
Then I created a boot rescue diskette with a new kernel:
cd /boot
fdformat /dev/fd0H1440
mkbootdisk --device /dev/fd0 2.2.18-01
Then I silently prayed and rebooted the machines.
During kernel recompilation I was greatly helped by the
Kernel-HOWTO by Brian Ward
ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/other-formats/html_single/Kernel-HOWTO.html
(my local copy is here). I also used:
http://www.redhat.com/support/manuals/RHL-7-Manual/ref-guide/s1-sysadmin-build-kernel.html
and Jason Costomiris note on RedHat discussion list:
http://www.linuxarkivet.nu/mlists/redhat-list/0009/msg02713.html (local copy is here).
Oracle Installation
Then I prepared for Oracle install.
Installing JDK1.1.8
Installed Java JDK1.1.8v3 for Linux from Blackdown taken from:
(you may want to right click on these links if you do not have bz2 MIME type set)
ftp://metalab.unc.edu/pub/linux/devel/lang/java/blackdown.org/JDK-1.1.8/i386/v3/jdk118_v3-glibc-2.1.3.tar.bz2.
Local copy is here.
I placed it in /tmp, and then unpacked it as:
cd /tmp
tar Ixvf jdk118_v3-glibc-2.1.3.tar.bz2
mv jdk118_v3 /usr/local
cd /usr/local
ln -s jdk118_v3 java
Creating accounts and groups for Oracle
Then I created needed users and groups
groupadd oinstall
groupadd dba
groupadd oper
useradd oracle -g oinstall -G dba,oper
passwd oracle
Removing traces of previous failed installs of Oracle
Since I had oracle installed before, I deleted all traces of it
namely:
rm -rf /u01
rm /etc/oratab
rm /etc/oraInst.loc
Note, if you have a running/needed/usefull installation of Oracle
on your system DO NOT DO THAT!!! Use Oracle GUI to do uninstall (the
same which you used to install -- it is described below).
Directories and Environment Varialbles
Created directory for Oracle Install:
mkdir /u01
chown oracle.dba /u01
Then I untarred my Oracle from my CD. You need to carefully examine
what I was doing here. I compressed linux81701.tar with gzip before putting
it on CD (it was actially an unnecessary thing, since most stuff on CD comes
compressed as jar files (i.e., zip) and gzipping the original Oracle tar does
not really save any space. Also, the top directory of original tar
is not is not the same as in my tar. You just need to do what needs to be
don to have the ORACLE_BASE=/u01/app/oracle by moving directories around.
cd /usr/src
mkdir -p oracle-dist/oracle-dist/8.1.7.0.1
cd oracle-dist/oracle-dist/8.1.7.0.1
# tar xvf /mnt/cdrom/linux81701.tar
tar zxvf /mnt/cdrom/linux81701.tar.gz
# cd /usr/src
# mv oracle-dist oracle-dist1
# cd oracle-dist1
# mv oracle-dist ..
# cd ..
# rmdir oracle-dist1
Then exited X-window desktop, logged out as root, logged in as oracle
and started X-window desktop (startx). I added the following to the
.bash_profile in /home/oracle (home) directory:
PATH=${PATH}:${HOME}/bin
BASH_ENV=${HOME}/.bashrc
USERNAME="oracle"
export USERNAME BASH_ENV PATH
JAVA_HOME=/usr/local/java
export JAVA_HOME
ORACLE_BASE=/u01/app/oracle
export ORACLE_BASE
ORACLE_HOME=${ORACLE_BASE}/product/8.1.7.0.1
export ORACLE_HOME
ORACLE_SID=linux817
export ORACLE_SID
PATH=${PATH}:${ORACLE_HOME}/bin:${JAVA_HOME}:/bin
export PATH
if [ "${LD_LIBRARY_PATH:-}" == "" ]; then
LD_LIBRARY_PATH=${ORACLE_HOME}/lib:/usr/lib:/usr/local/lib
else
LD_LIBRARY_PATH=${ORACLE_HOME}/lib:${LD_LIBRARY_PATH}
fi
export LD_LIBRARY_PATH
CLASSPATH=${JAVA_HOME}/lib/classes.zip
export CLASSPATH
You can find a copy of my .bash_profile here. Note that people usually use ORCL as ORACLE_SID.
In my case it is: ORACLE_SID=linux817
After changing the file you have to do:
. .bash_profile
to actually set your environment variables, or log out and then
log in again as user oracle.
Running Oracle Installer
Then I started Oracle install (as user oracle);
cd /usr/src/oracle-dist/8.1.7.0.1/Disk1
./runInstaller
The window appeared:
Welcome
with bunch of options.
I clicked on [Next]
File Locations
Accepted the defaults on next window (Source and Destination Paths) since
they came from myself (current directory and ORACLE_HOME environment
variable) by clicking [Next].
Unix Group Name
Unix Group Name: oinstall
Clicked [Next] and it asked me to execute a script:
/u01/app/oracle/product/8.1.7.0.1/orainstRoot.sh
First, I checked the script for bugs... It looked fine to me.
I opened the xterm and
su -
and as a root
cd /u01/app/oracle/product/8.1.7.0.1
./orainstRoot.sh
It told me:
Creating Oracle Inventory pointer file (/etc/oraInst.loc)
Changing groupname of /u01/app/oracle/oraInventory to oinstall.
I did not close the xterm since I will need it later on.
Then I clicked in the pop off window the [Retry] button.
It then came with available product information window:
Available Products
I selected Oracle8i Enterprise Edition 8.1.7.0.1 and clicked [Next]
Installation Types [][]
I clicked on Custom and Next. My goal is to install EVERYTHING, since
otherwise, I will run into "not found" sooner than later.
Then it came with a menu to choose products:
There are checks in white boxes, which means everything will be installed,
and checks in gray boxes, which means: selected things will be installed.
I was installing everything but Oracle Parallel Server, so I went and
made sure everything is installed. I use -/+ to mark the unfolded/folded view,
and V for install all, |V| for partially install, and _ for "do not install".
You can check the "Show all components and dependences" to see all of them
or click on the fold/unfold icon |+> when needed.
- |V| Oracle Enterprise Edition 8.1.7.0.1
V Oracle8I Server 8.1.7.0.0
+ V Apache HTTP Server 1.3.12.0.1a
- |V| Oracle Product Options 8.1.7.0.0
V Oracle Time Series 8.1.7.0.0
V Oracle Spatial 8.1.7.0.0
_ Oracle Parallel Server 8.1.7.0.1
V Oracle Advanced Security 8.1.7.0.0
V Oracle Intermedia 8.1.7.0.0.
V Advanced Replication 8.1.7.0.0.
V Oracle Partitioning 8.1.7.0.0.
- V Net8 Products 8.1.7.0.0
V Net8 Client 8.1.7.0.0
V Net8 Server 8.1.7.0.0
V Net8 Names 8.1.7.0.0
V Net8 Connection Manager 8.1.7.0.0
V Oracle Protocol Support 8.1.7.0.0
+ V Oracle Utilities 8.1.7.0.0
- V Oracle Java Products 8.1.7.0.0
+ V Oracle JDBC Drivers 8.1.7.0.0
V Oracle SQLQ 8.1.7.0.0
V Oracle Java Tools 8.1.7.0.0
- |V| Oracle Enterprise Manager Products 8.1.7.0.0
V Oracle Intelligent Agent 8.1.7.0.0
+ V Oracle Agent Extensions 8.1.7.0.0
V Oracle Management Server 2.2.0.0.0
- |V| Oracle Enterprise Manager Client
- V Oracle DBA Management Pack 2.2.0.0.0
V Oracle Schema manager 2.2.0.0.0
V Oracle Storage manager 2.2.0.0.0
V Oracle Security manager 2.2.0.0.0
V Oracle Instance manager 2.2.0.0.0
V Oracle Schema manager 2.2.0.0.0
V Oracle Schema manager 2.2.0.0.0
V SQL*Plus Worksheet 2.2.0.0.0
V Oracle DBA Studio 2.2.0.0.0
- |V| Oracle Enterprise Manager Events 2.2.0.0.0
V Oracle Diagnostic Pack Advanced Events 2.2.0.0.0
_ Oracle Management Pack for SAP R/3 Advanced Events
V Oracle Management Pack for Oracle Applications Adv
+ V Oracle Enterprise Manager Web Site 2.2.0.0.0
V Oracle Enterprise Manager Quick Tours 2.2.0.0.0
+ V Oracle Configuration Assistants 8.1.7.0.0
+ V Development Tools 8.1.7.0.0
- V Oracle Installation Products
V Oracle Universal Installer 1.7.1.8.0
V Oracle8i for UNIX docymentation 8.1.7.0.0
Then I clicked Next
Component Locations
It asked me where I want to install Oracle Universal Installer and
Java Runtime Environment. I accepted the /u01/app/oracle/oui and clicked
Next.
Provileged Operating System Groups
I accepted
Database Administrator (OSDBA) Group: dba
Database Operator (OSOPER) Group: dba
and clicked Next.
Authentication Methods
It asked me which Advanced Security thing I want to support.
I chose kerberos and SecureID (Shift LeftClick), but frankly,
I do not intend to use any of them.
Click Next
Oracle Management Server Repository
Accepted default: The Management will be used with this Oracle
Management Server and clicked Next.
Choose JDK Home Directory
Since there is so much fuzz about Oracle not liking new JDKs,
I accepted /usr/local/java which was a link to jdk118_v3 as described above.
Create Database
Said Yes, and clicked Next.
Database Identification
For Global Database Name, I used the SID + '.' + my internet domain
Global Database Name: linux817.mymachine.mycompany.com
SID linux817
and clicked [Next]
Oracle Protocol Support
I accepted the default TCP/IP and clicked next
Summary
It displayed a bunch of products to be installed. Impressive.
It said I need 855Mbytes and that it will install 155 Products.
I clicked on [Install]
Install
A window was displaying which was reporting installation progress.
You can get a cup of coffee made now, since it takes time.
After about 30 minutes it popped off the small window asking
to run /u01/app/oracle/product/8.1.7.1./root.sh
as root.
I first opened the /u01/app/oracle/product/8.1.7.0.1/root.sh
in editor, since my previous experience was that this script has
errors.
The script was wrong... It is actually two scripts merged together.
At line 63 we have:
$ECHO "IMPORTANT NOTE: Please delete any log and trace files previously"
$ECHO " created by the Oracle Enterprise Manager Intelligent"
$ECHO " Agent. These files may be found in the directories"
$ECHO " you use for storing other Net8 log and trace files."
$ECHO " If such files exist, the OEM IA may not restart."
#!/usr/bin/sh
#
# $Header
# $Copyright
#
Then at line 102 we have
RMF=/bin/rm -f
which is obviously wrong since "/bin/rm -f" should be quoted.
and finally, at line 156 we have:
RUID=`/usr/bin/id|$AWK -F\( '{print $2}'|$AWK -F\) '{print $1}`
which should obviously be:
RUID=`/usr/bin/id|$AWK -F\( '{print $2}'|$AWK -F\) '{print $1}'`
I corrected the script and ran, but frankly, I am not sure I should
have had.
I opened the the xterm, logged as root and did:
su -
/u01/app/oracle/product/8.1.7.0.1/root.sh
It displayed:
IMPORTANT NOTE: Please delete any log and trace files previously
created by the Oracle Enterprise Manager Intelligent
Agent. These files may be found in the directories
you use for storing other Net8 log and trace files.
If such files exist, the OEM IA may not restart.
Running Oracle8 root.sh script...
\nThe following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/8.1.7.0.1
ORACLE_SID= linux817
Enter the full pathname of the local bin directory: [/usr/local/bin]:
I entered Enter. It told me:
Entry will be added to the /etc/oratab file 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.
Then I clicked OK button in the small window, and the installation
continued...
It displayed the new window:
Configuration Tools
and was popping new windows for individual components to configure:
Net8 Configuration Assistant: Welcome
I clicked NEXT
Directory Service Access
Asks if you want Directory Service Access. I said:
No, I want to defer it to another time, and, clicked Next.
Directory Access Type
Chose: Oracle Internet Directory and clicked Next
Listener Configuration
I chose:
Listener name: LISTENER
and clicked Next
Listener Protocols
I clicked NEXT, i.e., accepted the selected protocol TCP.
Listener Configuration -- Port Number
I accepted default 1521 port and clicked Next.
Conciguration More Listeners
I do not want more listeners, so I accepted No, and clicked Next
Configuration Done
I clicked Next
Naming Methods Configuration
I do not want to change naming methods, so I chose NO, and clicked Next.
Net8 Configuration Assistant Done
Clicked Finish. The small window disappeared, and I was back at
Configuration Tools
There were Java errors shown in the lower frame, but it said:
The exit code is 0
It then went to Oracle Database Configuration Assistant, then froze, and
all buttons became grey and dead. SO... I dully deleted the directories
which were created, and started afresh.
Database Creation Progress window (just showed progress).
v- Creating and starting Oracle instance
v- Copying database files
v- Initializing database
v- Database creation complete
Then it displayed the window:
Database creation completed.
Database Information:
global database name: jkl.mymachine.mycompany.com
database system identifier (SID): linux817
SYS account password: change_on_install
SYSTEM account password: manager
I clicked OK button.
Then it started the Apache web server and displayed:
End of Installation
clicked [Exit] (do not do Next Install, or you will waste your current
install).
Starting Oracle
I did
ps auwx | grep oracle > oracle_processes
I am including the list of processes here.
Then, it was time to test if the thing actually works.
cd $ORACLE_HOME/rdbms/admin
sqlplus
It did not...
Enter user-name: sys
Enter password:
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux Error: 2: No such file or directory
So I tried to start it:
svrmgrl
connect internal
startup
quit
But got:
[oracle@localhost 8.1.7.0.1]$ svrmgrl
Oracle Server Manager Release 3.1.7.0.0 - Production
Copyright (c) 1997, 1999, Oracle Corporation. All Rights Reserved.
Oracle8i Enterprise Edition Release 8.1.7.0.1 - Production
With the Partitioning option
JServer Release 8.1.7.0.1 - Production
SVRMGR> connect internal
Connected.
SVRMGR> startup
LRM-00109: could not open parameter file '/u01/app/oracle/product/8.1.7.0.1/dbs/initlinux81701.ora'
ORA-01078: failure in processing system parameters
SVRMGR>quit
Server Manager complete.
[oracle@localhost 8.1.7.0.1]$
So I looked for files *.ora starting from the top directory of Oracle:
cd /u01
find . -name '*.ora' -print
I got many answers but one was interesting:
./app/oracle/product/8.1.7.0.1/dbs/initlinux817.ora
So I linked the initlinux817.ora to initlinux81701.ora
cd /u01/app/oracle/product/8.1.7.0.1/dbs
ln -s /u01/app/oracle/admin/jkl/pfile/initlinux817.ora initlinux81701.ora
and started again:
svrmgrl
connect internal
startup
quit
Now, I ran ps again to see processes running. They are
here.
It then barked:
ORACLE instance started.
Total System Global Area 72704160 bytes
Fixed Size 73888 bytes
Variable Size 55681024 bytes
Database Buffers 16777216 bytes
Redo Buffers 172032 bytes
ORA-01102: cannot mount database in EXCLUSIVE mode
I rebooted the machine. Then logged in again as oracle.
Started x (startx) and typed:
[oracle@localhost oracle]$ svrmgrl
Oracle Server Manager Release 3.1.7.0.0 - Production
Copyright (c) 1997, 1999, Oracle Corporation. All Rights Reserved.
Oracle8i Enterprise Edition Release 8.1.7.0.1 - Production
With the Partitioning option JServer Release 8.1.7.0.1 - Production
SVRMGR> connect internal
Connected.
SVRMGR> startup
ORACLE instance started.
Total System Global Area 72704160 bytes
Fixed Size 73888 bytes
Variable Size 55681024 bytes
Database Buffers 16777216 bytes
Redo Buffers 172032 bytes
ORA-01990: error opening password
file '/u01/app/oracle/product/8.1.7.0.1/dbs/orapw'
SVRMGR> quit
So again, I decided to look for the file
cd /u01
find . -name 'orapw' -print
But it did not find it. So I went to /u01/app/oracle/product/8.1.7.0.1/dbs
and tried to find something like passwd file. There was the file orapwlinux817.
So I made a link
cd /u01/app/oracle/product/8.1.7.0.1/dbs
ln -s orapwlinux817 orapw
and then at SVRMGR> prompt I typed
SVRMGR> shutdown
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SVRMGR> quit
Server Manager complete.
I logged out as oracle, and then logged in as oracle, to see
is something is still running. Nothing was running after log out
(beside, or course, the login shell).
So I tried to start it again:
svrmgrl
connect internal
startup
quit
No errors showed up, so I was more optimistic.
Here is my conversation with oracle server manager
[oracle@localhost oracle]$ svrmgrl
Oracle Server Manager Release 3.1.7.0.0 - Production
Copyright (c) 1997, 1999, Oracle Corporation. All Rights Reserved.
Oracle8i Enterprise Edition Release 8.1.7.0.1 - Production
With the Partitioning option
JServer Release 8.1.7.0.1 - Production
SVRMGR> connect internal
Connected.
SVRMGR> startup
ORACLE instance started.
Total System Global Area 72704160 bytes
Fixed Size 73888 bytes
Variable Size 55681024 bytes
Database Buffers 16777216 bytes
Redo Buffers 172032 bytes
Database mounted.
Database opened.
SVRMGR> quit
Server Manager complete.
[oracle@localhost oracle]$
So I tried to log in:
sqlplus
It spew:
Worked for me this time. Here is what we talked about:
[oracle@localhost oracle]$ sqlplus
SQL*Plus: Release 8.1.7.0.0 - Production on Thu Feb 8 16:44:08 2001
(c) Copyright 2000 Oracle Corporation. All rights reserved.
Enter user-name: sys
Enter password: change_on_install
Connected to:
Oracle8i Enterprise Edition Release 8.1.7.0.1 - Production
With the Partitioning option
JServer Release 8.1.7.0.1 - Production
SQL> password
Changing password for SYS
Old password: change_on_install
New password: xxxxxxxx
Retype new password: xxxxxxxx
SQL> quit
So I decided to shut it down. This is what I did:
[oracle@localhost oracle]$ svrmgrl
Oracle Server Manager Release 3.1.7.0.0 - Production
Copyright (c) 1997, 1999, Oracle Corporation. All Rights Reserved.
Oracle8i Enterprise Edition Release 8.1.7.0.1 - Production
With the Partitioning option
JServer Release 8.1.7.0.1 - Production
SVRMGR> connect internal
Connected.
SVRMGR> shutdown
Database closed.
Database dismounted.
ORACLE instance shut down.
SVRMGR> quit
Server Manager complete.
[oracle@localhost oracle]$
I did another
ps auwx | grep oracle > oracle_processes
To see if it cleanly shut down. The output is here. It seems it did.
here:
What to do with Oracle once it is installed is another story.
Tunning Oracle
Checking permissions on directories and files
Logged in as user oracle and did the stuff suggested in the Oracle 8i
Installation Guide (Part Number: A86017-02) on page 4-3 and 4-4.
The permissions are mostly OK since the installer does a good job.
But I am just documenting/checking what they should set to:
ls -ld $ORACLE_HOME/bin
chmod 751 $ORACLE_HOME/bin
ls -ld $ORACLE_HOME/bin/oracle
chmod 6751 $ORACLE_HOME/bin/oracle
ls -ld $ORACLE_HOME/lib
chmod 755 $ORACLE_HOME/lib
ls -l $ORACLE_HOME/lib
chmod 644 $ORACLE_HOME/lib/*
ls -ld $ORACLE_HOME/rdbms/log
chmod 751 $ORACLE_HOME/rdbms/log
ls -ld $ORACLE_HOME/rdbms
chmod 751 $ORACLE_HOME/rdbms
find $ORACLE_HOME/rdbms -type f -exec chmod 644 {} \;
ls -ld $ORACLE_HOME/sqlplus
chmod 751 $ORACLE_HOME/sqlplus
find $ORACLE_HOME/sqlplus -type f -exec chmod 644 {} \;
ls -ld $ORACLE_HOME/network/trace
chmod 777 $ORACLE_HOME/network/trace
Starting Oracle on bootup automatically
I became a root...
File /etc/oratab lists all databases which are installed.
In my case it only had:
linux817:/u01/app/oracle/product/8.1.7.0.1:N
i.e., that there is a $ORACLE_SID linux817, and that $ORACLE_HOME for it
is /u01/app/oracle/product/8.1.7.0.1, and N which means do not start
it on boot up by dbstart script. But I want to start it on boot up, so
I changed the line to:
linux817:/u01/app/oracle/product/8.1.7.0.1:Y
I made a directory for oracle stdout/stderr logs
/u01/app/oracle/log
Then I created the file /etc/rc.d/init/dbora which . You can find it
here
Note that this script calls the dbstart and dbshut scripts provided in
$ORACLE_HOME/bin. The scripts are called with "su - oracle", i.e., the
.bashrc and .bash_profile scripts for user oracle are executed
like during normal login. That is why oracle's components will inherit
environment variables set in the login scripts.
Then I tested if it works:
cd /etc/rc.d/init.d
chmod 755 dbora
chkconfig --add dbora
chkconfig --list dbora
./dbora start
ps auwx | grep oracle
./dbora stop
ps auwx | grep oracle
and it pretended that it did.
Adding environment variables on log in to oracle account
After reading the Post Installation chapter (pages 4-*) in Oracle 8i
Installation Guide I am quite confused what one should put in the CLASSPATH.
They say to put stuff like $ORACLE_HOME/JRE/lib:$ORACLE_HOME/jlib:...
The problem is that this is probably wrong, since you should put something
like: $ORACLE_HOME/JRE/lib/rt.jar:$ORACLE_HOME/JRE/lib/i18n.jar...
since these directories do not contain classes but jar files.
The directory $ORACLE_HOME/jlib contains 16 jar files. Should I put all or
some? This is not an easy question since, for example, the directory
contains jars: jssl-1_1.jar and jssl-1_2.jar which are different versions
of the same package oracle.security.*... They probably refer to
JDK 1.1.X and 1.2.X, but who knows... I decided not to add jars
which I do not know what they do. I can always change CLASSPATH later
when I get ClassNotFound.
I did not use the /usr/local/bin/oraenv script since it is not working
correctly, and even if $ORACLE_HOME is correctly set, and ORAENV_ASK=NO
it still asks for ORACLE_HOME.
My final .bash_profile script is available here.
For Net8 I added a line in the /etc/services:
listener 1521/tcp #Net8 listener
Testing Oracle
Retrieving info from the test database wuth sqlplus
Oracle comes with the trial database, and a test user: scott (password: tiger).
This is what I did to check if I can run anything:
$ sqlplus scott/tiger
SQL*Plus: Release 8.1.7.0.0 - Production on Sat Mar 10 02:50:32 2001
(c) Copyright 2000 Oracle Corporation. All rights reserved.
Connected to:
Oracle8i Enterprise Edition Release 8.1.7.0.1 - Production
With the Partitioning option
JServer Release 8.1.7.0.1 - Production
SQL> select ENAME from EMP where SAL < 2000;
ENAME
----------
SMITH
ALLEN
WARD
MARTIN
TURNER
ADAMS
JAMES
MILLER
8 rows selected.
SQL> quit
Disconnected from Oracle8i Enterprise Edition Release 8.1.7.0.1 - Production
With the Partitioning option
JServer Release 8.1.7.0.1 - Production
$
Trying simple JDBC application with Oracle
I wrote a simple Java application, JDBCTest.java which retrieves the same
information as above, but it uses the JDBC driver. I saved it
as JDBCTest.java, and placed it in /tmp. I updated CLASSPATH
and added the entry for Oracle JDBC driver and current directory.
Then I compiled it and ran it:
cd /tmp
CLASSPATH=${CLASSPATH}:${ORACLE_HOME}/jdbc/lib/classes111_g.zip:.
export CLASSPATH
javac JDBCTest.java
ARG_DRIVER="oracle.jdbc.driver.OracleDriver"
ARG_DB_URL="jdbc:oracle:oci8:@"
ARG_USER="scott"
ARG_PASSWORD="tiger"
java JDBCTest $ARG_DRIVER $ARG_DB_URL $ARG_USER $ARG_PASSWORD
Which produced:
Arg[0]=oracle.jdbc.driver.OracleDriver
Arg[1]=jdbc:oracle:oci8:@
Arg[2]=scott
Arg[3]=tiger
Connected to jdbc:oracle:oci8:@ as user scott
Results of the query:
select ENAME from EMP where SAL < 2000
SMITH
ALLEN
WARD
MARTIN
TURNER
ADAMS
JAMES
MILLER
Database connection closed
The classes111.zip JDBC driver for JDK 1.1.X (1.1.8 in this case) which
came with the Oracle 8.1.7 was woring fine locally, since it was a JDBC-OCI
driver (i.e., one which accesses directly the binary C libraries of the
Oracle and contains native code and is not portable to other systems).
Obviously such JDBC drivers can only be used on the same machine
on which either Oracle server or Oracle client is running. I could not find
any Linux Intel JDBC-OCI drivers for JDK 1.2.*/1.3 on the Oracle Web Site.
Either they are not yet available or you need to use 3rd party drivers.
There is another type of JDBC driver for Oracle. It is called a JDBC-Thin
driver, and it is pure Java. You can get it from Oracle Technet page:
http://technet.oracle.com/software/tech/java/sqlj_jdbc/htdocs/ftp.htm.
There are actually two sets of Thin Drivers: for JDK1.1 and JDK1.2 under:
Oracle8i 8.1.7 JDBC Drivers for use with JDK 1.2.x
and
Oracle8i 8.1.7 JDBC Drivers for use with JDK 1.1.x
respectively.
To check if thing driver is working, I copied the JDBCTest.java
to another machine/account which did not have Oracle installed.
On this machine, and used JDK1.3 environment.
I copied the classes12.zip (the Oracle-Thin JDBC driver for JDK1.2) to
a directory /usr/local/oracle-jdbc and
set the CLASSPATH. Then compiled and tested JDBCTest.java.
JAVA_HOME=/usr/local/jdk1.3
export JAVA_HOME
PATH=${PATH}:${JAVA_HOME}/bin
export PATH
CLASSPATH=${JAVA_HOME}/lib/dt.jar:${JAVA_HOME}/lib/dt.tools
CLASSPATH=${CLASSPATH}:/usr/local/oracle-jdbc/classes12.zip
javac
ARG_DRIVER="oracle.jdbc.driver.OracleDriver"
bash-2.04$ ARG_DB_URL="jdbc:oracle:thin:@axanar.ccl.net:1521"
compiled JDBCTest.java with the JDK1.3 environment.
I placed the
which retrieves the same
information as above, but it uses the JDBC driver. I saved it
This was working find with . However, I had a problem to make it for remote login.
The
|