Before started found the following articles to lead the way
- Installing Oracle 11g on Ubuntu 8.04 LTS (Hardy Heron)
- Oracle 10g on 64bit AMD Ubuntu Tips
- Oracle 10gR2 on Ubuntu 6.10 AMD64
So we need a 32-bit Java triggered and a soem 386 compatability libraries to get it working.
There were some linkage problems with the 32bit exproc which is used with C++ database procedures and ultra text search. I simply continued through this as not planning to use exproc. I still have to solve this problem so remember this a play installation oracle and not suitable for production/heavy use. If to really want a supportable oracle platform afraid best to swap to openSUSE or CentOS.
Machine Setup
First of all make sure your machine set up as a server with a static IP address and host name pointing to the external ip address. Check or edit /etc/network/interfaces to make sure the interface is static. For example my interface look as follows:-
auto loOn my box eth0 points out to the world and eth1 is inhouse network. Then double check the /etc/hosts to make sure there a line for the server name
iface lo inet loopback
iface eth1 inet static
address 192.168.1.10
netmask 255.255.255.0
gateway 192.168.1.1
auto eth1
iface eth0 inet dhcp
$ grep $(hostname) /etc/hostsIf you see 127.0.0.1 just edit the hosts file to have the external IP.
192.168.1.10 acles64
Now its time for a lot of compat libraries and 32-bit libraries.
sudo apt-get install build-essential zsh libaio1 lesstif2This will probably cascade in to quite a few packages depending on how much you have installed, be patient and let it download everything it needs. The extra ia32 libraries is probably the biggest change to the old 32-bit installation.
sudo apt-get install lesstif2-dev make libc6 libstdc++5
sudo apt-get install lib32stdc++6 lib32z1 ia32-libs
Edit /etc/sysctl.conf to have the kernel parameters required by Oracle
(Afraid have not put any thought here simply copied Halis way 10g ones, may not be ideal for 11g or needed).
Add these lines at bottom of/etc/sysctl.conf :
# Oracle stuffCreate the oracle user and required groups.
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144
vm.swappiness=10
sudo groupadd nobodyIncrease system limits by adding these lines to /etc/security/limits.conf:
sudo groupadd oinstall
sudo groupadd dba
sudo useradd -s /bin/bash -g oinstall -G dba oracle
sudo passwd oracle
soft nproc 2047Next added a few symlinks to avoid any script problems:
hard nproc 16384
soft nofile 1024
hard nofile 65536
sudo ln -s /usr/bin/awk /bin/awk
sudo ln -s /bin/true /bin/rpm
sudo ln -s /usr/bin/basename /bin/basename
sudo ln -s /lib/libgcc_s.so.1 /lib/libgcc_s.so
Oracle installation
This was done under the oracle user and dba group was added for access to oracle. I like /opt/oracle as a installation route and luckily had space there.
sudo mkdir -p /opt/oracleI downloaded Oracle 11g and unzip its to /opt/oracle/database. Then run the installer, make sure you are allowed to use the X11 server.
sudo chown -R oracle:oinstall /opt/oracle
sudo chmod -R 775 /opt/oracle
May need to login as oracle or play with export DISPLAY, xhost, vnc etc to get it working.
To get the 32-bit JRE to work you need to set the XLOCALELIBDIR before running the installer:
export XLOCALELIBDIR=/usr/lib32/X11/localeI just ran the defaults through with following corrections
cd /opt/oracle/database
./runInstaller -ignoreSysPrereqs
1) Set location to /opt/oracle/product/11.1.0/db
2) Corrected oraInventory location as /opt/oracle/oraInventory
3) Continued with two linkage errors
The linkage errors were luckily in non vital areas (free text search) and (exproc32) so contained and have got my biorails application installed. The Error are shown below:-
Linkage of exproc32
INFO: End output from spawned process.Then Later there a problem with the Oracle Text INSO filter ctxhx needed by Ultra Search crawler . As not planning to use not worried at present.
INFO: ----------------------------------
INFO: Exception thrown from action: make
Exception Name: MakefileException
Exception String: Error in invoking target 'all_no_orcl' of makefile '/opt/oracle/product/11.1.0/db/rdbms/l$
Exception Severity: 1
INFO: Calling Action unixActions10.2.0.1.0 make
registerOnly = false
installMakePath = /usr/bin/make
installMakeFileName = /opt/oracle/product/11.1.0/db/srvm/lib/ins_srvm.mk
installTarget = install
undoMakeFileName =
installArguments = ORACLE_HOME=/opt/oracle/product/11.1.0/db
logFile = /opt/oracle/product/11.1.0/db/install/make.log
undoTarget =
progMsg = Linking RDBMS Executables
INFO: make: *** [ctxhx] Error 1
INFO: End output from spawned process.
INFO: ----------------------------------
INFO: Exception thrown from action: make
Exception Name: MakefileException
Exception String: Error in invoking target 'install' of makefile '/opt/oracle/product/11.1.0/db/ctx/lib/ins$
Exception Severity: 1
INFO: Calling Action unixActions10.2.0.1.0 make
registerOnly = false
installMakePath = /usr/bin/make
installMakeFileName = /opt/oracle/product/11.1.0/db/rdbms/lib/ins_rdbms.mk
installTarget = ipc_g
undoMakeFileName =
installArguments = ORACLE_HOME=/opt/oracle/product/11.1.0/db
logFile = /opt/oracle/product/11.1.0/db/install/make.log
undoTarget =
progMsg = Linking UDP
Once this was done could go in and create users, roles, tables and schema I needed and appears to be working fine. Only real problem its eaten 1Gb of memory and taken over my development box in standard oracle manor. Generally think Oracle XE makes the better developer platform as a lot lighter on resources.
Went in and cut things back a lots and got memory back for my development IDE.
6 comments:
i also installed oracle 11 g in my machine
but i don't know how to connect rails with it..
what should i do ?
You can get 11g to link properly on Hardy 64bit if you edit a couple of the make files and make a symbolic link.
make sure the link exists:
ln -s $ORACLE_HOME/lib/libagtsh.so /usr/lib/libagtsh.so
in:
$ORACLE_HOME/ctx/lib/env_ctx.mk
on line 1945:
change:
AMD32FLAGS=-m32
To:
AMD32FLAGS=-m32 -L/usr/lib32
and in:
$ORACLE_HOME/rdbms/lib/env_rdbms.mk
on line 3064:
change:
REDEFINES32=LIBDIR=lib32 LDFLAGS='-m32-o $$@ $$......
to:
REDEFINES32=LIBDIR=lib32 LDFLAGS='-m32 -L/usr/lib32 -L/usr/lib -o $$@ $$.....
in the middle of the install.
had trouble with the line
sudo apt-get install build-esten libaio1 lesstif2
cant find the build-esten package
is this one important? where can i find it?
Well, my guess is that you have to install "build-essential" :)
Hey Mike,
I still get the same link error after i link libagtsh.so manually and modified the mk files as you suggest. Is there anything else i can do?
Just install libstdc++5
http://packages.debian.org/stable/base/libstdc++5
Post a Comment