Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Saturday, October 21

Oracle 10gR2 on Ubuntu 6.10 AMD64

I just finished installing Oracle 10gR2 on my Intel Core2 Ubuntu 6.10 machine running in x86_64 (AMD64) mode. The installation is fairly straight forward with a few gotchas. In comparison to CentOS/Redhat, Ubuntu 6.10 has got much more native 64-bit libraries, pretty much everything is actually 64-bit. Under Redhat most libraries are 32-bit. And the Oracle Universal Installer (OUI) uses a 32-bit Java runtime so hence we have to install a few i386 compatability libraries to get it working.

First of all make sure your machines hostname resolves to your external IP and not the loopback IP (127.0.0.1).
Double check using this command
$ grep $(hostname) /etc/hosts
192.168.95.40 htpc
If you see 127.0.0.1 just edit the hosts file to have the external IP.

Now you need to install a few compat libraries and 32-bit libraries.
sudo apt-get install gcc libaio1 lesstif2 
lesstif2-dev make libc6 libstdc++5 \
lib32stdc++6 lib32z1 ia32-libs
This 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.

Edit /etc/sysctl.conf to have the kernel parameters required by Oracle (I've added a few extras here as well to avoid unecessery swapping).
Add these lines:
# Oracle stuff
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
Create the oracle user and required groups (you don't really need the nobody group, it's only used by root.sh to be the group owning the oraenv and dbhome scripts).
sudo groupadd nobody
sudo groupadd oinstall
sudo groupadd dba
sudo useradd -s /bin/bash -g oinstall -G dba oracle
sudo passwd oracle

Increase system limits by adding these lines to /etc/security/limits.conf:
* soft nproc 2047
* hard nproc 16384
* soft nofile 1024
* hard nofile 65536
To avoid the non-redhat warnings during the prereqs run this command:
echo 3 > /etc/redhat-release
Add a few symlinks to avoid any script problems:
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
sudo mkdir -p /u01/oracle/10g
sudo chown -R oracle:oinstall /u01/oracle/10g
sudo chmod -R 775 /u01/oracle
Time to run the installer, make sure you are allowed to use the X11 server (export DISPLAY, xhost, vnc whatever).
To get the 32-bit JRE to work you need to set the XLOCALELIBDIR before running the installer:
export XLOCALELIBDIR=/usr/lib32/X11/locale
cd /your/install/dir
./runInstaller
I just ran the defaults straight through (except the SID name and password). The installation without any warnings or errors. The linker worked fine and everything was configure properly, dbca created the standard database.
oracle@htpc:~$ uname -a
Linux htpc 2.6.17-10-generic #2 SMP Fri Oct 13 15:34:39 UTC 2006 x86_64 GNU/Linux
oracle@htpc:~$ rsqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Sat Oct 21 20:13:45 2006

Copyright (c) 1982, 2005, Oracle. All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL> select platform_name from v$database;

PLATFORM_NAME
--------------------
Linux 64-bit for AMD

SQL>

This guide is based on the Oracle 10gR2 x64_64 installation guide and I've also used Dizwells excellent Ubuntu 6.06 32-bit guide for some ubuntu specific notes. Thanks.

Cool, now I can alt-tab between sqlplus and my latest Prison Break episodes on the TV . :)

Saturday, October 14

Running Ubuntu 6.10 on Abit AB9

Playing around with my new media center PC at the moment.
Ubuntu 6.10 Edgy (daily build from Oct 13th) installed without too many problems yesterday, most of the hardware on my Abit AB9 pro motherboard was detected out of the box.
However the ethernet controller, a Realtek 8111B, card was not detected.
From lspci I got Realtek Semiconductor Co., Ltd. Unknown device 8168 (rev 01) and after a quick look in google I found this article on how to get the card working. Worked great, just download, change the three MODULE_PARM lines in the src to MODULE_PARM_DESC and it compiles ok.

A few notes on installing Linux on the AB9 motherboard though, a few thought from my experience. First of all, use a very recent version of Linux. Ubuntu 6.10 worked for me and I'd expect Fedora Core 6 would work.
Use the jmicron controller, not the ICH8R controller for the disk and optical drive.

Another thing, which I think is just related to me not having used debian/ubuntu enough. After I partitioned my disk and create ext3 file systems using labels I was unable to mount using LABEL=foo, turns out I had to restart the udev service before they showed up. In CentOS, they just appear under the dev-mapper.

I'm quite impressed on how good it looks on my LCD television. Even xvid files in HDTV resolution look great.

Tuesday, September 12

KDE - Not that krap after all

Ok, I've been quite "anti KDE" the last few years, with good reason imo. The last time I tried KDE must have been around 2001 or 20002 and back then it wasn't that good.
Now the other week my beloved OpenSolaris powered laptops hard drive failed on me. After I spend about a week moaning about it I finally got around to buying a new drive for it. Replace the old 30gb 4200rpm with a snappy 80gb 5400rpm drive (yes, the speed difference is really significant). Since I didn't have a recent Nevada build ready and was to lazy to download one I decided to install Kubuntu instead, got a free CD at an event the other day. Simple install as always with Ubuntu. Even the widescreen res on my laptop worked out of the box. Easy setup, did the usuall apt-get install oracle-xe, install postgres.
Then I realized I really lliked using KDE, things where so much easier than GNOME. KDE has probably got less features, but it just works. The integration between the applications is great, the little IM client Kopete is much nicer than gaim. KDE seems to use less memory than GNOME as well. Oh well, I saved disk space for Solaris and will probably install that as soon as I get around to downloading a recent version. Nevada B48 should be out any day now.