Friday, September 28, 2007

Installation of Oracle 9i on Fedora Core Linux

This paper (HOWTO) describes step-by-step installation of Oracle 9i database software on Fedora Core 2, 3, 4, 5 and 6.

Pre-Instalation Tasks
1. Create oracle User Account

Login as root and create te user oracle which belongs to dba group. su -
# groupadd dba
# useradd -g dba oracle

2. Setting System parameters
Edit the /etc/sysctl.conf and add following lines: kernel.sem = 250 32000 100 128
kernel.shmmax = 2147483648
kernel.shmmni = 128
kernel.shmall = 2097152
kernel.msgmnb = 65536
kernel.msgmni = 2878
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000 Note: You need execute "sysctl -p" or reboot system to apply above settings.

Edit the /etc/security/limits.conf file and add following lines: * - nproc 16384
* - nofile 16384
3. Setting Oracle Enviroment
Edit the /home/oracle/.bash_profile file and add following lines:

Settings for Fedora Core 2,3,4 only. For Fedora Core 5 and 6 use the next settings. ORACLE_BASE=/opt/oracle
ORACLE_HOME=$ORACLE_BASE/920
ORACLE_SID=MY_ORACLE
LD_LIBRARY_PATH=$ORACLE_HOME/lib
LD_ASSUME_KERNEL=2.4.1
THREADS_FLAG=native
ORACLE_OEM_JAVARUNTIME=/opt/jre1.3.1_15
PATH=$PATH:$ORACLE_HOME/bin

export ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH LD_ASSUME_KERNEL THREADS_FLAG ORACLE_OEM_JAVARUNTIME PATH
Settings for Fedora Core 5 and 6 only. For Fedora Core 2,3,4 use the above settings. Note setting of LD_ASSUME_KERNEL will cause incorrect functionality of FC5 and FC6.
ORACLE_BASE=/opt/oracle
ORACLE_HOME=$ORACLE_BASE/920
ORACLE_SID=MY_ORACLE
LD_LIBRARY_PATH=$ORACLE_HOME/lib
ORACLE_OEM_JAVARUNTIME=/opt/jre1.3.1_15
PATH=$PATH:$ORACLE_HOME/bin

export ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH ORACLE_OEM_JAVARUNTIME PATH
Save the .bash_profile and execute following commands for load new enviroment: cd /home/oracle
. .bash_profile
4. Create base directory for Oracle

Login as root and create base directory for Oracle ($ORACLE_BASE). su -
# cd /opt
# mkdir oracle
# chown oracle:dba oracle

Download & Install

1. Download and install required .rpm packages

Some additional packages are required for succesful instalation of Oracle software. To check whether required packages are installed on your operating system use following command: rpm -q gcc glibc-headers glibc-kernheaders glibc-devel compat-libstdc++ cpp compat-gcc
Note: You don't need glibc-kernheaders installed on FC6 as this package is not shipped with FC6.
If some package is not installed download it from Fedora project website or direct from Core 2, Core 3, Core 4, Core 5, Core 6 locations.

This step is required for Fedora Core 3 and 4 only. Fedora Core 3 is shipped with compat-gcc-8.3.3.4. Fedora Core 4 is shipped with compat-gcc-32-3.2.3. These package are GCC 3.x compiler which are not useful for succesful inatallation. Check whether compat-gcc-8.3.3.4 or compat-gcc-32-3.2.3 is installed. If so then uninstall it using folowing command: rpm -e compat-gcc Download the compat-gcc-7.3-2.96.126.i386.rpm package from Core 2 location or from here.

Install the required packages using the rpm command (Note version of packages may change in newer release, so versions for all packages (except compat-gcc package) used in next command are just for example.): # rpm -ivh gcc-3.4.2-6.fc3.i386.rpm \
glibc-headers-2.3.3-74.i386.rpm \
glibc-kernheaders-2.4-9.1.87.i386.rpm \
glibc-devel-2.3.3-74.i386.rpm \
compat-libstdc++-3.4.2-6.fc3.i386.rpm \
cpp-3.4.2-6.fc3.i386.rpm \
compat-gcc-7.3-2.96.126.i386.rpm

For Fedora Core 4, 5 and 6 only:Install the required additional packages using the rpm command:
# rpm -ivh compat-libgcc-296-2.96-___.rpm \
compat-libstdc++-33-3.2.3-___.rpm \
compat-libstdc++-296-2.96-___.rpm

If all required packages were installed succesfuly then login as root and switch the GCC3 compiler binary with GCC2 compiler binary as following:
su -
# cd /usr/bin
# mv ./gcc ./gcc3
# mv ./gcc296 ./gcc

2. Download the Java Runtime Enviroment (j2re-1_3_1_15-linux-i586.bin) from the Sun website. Keep in mind you need to download j2re1.3.1_11 or higher (Note: Install JRE 1.3.1_1x version only).

Login as root and make the the file executable and then execute it. When the JRE is exracted move the "jre1.3.1_15" di rectory to "/opt" directory.
# chmod +x j2re-1_3_1_15-linux-i586.bin
# ./j2re-1_3_1_15-linux-i586.bin

# mv jre1.3.1_15 /opt/
3. Download the Oracle 9i (9.2.0.4) software from Oracle website.
Extract the files using following command: gunzip ship_9204_linux_disk1.cpio.gz
gunzip ship_9204_linux_disk2.cpio.gz
gunzip ship_9204_linux_disk3.cpio.gz

cpio -idmv < ship_9204_linux_disk1.cpio
cpio -idmv < ship_9204_linux_disk2.cpio
cpio -idmv <>
When all archives were extracted you've got three directories Disk1, Disk2 and Disk3.
Edit the Disk1/install/linux/oraparam.ini and modify JRE_LOCATION variable and set path to our JRE installation from Step 2.

JRE_LOCATION=/opt/jre1.3.1_15

4. Start the Oracle software installation process.

Now the system is prepared for Oracle software installation. To start the installation process execute the following commands: cd Disk1
./runInstaller
When network configuration assistant and database configuration assistant has failed during st artup then do following steps
cd /opt/oracle/920
rm JRE
ln -s /opt/jre1.3.1_15 JRE
su -
# cd /opt/oracle/920/JRE/bin
# ln -s java jre
# cd i386/native_threads
# ln -s java jre

Post-Instalation Tasks

1. Switch back the GCC binaries su -
# cd /usr/bin
# mv ./gcc ./gcc296
# mv ./gcc3 ./gcc

2. Change of JRE path in Oracle Universal Installer

Edit the $ORACLE_BASE/oui/oraparam.ini file and modify the value of JRE_LOCATION to /opt/jre1.3.1_15

3. (Optional) You may consider to use rlwrap for comfortable work with sqlplus. RPM package for Fedora Core (x86) distribution you can download here.
su -
# rpm -ivh rlwrap-0.24.fedora.i386.rpm
# exit
echo "alias sqlplus='rlwrap sqlplus'" >> /home/oracle/.bash_profile
. /home/oracle/.bash_profile

Common Installation Errors

Unable to load native library: /tmp/OraInstall2005-01-08_11-11-34AM/jre/lib/i386/libjava.so: symbol __libc_wait, version GLIBC_2.0 not defined in file libc.so.6 with link time reference
Solution: Install new JRE 1.3.1 version. Edit the Disk1/install/linux/oraparam.ini and set path to new JRE for JRE_LOCATION variable. For more information see Download & Install section.

/tmp/OraInstall2005-04-26_11-38-19AM/jre/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory
Solution: Install the xorg-x11-deprecated-libs package (for >=FC4 versions). For FC5 and later install libXp package.

/tmp/OraInstall2005-06-14_03-46-25PM/jre/bin/i386/native_threads/java: error while loading shared libraries: /tmp/OraInstall2005-06-14_03-46-25PM/jre/lib/i386/native_threads/libhpi.so: cannot restore segment prot after reloc: Permission denied
Solution: Modify /etc/selinux/config and change value of SELINUX to "disabled" and reboot computer.

Starting Oracle Intelligent Agent.../opt/oracle/920/bin/dbsnmpwd: line 156: 1393 Segmentation fault nohup $ORACLE_HOME/bin/dbsnmp $* >>$DBSNMP_WDLOGFILE 2>&1
/opt/oracle/920/bin/dbsnmpwd: line 156: 1405 Segmentation fault nohup $ORACLE_HOME/bin/dbsnmp $* >>$DBSNMP_WDLOGFILE 2>&1
/opt/oracle/920/bin/dbsnmpwd: line 156: 1416 Segmentation fault nohup $ORACLE_HOME/bin/dbsnmp $* >>$DBSNMP_WDLOGFILE 2>&1
/opt/oracle/920/bin/dbsnmpwd: line 156: 1427 Segmentation fault nohup $ORACLE_HOME/bin/dbsnmp $* >>$DBSNMP_WDLOGFILE 2>&1
Solution: Download and apply patch nr.: 3238244 from http://metalink.oracle.com.

Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using 'localhost:0.0' as the value of the DISPLAY variable.
Solution: Execute "export DISPLAY=:0.0" (as oracle user) and "xhost +" as user who has opened X session (for example logged in KDE, GNOME, etc.). If the value is other than 127.0.0.1 or localhost you should "xhost +" on client machine.

Error in invoking target install of makefile /opt/oracle/920/ctx/lib/ins_ctx.mk
Error in invoking target install of makefile /opt/oracle/920/precomp/lib/ins_precomp.mk
Error in invoking target install of makefile /opt/oracle/920/plsql/lib/ins_plsql.mk
Error in invoking ntcontab.o of makfile /opt/oracle/920/network/lib/ins_net_client.mk
Solution: Install the compat-gcc-7.3-2.96.126.i386.rpm (gcc 2.96) package and change the GCC binaries. For more information see Download & Install section. In case of Fedora Core 5 take look at next error message.

sed: -e expression #1, char 7: unterminated `s' command error in $ORACLE_HOME/install/make.log
Solution: There is probably bug in bash (FC5 only). Download and install bash package from FC4. I have prepared this package (builded from FC4 src.rpm) for FC5 - Download.
Install it using "rpm -ivh bash-3.0-31.i386.rpm --force".

Initializing Java Virtual Machine from /tmp/OraInstall2006-10-25_01-43-30PM/jre/bin/java. Please wait... /tmp/OraInstall2006-10-25_01-43-30PM/jre/bin/i386/native_threads/java: error while loading shared libraries: libstdc++-libc6.1-1.so.2: cannot open shared object file: No such file or directory
- after ./runInstaller execution.
Solution:
su -
# cd /usr/lib
# ln -s libstdc++-3-libc6.2-2-2.10.0.so libstdc++-libc6.1-1.so.2

Start ./runInstaller again.

Monday, August 06, 2007

Thursday, August 02, 2007

Flash plugin for Opera on Linux

Opera is a cross-platform web browser and Internet suite which handles common internet-related tasks including visiting web sites, sending and receiving e-mail messages, managing contacts, chatting online and displaying Widgets. Opera’s lightweight mobile web browser Opera Mini and most current versions of its desktop application are offered free of charge.

Install Opera web Browser in Ubuntu

Download Opera 9.20 from here

Now you should have opera-static_9.20-20070409.1-qt_en_i386.deb package you need to install using the following command

sudo dpkg –force-architecture -i opera-static_9.20-20070409.1-qt_en_i386.deb

Now you need to download lesstif from here and install this package using the following command

sudo dpkg -i –force-architecture lesstif2_0.93.94-11.4ubuntu3_i386.deb

Now you need to download openmotif from here and install this package using the following command

sudo dpkg -i –force-all openmotif_2.1.30-5_i386.deb

Now you need to install Flash9 from here

Now you need to extract this file using the following comand

sudo tar xzvf install_flash_player_9_linux.tar.gz

Now you need to go in to the install_flash_player_9_linux directory

cd install_flash_player_9_linux/

sudo cp libflashplayer.so /usr/lib/opera/plugins

sudo cp flashplayer.xpt /usr/lib/opera/plugins

Now you need to install following packages

sudo aptitude install ia32-libs ia32-libs-sdl ia32-sun-java5-bin ia32-libs-gtk flashplugin-nonfree sun-java6-plugin sun-java6-jre

Now you need to install Get qt3 libs download qt3 libs from here and install this package using the following comamnd

sudo dpkg -i –force-architecture libqt3-mt_3.3.8really3.3.7-0ubuntu5_i386.deb

Now you can launch your opera webbrowser and enjoy your news,programs etc

Monday, July 16, 2007

Ubuntu Linux convert DHCP network configuration to static IP configuration

My friend wanted to know how to change or convert DHCP network configuration to static configuration. After initial installation, he wanted to change network settings. Further, his system is w/o GUI system aka X Windows. Here is quick way to accomplish the same:

Your main network configuration file is /etc/network/interfaces

Desired new sample settings:
=> Host IP address 192.168.1.100
=> Netmask: 255.255.255.0
=> Network ID: 192.168.1.0
=> Broadcast IP: 192.168.1.255
=> Gateway/Router IP: 192.168.1.254
=> DNS Server: 192.168.1.254

Open network configuration file
$ sudo vi /etc/network/interfaces

OR
$ sudo nano /etc/network/interfaces

Find and remove dhcp entry:
iface eth0 inet dhcp

Append new network settings:

iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.254

Save and close the file. Restart the network:
$ sudo /etc/init.d/networking restart
Task: Define new DNS servers

Open /etc/resolv.conf file
$ sudo vi /etc/resolv.conf

You need to remove old DNS server assigned by DHCP server:
search myisp.com
nameserver 192.168.1.254
nameserver 202.54.1.20
nameserver 202.54.1.30

Save and close the file.
Task: Test DNS server

$ host cyberciti.biz
Network command line cheat sheet

You can also use commands to change settings. Please note that these settings are temporary and not the permanent. Use above method to make network changes permanent or GUI tool as described below.
Task: Display network interface information

$ ifconfig
Task: Take down network interface eth0 / take a network interface down

$ sudo ifconfig eth0 down
OR
$ sudo ifdown eth0
Task: Bring a network interface eth0 up

$ sudo ifconfig eth0 up
OR
$ sudo ifup eth0
Task: Change IP address and netmask from command line

Activate network interface eth0 with a new IP (192.168.1.50) / netmask:
$ sudo ifconfig eth0 192.168.1.50 netmask 255.255.255.0 up
Task: Display the routing table

$ /sbin/route
OR
$ /sbin/route -n

Output:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
localnet * 255.255.255.0 U 0 0 0 ra0
172.16.114.0 * 255.255.255.0 U 0 0 0 eth0
172.16.236.0 * 255.255.255.0 U 0 0 0 eth1
default 192.168.1.254 0.0.0.0 UG 0 0 0 ra0
Task: Add a new gateway

$ sudo route add default gw 172.16.236.0
Task: Display current active Internet connections (servers and established connection)

$ netstat -nat
Task: Display open ports

$ sudo netstat -tulp
OR
$ sudo netstat -tulpn
Task: Display network interfaces stats (RX/TX etc)

$ netstat -i
Task: Display output for active/established connections only

$ netstat -e
$ netstat -te
$ netstat -tue

Where,
-t : TCP connections
-u : UDP connections
-e : Established
Task: Test network connectivity

Send ICMP ECHO_REQUEST to network hosts, routers, servers etc with ping command. This verifies connectivity exists between local host and remote network system:
$ ping router
$ ping 192.168.1.254
$ ping cyberciti.biz

See simple Linux system monitoring with ping command and scripts for more information.
Task: Use GUI (Graphical Configuration) network Tool

If you are new, use GUI configuration tool, type the following command at terminal:
$ network-admin &

Above command is Ubuntu’s GUI for configuring network connections tool.
Final tip - Learn how find out more information about commands

A man page is your best friend when you wanted to learn more about particular command or syntax. For example, read detailed information about ifconfig and netstat command:
$ man ifconfig
$ man netstat

Just get a short help with all command options by appending –help option to each command:
$ netstat --help

Find out what command is used for particular task by searching the short descriptions and manual page names for the keyword:
$ man -k 'delete directory'
$ apropos -s 1 remove

Display short descriptions of a command:
$ whatis rm
$ whatis netstat

Linux offers an excellent collection of utilities, which can be use to finding the files and executables, remember you cannot memorize all the commands and files

Wednesday, March 21, 2007

Jabber Server di Debian

Berikut Cara cepat install jabber server di debian
install daemon jabber
root@undecided:~# apt-get install jabber

stop daomon jabber yg sedang jalan

root@undecided:~# /etc/init.d/jabber stop
Stopping jabberd: jabberd.

ubah file configurasi

/etc/jabber/jabber.cfg

dan sesuaikan dengan server name

# JABBER_HOSTNAME (which is then passed to jabberd in the -h switch)
JABBER_HOSTNAME=chat.server.net

jalankan kembali daemon jabber

root@undecided:~# /etc/init.d/jabber start
Starting jabberd: jabberd.

sekarang tinggal register dengan menggunakan jabber client.. saat ini saya menggunakan pandion untuk windows karena userfriendly mirip ym :P

jangan lupa format user adalah

user@chat.server.net

selamat mencoba

Friday, March 02, 2007

Koneksi Ke Console Cisco Dengan Minicom

I bought this Connectland usb/serial connector to configure my Cisco routers. Since now I’m using Ubuntu, this Linux just picks up the connector.

[4309733.840000] usb 2-2: new full speed USB device using uhci_hcd and address 5
[4309733.936000] pl2303 2-2:1.0: PL-2303 converter detected
[4309733.940000] usb 2-2: PL-2303 converter now attached to ttyUSB0

Then I installed minicom.

$ sudo apt-get install minicom

Run the minicom program and using command CTRL-a z o (inside minicom) to configure the minicom serial port. Make sure the configuration look like this.

A - Serial Device : /dev/ttyUSB0
B - Lockfile Location : /var/lock
C - Callin Program :
D - Callout Program :
E - Bps/Par/Bits : 9600 8N1
F - Hardware Flow Control : Yes
G - Software Flow Control : No

Save the configuration with whatever name you want. In this case is “cisco”.

Next time you want to configure your router using minicom, just type “minicom cisco”