Search This Blog

Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Monday, August 31, 2026

grep lines from one file which are in another file

A frequent task in shell scripting and data processing is filtering out lines from one text file that appear in another (e.g., subtracting a list file from a dataset). Rather than writing loops or complex awk scripts, standard GNU grep provides an efficient, one-line solution.


The Solution

grep -v -x -F -f list.txt dataset.txt > filtered_output.txt

(This command outputs all lines from dataset.txt that do not match any exact lines listed in list.txt.)


Flag Breakdown

Flag Full Option Function
-v --invert-match Selects non-matching lines (inverts the filter).
-x --line-regexp Forces matches to span the entire line, preventing partial substring exclusions.
-F --fixed-strings Treats input patterns as literal strings rather than regular expressions (much faster and avoids escaping special characters like ., *, or [).
-f FILE --file=FILE Reads exclusion patterns line-by-line from the specified file.

Regex Patterns vs. Fixed Strings

  • When to omit -F: Use grep -v -x -f patterns.txt data.txt if lines inside patterns.txt contain intentional regular expression syntax (such as wildcard matchers like ^server-[0-9]+).
  • When to include -F (Recommended): Use -F whenever you want a strict, exact text match (WYSIWYG). It prevents characters like dots, brackets, and dollar signs from being parsed as regular expressions, while significantly speeding up processing on large datasets.

How to display a zenity/GUI window to the user from a root cron job

Running a background maintenance task via root's crontab is straightforward, but notifying a logged-in desktop user upon completion can be tricky. Because cron runs in an isolated, non-interactive environment without access to the user's graphical session, GUI tools like zenity, kdialog, or notify-send fail by default. To display a dialog box on the active user's desktop, you must explicitly provide the correct display and authorization parameters.


The Problem: Cron's Isolated Environment

When root runs a cron job, two critical environment variables are absent:

  • DISPLAY: Tells the graphical application which X server display to render on (usually :0.0 or :0).
  • XAUTHORITY: Points to the user's .Xauthority cookie file, which authorizes applications to connect to that X server session.

Solution 1: Run Zenity via su with Environment Variables

The standard way to show a Zenity dialog is to execute the command as the target desktop user while exporting the display and authority variables:

su username -c 'DISPLAY=:0.0 XAUTHORITY=/home/username/.Xauthority zenity --info --title="Task Completed" --text="Root cron task has finished successfully."'

(Replace username and /home/username with the actual active user and their home directory path.)


Solution 2: Dynamic User Detection Script

If you manage multi-user workstations or don't want hardcoded usernames, use a wrapper script that automatically detects the currently logged-in desktop user, finds their .Xauthority, and triggers the popup.

Save the following script to /usr/local/bin/notify_user.sh:

#!/usr/bin/env bash
set -euo pipefail

# 1. Identify the user owning the current X session
ACTIVE_USER=$(who | awk '$0 ~ /(:0|\(:0\))/ {print $1; exit}')

if [ -z "${ACTIVE_USER}" ]; then
    # Fallback: grab the first active graphical session
    ACTIVE_USER=$(who | awk '{print $1; exit}')
fi

USER_HOME=$(eval echo "~${ACTIVE_USER}")
export DISPLAY=":0.0"
export XAUTHORITY="${USER_HOME}/.Xauthority"

# 2. Execute Zenity under the active user's environment
if [ -f "${XAUTHORITY}" ]; then
    su "${ACTIVE_USER}" -c "DISPLAY=${DISPLAY} XAUTHORITY=${XAUTHORITY} zenity --info --title=\"${1:-Notification}\" --text=\"${2:-Background task completed.}\""
else
    # Modern Wayland/Desktop DBus fallback (notify-send)
    USER_ID=$(id -u "${ACTIVE_USER}")
    su "${ACTIVE_USER}" -c "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/${USER_ID}/bus notify-send \"${1:-Notification}\" \"${2:-Background task completed.}\""
fi

Make the script executable:

chmod +x /usr/local/bin/notify_user.sh

Example Cron Implementation

Call the notification script at the end of your root backup or maintenance job in /etc/crontab or sudo crontab -e:

0 2 * * * root /opt/scripts/backup.sh && /usr/local/bin/notify_user.sh "Backup Status" "Nightly system backup finished successfully."

Expanding a virtual disk on a live Linux virtual machine does not require downtime, complex LVM setups, or reboots.

Managing disk space on Linux virtual machines often involves two recurring tasks: attaching a brand-new virtual disk (for example, offloading /var/log) and expanding an existing partition online when data grows. Both workflows can be performed on a running VM with zero downtime, no LVM overhead, and without requiring a reboot.


Part 1: Adding, Partitioning & Mounting a New Disk (e.g., /var/log)

If you have just attached a new virtual disk to your VM, you need to scan the SCSI bus, partition the drive, format the filesystem, and configure persistent mounting.

1. Scan All SCSI Hosts for the New Disk

Trigger a bus rescan across all SCSI hosts so the kernel discovers the newly attached block device without restarting:

for SCSI_HOST in /sys/class/scsi_host/*; do echo "- - -" > $SCSI_HOST/scan; done

2. Create the Partition

Use gdisk (or fdisk) to initialize the partition table on the new device (e.g., /dev/sdb):

gdisk /dev/sdb

(Create a new partition /dev/sdb1 using default parameters and write the changes.)

3. Format the Partition

Format the partition to ext4 and assign a filesystem label (e.g., VARLOG):

mkfs.ext4 -L VARLOG /dev/sdb1

4. Migrate Existing Data & Mount

Mount the new partition to a temporary location, move the existing log files, and mount the partition directly to /var/log:

mount /dev/sdb1 /mnt && mv /var/log/* /mnt && umount /mnt && mount /dev/sdb1 /var/log && df -h

5. Make the Mount Persistent

Open /etc/fstab in your editor:

vi /etc/fstab

Append the following entry:

/dev/sdb1                    /var/log          ext4    defaults        0      2

Part 2: Enlarge a Disk and Partition Online (No Reboot)

When the disk runs low on space, you can expand the virtual disk from your hypervisor and grow the filesystem dynamically.

Prerequisites & Limitations

  • No Active Snapshots: Ensure hypervisor snapshots are consolidated before resizing the disk.
  • Partition Position: Online expansion applies directly to the last or only partition on the block device.
  • Required Tool: Install growpart:
    sudo apt-get install -y cloud-utils        # Debian/Ubuntu
    sudo dnf install -y cloud-utils-growpart   # RHEL/CentOS/Rocky

Step-by-Step Expansion

  1. Increase Disk Size in Hypervisor: Expand the provisioned size in VMware, Proxmox, or cloud portal.
  2. Rescan the Specific Device:
    echo 1 > /sys/class/block/sdb/device/rescan

    Verify the new capacity in dmesg:

    dmesg | tail -n 10
    # Look for: "sdb: detected capacity change from X to Y"
  3. Grow the Partition Table:
    growpart /dev/sdb 1
  4. Resize the Filesystem:

    For EXT4:

    resize2fs /dev/sdb1

    For XFS:

    xfs_growfs /var/log

Automation via Cron

To automate live expansion on recurring data drives, you can schedule a script in /usr/local/bin/disk_resize.sh:

#!/usr/bin/env bash
set -euo pipefail

# Rescan device
echo 1 > /sys/class/block/sdb/device/rescan
sleep 2

# Grow partition and resize ext4
if growpart /dev/sdb 1; then
    resize2fs /dev/sdb1
    echo "[$(date)] Successfully expanded /dev/sdb1"
fi

Schedule it in /etc/crontab:

*/5 * * * * root /usr/local/bin/disk_resize.sh > /var/log/disk_resize.log 2>&1

Tuesday, October 8, 2024

Fix keyboard lag/input delay on Ubuntu, Debian and Redhat in VMware workstation 17

I experiencing this problem with Ubuntu, Debian, Redhat in VMware workstation version 17.

I tried all these, none works:
  • Enhanced keyboard on and off
  • Turned 3D Acceleration on and off
  • Install VMware Tools Desktop
  • Set memory allocated to 100%

Finally, turn on the "Virtualize IOMMU (IO memory management unit) under [Virtualization engin] under "Processors" like this fixed the issue.

Monday, May 8, 2023

configure logrotate to not delete log files after rotation

copy: Make a copy of the log file, but don’t change the original at all.
copytruncate: Truncate the original log file in place after creating a copy.

An example: /etc/logrotate.d/mds
/var/log/mds/mds-app-*.log {
    daily
    copytruncate
    rotate 30
    dateext
    missingok
    notifempty
    sharedscripts
}

Monday, April 25, 2022

How to block incoming Russian IP addresses in the iptables by user defined chain

Too much attack/scanning to the server. Try to block all incoming Russian IP addresses in the iptables.

  1. First find generate the ACL list from:
  2. https://www.countryipblocks.net/acl.php It gives me a total # of 24,445 line of ip address range at the time.
  3. Replace the iptables string for user-defined chain:
  4. iptables
    by
    iptables -A chain-Russian-Block
  5. Run the command to make create the chain:
  6. iptables -N chain-Russian-Block
    ...
    iptables -A chain-Russian-Block -s 2.56.24.0/23 -j DROP
    iptables -A chain-Russian-Block -s 2.56.26.0/23 -j DROP
    iptables -A chain-Russian-Block -s 2.56.88.0/22 -j DROP
    ...
    iptables -A INPUT -j chain-Russian-Block
  7. Check total lines of rules in the chain:
  8. # iptables -S chain-Russian-Block | wc -l
    24,445
  9. Save it for reboot.
  10. service netfilter-persistent save

Friday, October 13, 2017

imagemagick convert append multi jpg into a big jpg photo

First install the Imagemagick.

convert is a sub command from Imagemagick.

To make a long JPG file:


Vertical connect:
convert _TOP.jpg _MID.jpg _BOT.jpg -append FULL.jpg


Horizontal connect:
convert _LEFT.jpg _CENT.jpg _RIGHT.jpg +append FULL.jpg


4 Panels:
convert \( image_left_up_1 image_left_down_2 -append \) \
\( image_right_up_3 image_right_down_4 -append \) +append FULL.jpg



Again, I love opensource!

All credit goes to https://www.imagemagick.org/

Monday, October 2, 2017

String matchs for not in the Second File

Try to clean some old files/folders:


sort active.list > active.sort
sort all_dir.list > all_dir.sort

# grep -i -F -x -v -f active.sort all_dir.sort > del_list &


This will find all [ (all_dir.sort) - (active.sort) ] put it into [ del_list ].
Case insensitive.


#!/bin/bash

while read DIR_NAME; do
        echo "Moving $DIR_NAME."
        mv ./$DIR_NAME/   /archive/
done <del_list

Tuesday, October 25, 2016

replace with sed in directory and sub directories


  1. # goto the folder
  2. cd ~/pentaho/repository/
  3. # verify how many strings exist.
  4. grep -R 192.168.1.11 .
  5. # replace
  6. find ./ -type f -exec sed -i -e 's/192.168.1.11/192.168.2.20/g' {} \;
  7. # double check the result.
  8. grep -R 192.168.2.20|wc -l

Friday, April 1, 2016

random sleep duration in bash shell

Here is a quickie shell script (bash) tip. If you ever want to insert a random sleep/pause into a running script:

sleep $[ ( $RANDOM % 30 ) + 1 ]s

This will introduce a 1-10 second random sleep/pause in the script. Can be handy at times.

I put a cron job to call this script every 3 minutes:

echo '*/3 * * * * root /usr/local/bin/heartbeat.sh >>/var/log/heartbeat.log 2>/var/log/heartbeat.err' >/etc/cron.d/heartbeat



#!/bin/bash

#### To Update AAW node session
#### by Lambert
#### Version 1.0
#### Release Date: 2016-03-29

sleep $((RANDOM % 30))
wget -O /var/log/heartbeat.wget.log $SUBMIT_URL

Wednesday, February 5, 2014

How to Lock down the RHEL CentOS OEL version

For some product, they require the specific RHEH/CentOS/OEL Version.

Here is a example on How I lock down OEL to 5.8:


[ol5_u8_base]
name=Oracle Linux $releasever Update 8 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL5/8/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1

[ol5_UEK_base]
name=Unbreakable Enterprise Kernel for Oracle Linux $releasever ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL5/UEK/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1

[ol5_UEK_latest]
name=Latest Unbreakable Enterprise Kernel for Oracle Linux $releasever ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL5/UEK/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

Thursday, January 30, 2014

Oracle Linux: Maximize Performance / Minimize Downtime

Oracle Linux: Maximize Performance / Minimize Downtime
http://medianetwork.oracle.com/video/player/2921003278001

Oracle’s Greg Marsden provides a large number of specific tips and tricks for getting the most from Oracle Linux.
Really helpful information about Large Memory Linux system.
Example for 1TB RAM system.

Key Note:
NUMA
Swap Tuning
Kernel UEK
kdump
Serial console
HugePages
...


Highly Recommend!

Tuesday, January 28, 2014

Shell script to ping IP


#!/bin/bash

ping -c 4 $1 > /dev/null
if [[ $? -eq 0 ]]
then
echo "ping success at $(date)" >> /tmp/check_vpn.log
else
echo "ping failed at $(date)" >> /tmp/check_vpn.error
fi


To use it:

# ./check_vpn.sh 192.168.1.1

Or:

crontab:

* * * * * check_vpn.sh 192.168.1.1

Friday, August 9, 2013

Add tnsping into Oracle Instant Client on CentOS RHEL OEL

tnsping is a very handy tool from Oralce.
But it does not include with Oracle Instant Client!

To add it, you will need a Oracle Client software installed on the other machine with same OS (Notice:32/64 differently)

Then copy 3 files to the Oracle Instant Client folder:


scp root@192.168.1.4:/u01/app/oracle/product/10.2.0/db_1/bin/tnsping /usr/lib/oracle/10.2.0.5/client/bin/
mkdir -p /usr/lib/oracle/10.2.0.5/client/network/mesg
scp root@192.168.1.4:/u01/app/oracle/product/10.2.0/db_1/network/mesg/tnsus.msb /usr/lib/oracle/10.2.0.5/client/network/mesg/
scp root@192.168.1.4:/u01/app/oracle/product/10.2.0/db_1/network/mesg/tnsus.msg /usr/lib/oracle/10.2.0.5/client/network/mesg/



/etc/sqlnet.ora
NAMES.DIRECTORY_PATH= (TNSNAMES)

Wednesday, August 7, 2013

Installing oracle instant client on CentOS RHEL OEL 5.9

This is a guide of Install sqlplus with the minimal oracle-software fingerprint.

I try to not install the Oracle Client in my computers, it modify lots of registry in Windows, and in linux you need XWindow GUI or remote XWindow plus set lots of environment variables and deal with Oracle Universal Installer (OUI) that depends on many packages, versions, java … etc.

1.First Download the package from Oracle Instant Client

2.Install the 2 packages matchs your OS, I am using OEL 5.9 x86 as example:

rpm -ivh oracle-instantclient-basic-10.2.0.5-1.i386.rpm
rpm -ivh oracle-instantclient-sqlplus-10.2.0.5-1.i386.rpm


3.You should have a structure and files like:

/usr/lib/oracle/10.2.0.5/client/bin/genezi
sqlplus
/usr/lib/oracle/10.2.0.5/client/lib/glogin.sql
libsqlplusic.so
libsqlplus.so
libocci.so.10.1
libocijdbc10.so
ojdbc14.jar
libclntsh.so.10.1
libnnz10.so
libociei.so


4.Add lib to ldconfig

vi /etc/ld.so.conf.d/oracle.conf
/usr/lib/oracle/10.2.0.5/client/lib
re-run: #//sbin/ldconfig
to active the changes


5.create a tnsnames.ora at /etc:

PRODUCT_ORA1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.4)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = ora1)
)
)


6.To test it out:

/usr/lib/oracle/10.2.0.5/client/bin/sqlplus sys@PRODUCT_ORA1

Tuesday, August 6, 2013

Configure network bonding Link Aggregation using LACP under RHEL CentOS OEL 5.9

I wrote this from the work on OEL 5.9 64 bit.

The server has 2 physical NICs bonding into 1 IP address.

1.Config the initial bonding configuration

1.1 eth0

# cat /etc/sysconfig/network-scripts/ifcfg-eth0

# Emulex Corporation OneConnect 10Gb NIC (be3)
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no


1.2 eth1
# cat /etc/sysconfig/network-scripts/ifcfg-eth1

# Emulex Corporation OneConnect 10Gb NIC (be3)
DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no


1.3 bond0
# cat /etc/sysconfig/network-scripts/ifcfg-bond0

# Bonding Network
DEVICE=bond0
USERCTL=no
BOOTPROTO=none
ONBOOT=yes
IPADDR=10.144.244.14
NETMASK=255.255.255.0
NETWORK=10.144.244.0
GATEWAY=10.144.244.1
TYPE=Unknown
IPV6INIT=no


2.Config Bonding modules

2.1 Bonding settings

# cat /etc/modprobe.conf

alias scsi_hostadapter shpchp
alias eth0 be2net
alias eth1 be2net
alias scsi_hostadapter1 cciss
alias scsi_hostadapter2 usb-storage
alias bond0 bonding
options bond0 miimon=100 mode=4 lacp_rate=1


2.2 Load the bonding modules into the “running” kernel

# modprobe bond0
# lsmod | grep bond
bonding 126649 0


3.Configure your network settings
# cat /etc/sysconfig/network

NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=DB01.milliondollarserver.com


4.Restart the network stack
# service network restart

5.Check the routing configuration
# route -n

6.Check bonding stack for errors
# cat /proc/net/bonding/bond0

Ethernet Channel Bonding Driver: v3.4.0-2 (October 7, 2008)

Bonding Mode: IEEE 802.3ad Dynamic link aggregation
Transmit Hash Policy: layer2 (0)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

802.3ad info
LACP rate: fast
Active Aggregator Info:
Aggregator ID: 1
Number of ports: 1
Actor Key: 33
Partner Key: 1
Partner Mac Address: 00:00:00:00:00:00

Slave Interface: eth0
MII Status: up
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: e4:11:5b:e0:55:b8
Aggregator ID: 1

Slave Interface: eth1
MII Status: up
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: e4:11:5b:e0:55:bc
Aggregator ID: 2


Note:The most important line is “LACP rate: fast” make sure that you can see it in your output

Wednesday, May 22, 2013

How to protect your web site by iptables on CentOS RHEL OEL


# Fist Cleaning all rules
iptables -F
iptables -X

# By default I drop all traffic
iptables -P INPUT DROP
iptables -P OUTPUT DROP
iptables -P FORWARD DROP

# Only allow ssh and web
iptables -A INPUT -m tcp -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -m tcp -p tcp --dport 80 -j ACCEPT
iptables -A OUTPUT -m tcp -p tcp --sport 22 -j ACCEPT
iptables -A OUTPUT -m tcp -p tcp --sport 80 -j ACCEPT

# Allow lo
iptables -A INPUT -i lo -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT

# Save the config for reboot and restart the service see how it works.
service iptables save
service iptables restart


More safe if you have a static IP:


-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -s [My Static IP]/32 -d [Server IP]/32 -p tcp -m tcp --dport 22 -j ACCEPT
-A OUTPUT -p tcp -m tcp --sport 80 -j ACCEPT
-A OUTPUT -o lo -j ACCEPT
-A OUTPUT -s [Server IP]/32 -d [My Static IP]/32 -p tcp -m tcp --sport 22 -j ACCEPT


More safe if you Only talk to another server:


-A INPUT -s [Another Server]/32 -p tcp -m tcp --sport 80 -j ACCEPT
-A OUTPUT -d [Another Server]/32 -p tcp -m tcp --dport 80 -j ACCEPT


If you want allow ssh from other subnet:


-A INPUT -s 192.168.244.0/24 -p tcp -m tcp --dport 22 -m state --state NEW -j ACCEPT
-A OUTPUT -d 192.168.244.0/24 -p tcp -m tcp --dport 22 -m state --state NEW -j ACCEPT


Enable DNS:

iptables -A INPUT -i eth0 -p udp -m udp --sport 53 -j ACCEPT
iptables -A OUTPUT -o eth0 -p udp -m udp --dport 53 -j ACCEPT


Enable yum:

iptables -A OUTPUT -m tcp -p tcp -m state --state NEW -m multiport --dports 80,443 -j ACCEPT

Thursday, May 2, 2013

Synchronise server clock to the network NTP CentOS RHEL OEL 6

Want to synchronise your servers clock to the network?


# yum install ntpdate
# chkconfig ntpdate on


specifie NTP server in:/etc/ntp/step-tickers or /etc/ntp.conf

# List of servers used for initial synchronization.
0.pool.ntp.org
1.pool.ntp.org
2.pool.ntp.org
3.pool.ntp.org


# service ntpdate start


Thanks http://www.pool.ntp.org/ provide the free service!

Thursday, January 24, 2013

Zend Debugger How To

Download and Install Zend Debugger

# wget http://downloads.zend.com/studio_debugger/2011_04_10/ZendDebugger-20110410-linux-glibc23-x86_64.tar.gz
# wget http://downloads.zend.com/studio_debugger/2011_04_10/ZendDebugger-20110410-linux-glibc23-i386.tar.gz
# tar xzvf ZendDebugger-20110410-linux-glibc23-x86_64.tar.gz
# cp ZendDebugger-20110410-linux-glibc23-x86_64/5_3_x_comp/ZendDebugger.so /usr/lib64/php/modules/ZendDebugger.so


Configuration Debugger

# vi /etc/php.d/zend_debug.ini



;;;;;;;;;;;;;;;;;;;;
; ZendDebugger ;
;;;;;;;;;;;;;;;;;;;;
zend_extension=/usr/lib64/php/modules/ZendDebugger.so
zend_debugger.allow_hosts=192.168.1.1/16
zend_debugger.expose_remotely=always


Restart Apache before Testing

# service httpd restart


Check if it works

# php -v

PHP 5.3.3 (cli) (built: Jun 27 2012 12:53:18)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with Zend Debugger v5.3, Copyright (c) 1999-2010, by Zend Technologies


Error:libssl.so.0.9.8:

# php -v



Failed loading /usr/lib64/php/modules/ZendDebugger.so: libssl.so.0.9.8: cannot open shared object file: No such file or directory
PHP 5.3.3 (cli) (built: Jun 27 2012 12:53:18)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies


Install openssl098e package

# yum -y install openssl098e.x86_64

epel/metalink | 9.1 kB 00:00
epel | 4.3 kB 00:00
epel/primary_db | 5.0 MB 00:03
ol6_UEK_latest | 1.2 kB 00:00
ol6_latest | 1.4 kB 00:00
ol6_latest/primary | 24 MB 00:31
ol6_latest 18436/18436
pgdg92 | 2.8 kB 00:00
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package openssl098e.x86_64 0:0.9.8e-17.0.1.el6_2.2 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
openssl098e x86_64 0.9.8e-17.0.1.el6_2.2 ol6_latest 761 k

Transaction Summary
================================================================================
Install 1 Package(s)

Total download size: 761 k
Installed size: 2.2 M
Downloading Packages:
openssl098e-0.9.8e-17.0.1.el6_2.2.x86_64.rpm | 761 kB 00:01
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : openssl098e-0.9.8e-17.0.1.el6_2.2.x86_64 1/1
Verifying : openssl098e-0.9.8e-17.0.1.el6_2.2.x86_64 1/1

Installed:
openssl098e.x86_64 0:0.9.8e-17.0.1.el6_2.2

Complete!


Link the file


# ln -s /usr/lib64/libssl.so.0.9.8e /usr/lib64/libssl.so.0.9.8
# ln -s /usr/lib64/libcrypto.so.0.9.8e /usr/lib64/libcrypto.so.0.9.8


Check it Again
# php -v



PHP 5.3.3 (cli) (built: Jun 27 2012 12:53:18)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with Zend Debugger v5.3, Copyright (c) 1999-2010, by Zend Technologies


Reference:
http://forums.zend.com/viewtopic.php?f=8&t=3281
http://forums.zend.com/viewtopic.php?f=59&t=962
http://static.zend.com/topics/Zend-Debugger-Installation-Guide.pdf
http://static.zend.com/topics/Debugger-Install.pdf
http://www.developertutorials.com/tutorials/php/php-debugging-with-zend-studio-8-02-01-938/