Mac OS X Lion Terminal.app not showing ANSI colors on Linux – here’s a fix

Connecting to Linux node from Mac’s Terminal.app and not seeing ANSI colors? Here’s a fix:

On your target Linux node check your /etc/DIR_COLORS file (or equivalent):

root:[/root]# grep TERM /etc/DIR_COLORS
# Below, there should be one TERM entry for each termtype that is colorizable
TERM linux
TERM console
TERM con132x25
TERM con132x30
TERM con132x43
TERM con132x60
TERM con80x25
TERM con80x28
TERM con80x30
TERM con80x43
TERM con80x50
TERM con80x60
TERM cons25
TERM xterm
TERM rxvt
TERM xterm-color
TERM color-xterm
TERM vt100
TERM dtterm
TERM color_xterm
TERM ansi
TERM screen
TERM screen.linux
TERM kon
TERM kterm
TERM gnome
TERM konsole
root:[/root]# 

Make sure the “TERM” definition in this file matches your Terminal.app Preferences-> Advanced -> Emulation Options:

MAC OS X Lion: Terminal.app Emulation Options to enable color in Linux bash

By default the Terminal Emulation was set to “term-256color” and that option is not recognized in /etc/DIR_COLORS.

And if you want ANSI colors for ls -l to work in your MAC terminal on your local MAC machine add the following to your $HOME/.bash_profile:

alias ls='ls -G'

REFERENCE:

Where is ‘ls = ls –color=tty’ alias defined on Linux
IR_Black for OS X Lion

February 3, 2012

Posted In: Linux, Mac

Tags: , ,

OEL 5.4 Unresolvable chain of dependencies on kernel-headers

I just finished installing Oracle Enterprise Linux (OEL) 5 update 4 (5.4) and ran into the following issue installing oracle-validated from ULN Network:

[root@hercules1 rhn]# up2date oracle-validated

Fetching Obsoletes list for channel: el5_i386_latest...
########################################

Fetching Obsoletes list for channel: el5_i386_oracle...
########################################

Fetching rpm headers...
########################################

Name                                    Version        Rel
----------------------------------------------------------
oracle-validated                        1.0.0          18.el5            i386


Testing package set / solving RPM inter-dependencies...
There was a package dependency problem. The message was:

Unresolvable chain of dependencies:
glibc-headers  2.5-42                    requires kernel-headers
glibc-headers-2.5-42                     requires kernel-headers >= 2.2.1
oracle-validated  1.0.0-18.el5           requires kernel-headers


The following packages were added to your selection to satisfy dependencies:
Package                                Required by
----------------------------------------------------------------------------
cpp-4.1.2-46.el5_4.1.i386               gcc-4.1.2-46.el5_4.1                    cpp
gcc-4.1.2-46.el5_4.1.i386               oracle-validated-1.0.0-18.el5           gcc
gcc-c++-4.1.2-46.el5_4.1.i386           oracle-validated-1.0.0-18.el5           gcc-c++
libgcc-4.1.2-46.el5_4.1.i386            gcc-4.1.2-46.el5_4.1                    libgcc
libstdc++-4.1.2-46.el5_4.1.i386         libstdc++-devel-4.1.2-46.el5_4.1        libstdc++
libstdc++-4.1.2-46.el5_4.1.i386         gcc-c++-4.1.2-46.el5_4.1                libstdc++
libstdc++-devel-4.1.2-46.el5_4.1.i386   oracle-validated-1.0.0-18.el5           libstdc++-devel



## note that if you try to manually up2date kernel-headers it will fail:
##
   ## 
   ## 
   ## [root@hercules1 rhn]# up2date kernel-headers
   ## 
   ## Fetching Obsoletes list for channel: el5_i386_latest...
   ## 
   ## Fetching Obsoletes list for channel: el5_i386_oracle...
   ## 
   ## Fetching rpm headers...
   ## ########################################
   ## 
   ## Name                                    Version        Rel
   ## ----------------------------------------------------------
   ## 
   ## The following Packages were marked to be skipped by your configuration:
   ## 
   ## Name                                    Version        Rel  Reason
   ## -------------------------------------------------------------------------------
   ## kernel                                  2.6.18         164.6.1.0.1.el5Pkg name/pattern
   ## kernel-headers                          2.6.18         164.6.1.0.1.el5Pkg name/pattern
   ## 
   ## 
   ## The following packages you requested were marked to be skipped by your configuration:
   ## kernel-headers
   ## [root@hercules1 rhn]#

Solution? Use “–force” flag calling up2date:

   ## [root@hercules1 rhn]#
   ## [root@hercules1 rhn]# up2date --force kernel-headers
   ## 
   ## Fetching Obsoletes list for channel: el5_i386_latest...
   ## 
   ## Fetching Obsoletes list for channel: el5_i386_oracle...
   ## 
   ## Name                                    Version        Rel
   ## ----------------------------------------------------------
   ## kernel-headers                          2.6.18         164.6.1.0.1.el5   i386
   ## 
   ## 
   ## Testing package set / solving RPM inter-dependencies...
   ## ########################################
   ## kernel-headers-2.6.18-164.6 ########################## Done.
   ## Preparing              ########################################### [100%]
   ## 
   ## Installing...
   ##    1:kernel-headers         ########################################### [100%]


## Now oracle-validated works
##

[root@hercules1 rhn]# up2date oracle-validated

Fetching Obsoletes list for channel: el5_i386_latest...

Fetching Obsoletes list for channel: el5_i386_oracle...

Fetching rpm headers...
########################################

Name                                    Version        Rel
----------------------------------------------------------
oracle-validated                        1.0.0          18.el5            i386


Testing package set / solving RPM inter-dependencies...
########################################
compat-db-4.2.52-5.1.i386.r ########################## Done.
compat-gcc-34-3.4.6-4.i386. ########################## Done.
compat-gcc-34-c++-3.4.6-4.i ########################## Done.
elfutils-libelf-devel-0.137 ########################## Done.
gcc-4.1.2-46.el5_4.1.i386.r ########################## Done.
gcc-c++-4.1.2-46.el5_4.1.i3 ########################## Done.
gdb-6.8-37.el5.i386.rpm:    ########################## Done.
glibc-devel-2.5-42.i386.rpm ########################## Done.
glibc-headers-2.5-42.i386.r ########################## Done.
libXp-1.0.0-8.1.el5.i386.rp ########################## Done.
libaio-devel-0.3.106-3.2.i3 ########################## Done.
libstdc++-devel-4.1.2-46.el ########################## Done.
oracle-validated-1.0.0-18.e ########################## Done.
sysstat-7.0.2-3.el5.i386.rp ########################## Done.
unixODBC-2.2.11-7.1.i386.rp ########################## Done.
unixODBC-devel-2.2.11-7.1.i ########################## Done.
cpp-4.1.2-46.el5_4.1.i386.r ########################## Done.
elfutils-libelf-devel-stati ########################## Done.
libgcc-4.1.2-46.el5_4.1.i38 ########################## Done.
libgomp-4.4.0-6.el5.i386.rp ########################## Done.
libstdc++-4.1.2-46.el5_4.1. ########################## Done.
Preparing              ########################################### [100%]

Installing...
   1:libgcc                 ########################################### [100%]
   2:libstdc++              ########################################### [100%]
   3:unixODBC               ########################################### [100%]
   4:compat-db              ########################################### [100%]
   5:libgomp                ########################################### [100%]
   6:cpp                    ########################################### [100%]
   7:sysstat                ########################################### [100%]
   8:libXp                  ########################################### [100%]
   9:gdb                    ########################################### [100%]
  10:libstdc++-devel        ########################################### [100%]
  11:glibc-headers          ########################################### [100%]
  12:glibc-devel            ########################################### [100%]
  13:unixODBC-devel         ########################################### [100%]
  14:libaio-devel           ########################################### [100%]
  15:compat-gcc-34          ########################################### [100%]
  16:gcc                    ########################################### [100%]
  17:gcc-c++                ########################################### [100%]
  18:compat-gcc-34-c++      ########################################### [100%]
  19:elfutils-libelf-devel  ########################################### [100%]
  20:oracle-validated       ########################################### [100%]
  21:elfutils-libelf-devel-s########################################### [100%]
The following packages were added to your selection to satisfy dependencies:

Name                                    Version        Release
--------------------------------------------------------------
compat-db                               4.2.52         5.1
compat-gcc-34                           3.4.6          4
compat-gcc-34-c++                       3.4.6          4
elfutils-libelf-devel                   0.137          3.el5
gcc                                     4.1.2          46.el5_4.1
gcc-c++                                 4.1.2          46.el5_4.1
gdb                                     6.8            37.el5
glibc-devel                             2.5            42
glibc-headers                           2.5            42
libXp                                   1.0.0          8.1.el5
libaio-devel                            0.3.106        3.2
libstdc++-devel                         4.1.2          46.el5_4.1
sysstat                                 7.0.2          3.el5
unixODBC                                2.2.11         7.1
unixODBC-devel                          2.2.11         7.1
cpp                                     4.1.2          46.el5_4.1
elfutils-libelf-devel-static            0.137          3.el5
libgcc                                  4.1.2          46.el5_4.1
libgomp                                 4.4.0          6.el5
libstdc++                               4.1.2          46.el5_4.1

[root@hercules1 rhn]#

HTH,
– Vitaliy

November 5, 2009

Posted In: Linux

Tags: ,

Oracle on Solaris is making a come back?

Oracle has just announced a new world record TPC-C benchmark result claiming that Oracle and Sun Are Faster than IBM: Proof Now Available. What’s really interesting is that they used Solaris OS instead of Oracle EL for this benchmark, specifically: “Oracle® Database 11g running on Sun SPARC® servers with CMT technology and the Sun Solaris Operating System“.

John Fowler (executive vice-president, Systems Group, Sun Microsystems) had this to say:

No other vendor today is shipping fully-integrated flash-based hardware and software that leverages a world-class operating system – Solaris – to deliver these breakthrough world record performance results.

This is getting very interesting … Goodbye Oracle Linux?

October 13, 2009

Posted In: Linux

Tags: ,

Quick How-To on vncserver for Oracle DBA

I don’t normally use vncserver, I prefer SSH X11 tunneling/forwarding due to it’s inherited security, but sometimes there have been issues with X11/SSH and it’s nice to know an alternative. This quick how-to is meant for an Oracle DBA looking for a quick way to run GUI tools from the Oracle stack, such as runInstaller, dbca, dbua, etc.. It is not meant to serve as a step by step guide to setup a secure, reusable vncserver setup in your environment, I do however provide some additional references where you can find additional information (see the end of this post).

Lets get to it then — the good news is that vncserver should already be installed on your RHEL / OEL. All you have to do is start it up and tell it the display number like so:

[root@rac1 ~]# su - oracle
rac1.XRACP1-> vncserver :12

You will require a password to access your desktops.

Password:
Verify:

New 'rac1.mydomain.com:12 (oracle)' desktop is rac1.mydomain.com:12

Creating default startup script /u01/app/oracle/.vnc/xstartup
Starting applications specified in /u01/app/oracle/.vnc/xstartup
Log file is/u01/app/oracle/.vnc/rac1.mydomain.com:12.log

rac1.XRACP1-> ps -ef | grep vnc
oracle   31123     1  0 13:04 pts/1    00:00:00 Xvnc :12 -desktop rac1.mydomain.com:12 (oracle) -httpd /usr/share/vnc/classes -auth /u01/app/oracle/.Xauthority -geometry 1024x768 -depth 16 -rfbwait 30000 -rfbauth /u01/app/oracle/.vnc/passwd -rfbport 5912 -pn
oracle   31158     1  0 13:04 pts/1    00:00:00 vncconfig -iconic
oracle   32309 31078  0 13:05 pts/1    00:00:00 grep vnc
rac1.XRACP1->

If you want to kill vncserver use “vncserver -kill :12” command where :12 is the display number you specified when starting it:

vncserver -kill :12

rac1.XRACP1-> ps -ef | grep vnc
oracle    9597     1  1 17:50 pts/3    00:00:00 Xvnc :12 -desktop rac1.mydomain.com:12 (oracle) -httpd /usr/share/vnc/classes -auth /u01/app/oracle/.Xauthority -geometry 1024x768 -depth 16 -rfbwait 30000 -rfbauth /u01/app/oracle/.vnc/passwd -rfbport 5912 -pn
oracle   10065     1  0 17:50 pts/3    00:00:00 vncconfig -iconic
oracle   10303  9514  0 17:50 pts/3    00:00:00 grep vnc

rac1.XRACP1-> vncserver -kill :12
Killing Xvnc process ID 9597

rac1.XRACP1-> ps -ef | grep vnc
oracle   14396  9514  0 17:52 pts/3    00:00:00 grep vnc
rac1.XRACP1->

That’s all to it, next you can access the display via http://host:58XX where XX is the screen number you specified when starting the vncserver:

http://rac1.mydomain.com:5812

REFERENCE:
Note: 551711.1 Linux OS Service ‘vncserver’
Note: 735767.1 How to Setup VNC Server with Clipboard Support on RHEL/OEL
APRESS Book: Linux Recipes for Oracle DBAs

September 16, 2009

Posted In: Linux, Operations

Tags:

11gR2 is here!

In case you didn’t get this via oracle.com news updates — 11gR2 is out and available for download from here ….

And as I have predicted, the first distro is Linux x86 and Linux x86-64. So if you are a die-hard Solaris fan it should now be obvious (if it wasn’t already) that Linux is now officially the preferred platform (as Solaris once was but no longer is).

I actually wasn’t expecting this in September — I thought it was going to get announced closer to Oracle Open World but I am not complaining here :)

September 10, 2009

Posted In: Linux

Tags: , , ,

No more SUN

After running ORACLE on SUN for over 7 years and being the big proponent of it I have finally said enough is enough. Starting this summer our shop made a switch to Linux (HP) and so far I could not be happier. I just don’t get it with SUN anymore they keep digging a deeper whole by separating themselves further and further from ORACLE. And with ORACLE now offering Linux support I just don’t see why would someone not yet invested in SUN hardware would want to choose them over Linux.

Overpriced SUN Hardware is replaced by powerful and reasonably priced HP Boxes
Overpriced SUN Hardware is replaced by powerful and reasonably priced HP Boxes (Front)
Overpriced SUN Hardware is replaced by powerful and reasonably priced HP Boxes (Back)
Overpriced SUN Hardware is replaced by powerful and reasonably priced HP Boxes (Back)

August 7, 2008

Posted In: Linux

Tags: