Whatis New in PHP5

1.Support For Simple XML
By Default PHP5 installs XML and It supports most of the xml extensions.All XML functions are now standardized on the libxml2 library and are fully W3C standards compliant.It also providing traversable structure to work with XML documents.PHP 5 also offers a replacement extension for DOMXL (available in “experimental” form in PHP 4) with the DOM extension.

2.Database Support
PHP5 offers few big enhancements to interact with database. One of the enhancement is embedded SQlite Database. You no need to have RDBM Manager to run in the background.But the performance of the SQLite is degraded by five or more concurrent connections.This is perfect for small scal applications.

2.Standard PHP Libraries
Every OOP language comes with some built-in classes, and PHP is no exception. PHP 5 introduces the Standard PHP Library (SPL), which provides a number of ready-made classes and interfaces. As of version 5.1, depending upon how PHP is configured, all in all, there are well over 100 built-in classes and interfaces — a healthy increase from the number available in version 5.0.

Having ready-made objects speeds up development, and native classes written in C offer significant performance advantages. Even if these built-in classes don’t do exactly what you want, they can easily be extended to suit your needs.

3.Exception Handling
A try block encloses code that may cause an error. If an error occurs, it is thrown and caught by a catch block. The advantage of exceptions over errors is that exceptions can be handled centrally, making for much cleaner code. Exceptions also significantly reduce the amount of error-trapping code you need to write, which offers welcome relief from an uninspiring task

4.Few Enhancements in OOPS
In previous versions of PHP there was no support for data protection, meaning that all elements of a class were publicly accessible. This lack of access modifiers was probably the biggest disincentive to using objects in PHP 4.

Popularity: 13% [?]

Advantage of PHP Over Other Scripts

1.PHP should be embedded within html tags, It offers improved security, quicker response,transparency to the end user
2.Unlike other programming languages, PHP is cross platform.
3.PHP is open source
4.It offers Quick and excellent connectivity to almost all the RDBMS including Mysql,Oracle.
5.It runs with Apache or Netscape Server on all the platforms.
6.It also Offers integration with various external libries, so that developer can do thing like importing flash images, parsing XML files.
7.It is easy to migrate other Scripting language to PHP.

Popularity: 14% [?]

Globus-2.4.3 Installation guide

Let see how to install globus-2.4.3 middleware.

Prerequsites for installing globus

Prerequisite

 Before starting the Installation of Globus Toolkit on different hosts following is the prerequisite:

 
• SUDO permission is required.
 
• Checking of the Operating System with kernel version.
                 
                  #More /etc/redhat-releases
 
• Verification of the GPT version. It should be gpt3.0.1 for installing Globus Toolkit 2.4.3.
 
• Checking of the mpich version.
 
• Verification of the Version of Gnu C Compiler (gcc)
 
                  #gcc –version
 
• Verification of the version of Perl. It should be above 5.0.
 
                  #perl –version
 
• Create the directory ‘globus-2.4.3’ where to install the Globus Toolkit.
 
                  #Mkdir globus-2.4.3
 
• Create the directory ‘gpt-3.0.1’ where to install the GPT.
                 
                  #Mkdir gpt-3.0.1
 
• Setting of the Globus installation path using export.
     
                  #Export GLOBUS_LOCATION=<Globus_Location>
 
• Setting of the GPT installation path using export.
 
                  #Export GPT_LOCATION=<Gpt_Location>
 
• Unsetting of the LANG variable from the environment. This is optional as depends on the OS.
 
                  #Unset LANG
 
• Setup NTP sync. This is required for globus. If the date mismatches, then the globus will throw error.
 
                        #ntpdate –u <IP_addr>
Installation
 
To install globus-2.4.3, we need GPT (Grid-Packaging-Toolkit) version – 3.0.1. GPT will be installed and with the help of GPT will be installing globus-2.4.3
 
Installing of GPT package
 
Unzip and untar the file:
 
#tar –xvzf gpt-3.0.1-src.tar.gz
 
This will create a directory named “gpt-version/”. cd into the directory:
 
#cd gpt-3.0.1
 
Run build_gpt. This will install GPT into $GPT_LOCATION.
 
./build_gpt
Installation of Globus Toolkit bundles
 
Install the bundles by using the “gpt-build” program included in the newly built GPT.
 
# $GPT_LOCATION/sbin/gpt-build -verbose <Globus-bundles> <flavor>
 
Below is an example of Globus bundle compilation on Linux.
 
# $GPT_LOCATION/sbin/gpt-build -verbose globus-data-management-client-2.2.4-src_bundle.tar.gz gcc32dbg
 
# $GPT_LOCATION/sbin/gpt-build -verbose globus-data-management-server-2.2.4-src_bundle.tar.gz gcc32dbg
 
# $GPT_LOCATION/sbin/gpt-build -verbose globus-data-management-sdk-2.2.4-src_bundle.tar.gz mpicc32mpi gcc32dbg
 
# $GPT_LOCATION/sbin/gpt-build -verbose globus-information-services-client-2.2.4-src_bundle.tar.gz gcc32dbg
 
# $GPT_LOCATION/sbin/gpt-build -verbose globus-information-services-server-2.2.4-src_bundle.tar.gz gcc32dbg
 
# $GPT_LOCATION/sbin/gpt-build -verbose globus-information-services-sdk-2.2.4-src_bundle.tar.gz mpicc32mpi gcc32dbg
 
# $GPT_LOCATION/sbin/gpt-build -verbose globus-resource-management-client-2.2.4-src_bundle.tar.gz gcc32dbg
 
# $GPT_LOCATION/sbin/gpt-build -verbose globus-resource-management-server-2.2.4-src_bundle.tar.gz gcc32dbg
 
# $GPT_LOCATION/sbin/gpt-build -verbose globus-resource-management-sdk-2.2.4-src_bundle.tar.gz mpicc32mpi gcc32dbg
 
 
Run the postinstall command
 
Execute the post-install script after all bundles’ get installed
 
# $GPT_LOCATION/sbin/gpt-postinstall
 

Run the postinstall command

 

Execute the post-install script after all bundles’ get installed

 

# $GPT_LOCATION/sbin/gpt-postinstall

 

Install the GARUDA-CA setup hash tar ball

 # $GPT_LOCATION/sbin/gpt-build -install –only globus_simple_ca_11e04bd9_setup-0.12.tar.gz gcc32dbg

 

Run the postinstall

# $GPT_LOCATION/sbin/gpt-postinstall

 Run the simple-CA setup distribution package with the default option

 #$GLOBUS_LOCATION/setup/globus_simple_ca_11e04bd9_setup/setup-gsi –default

 Now Globus has been installed completely.

 Globus Configuration

 gsigatekeeper – GRAM

 Create a file /etc/xinetd.d/globus-gatekeeper with the following contents

 
service gsigatekeeper

{

socket_type = stream

protocol = tcp

wait = no

user = root

env = LD_LIBRARY_PATH=$GLOBUS_LOCATION/lib

server = $GLOBUS_LOCATION/sbin/globus-gatekeeper

server_args = -conf $GLOBUS_LOCATION/etc/globus-gatekeeper.conf

disable = no

env = GLOBUS_TCP_PORT_RANGE=40000,40500

}

gsiftp - GridFTP

Create a file /etc/xinetd.d/gsiftp with the following contents:

 service gsiftp

{

instances = 1000

socket_type = stream

wait = no

user = root

env = LD_LIBRARY_PATH$GLOBUS_LOCATION/lib

server = $GLOBUS_LOCATION/sbin/in.ftpd

server_args = -l -a -G /opt/gt2

log_on_success += DURATION USERID

log_on_failure += USERID

nice = 10

disable = no

env = GLOBUS_TCP_PORT_RANGE=40000,40500

}

 Add services to /etc/services

 Add the following the services in

 gsigatekeeper             2119/tcp                     # Globus Gatekeeper

gsiftp                            2811/tcp                     # Globus GridFTP

 Start the service

 #service xinetd restart

Obtaining Certificates

Host Certificates

 This host certificates should be generated for each Resource Providing site. This should be generated as root.

 Generate host certificates

 # grid-cert-request -service host –host <FQDN of Host>

         ·   This all certificates will be placed in /etc/grid-security/

·   Once it is signed you will get hostcert.pem which you need to put in the /etc/grid-security/ directory

  User cerificate
 
 #grid-cert-request -cn san 
 
 

Creation of Grid-Mapfile

 Create the file /etc/grid-security/grid-mapfile will consists of 2 entries. One is DN and other is local user account. This is for mapping the remote user to the local user account.

 #vim /etc/grid-security/grid-mapfile

 “/C=IN/O=galore/OU=linuxgalore/OU=linuxgalore.com/CN=san” san

Testing Globus

GRAM Testing

 #telnet localhost 2119


Generate Proxy
$grid-proxy-init


Authentication
$globusrun –a –r <FQDN>

Job Submission


#globus-job-run <FQDN> /bin/date

GridFTP

#telnet localhost 2811

 Copy files using gsiftp

$globus-url-copy gsiftp://<FQDN>/~/.bashrc gsiftp://<FQDN>/tmp/filename

 

Popularity: 59% [?]

Basic Linux Commands

The most important to be known for using LINUX is the commands. Below is some of the Basic Linux Commands.

* - Be Careful while using this Command

File Commands

ls — for directory listing

ls -al — Formatted Listing with hidden files

cd <dir> — Change directory to <dir>

cd — Change to home directory

pwd — shows the current working directory

mkdir <dir> — create a directory <dir>

rm <file> — Delete <file>

rm -r <dir> — delete directory <dir>

rm -f <file> — force remove <file>

rm -rf <dir> — force remove directory <dir> *

cp <file1> <file2> — copy <file1> to <file2>

cp -r <dir1> <dir2> — Copy <dir1> to <dir2>, creates dir2 if it doesn’t exist.

mv <file1> <file2> — Rename or Move <file1> <file2>, if file2 is an existing directory, moves <file1> into directory <file2>

ln -s <file1> <link> — Create symbolic <link> to <file1>

touch <file> — Create an empty file.

cat > <file> — Pleaces standard input into file

more <file> — Output the contents of file

read <file> — Output the first 10 lines of file

tail <file> — Output the last 10 lines of file

tail -f <file> — Output the contents of file as it grows, starting with the last 10 lines

Process Management
ps — Display your currently active processestop — Display all running processeskill <pid> — Kill process id pidkillall <proc> — Kill all processes named <proc> *bg — Lists stopped or background jobs; resume a stopped job in the background

fg — Brings the most recent job to foreground

fg n — Brings job n to the foreground

File Permissions
chmod octal file — Change the permissions of file to octal, which can be found separately for user, group, and world by adding:

  • read (r)
  • write (w)
  • execute (x)

Examples:

chmod 777 <file> — read, write, execute for all of a <file>

chmod 755 <file> — rwx for owner, rx for group and world of a <file>

chmod -R 755 <dir> — rwx for owner, rx for group and world of a <dir>

For more options, see man chmod.

SSH

ssh user@host — Connect to host as user

ssh -p port user@host — Connect to host on port

port as user

ssh-copy-id user@host — Add your key to host for user to enable a keyed or passwordless login

Example:

ssh guest@172.168.60.25 — if the Hostname of the remote machine is not known/Entry not in the Hosts List(/etc/hosts).

ssh guest@<remote_hostname>– If the Hostname of the remote machine is known.

Searching

grep pattern files — Search for pattern in files

grep -r pattern dir — Search recursively for pattern in dir

command | grep pattern — Search for pattern in the output of command

locate file — Find all instances of file.

System Info

date — Show the current date and time

cal — Show this month’s calendar

uptime — Show current uptime

w — Display who is online

whoami — Who you are logged in as

finger user — Display information about user

uname -a — Show kernel information

cat /proc/cpuinfo — CPU information

cat /proc/meminfo — Memory information

man <command> — Show the manual for command

df — Show disk usage

du — Show directory space usage

free — Show memory and swap usage

whereis <app_name> — Show possible locations of app (ex: whereis ls)

which <app_name> — Show which app will be run by default

Compression

tar -cvf <file.tar> <files> – create a tar named <file.tar> containing <files>

tar -xvf <file.tar> — Extract the files from <file.tar>

tar -cvzf <file.tar.gz> <files> — Create a tar with Gzip compression

tar -xvzf <file.tar.gz> — Extract a tar using Gzip

tar -cvjf <file.tar.bz2> — Create a tar with Bzip2 compression

tar -xvjf <file.tar.bz2> — Extract a tar using Bzip2

gzip <file> — Compresses file and renames it to <file.gz>

gzip -d <file.gz> — Decompresses <file.gz> back to <file>

Network

ping <host/IP> — Ping host/IP and output results

whois domain — Get whois information for domain

dig domain — Get DNS information for domain

dig -x host — Reverse lookup host

wget <file> — Download file

wget -c <file> — Continue a stopped download

Installation

Install from source:

./configure

make

make install

dpkg -i pkg.deb – install a package (Debian)

rpm -Uvh pkg.rpm – install a package (RPM)

For Detailed: http://blog.linuxgalore.com/2007/11/27/how-to-install-a-software-in-linux-from-source/

Shortcuts

Ctrl+C — Halts the current command

Ctrl+Z — Stops the current command, resume with fg in the foreground or bg in the background

Ctrl+D — Log out of current session, similar to exit

Ctrl+W — Erases one word in the current line

Ctrl+U — Erases the whole line

Ctrl+R — Type to bring up a recent command

!! — Repeats the last command

exit — Log out of current session

Keep checking for more updates on this…………… and leave your comments.

Popularity: 73% [?]

Zombie !!! How to Kill Zombie Processes ???

“On Unix and Unix-like computer operating systems, a zombie process or defunct process is a process that has completed execution but still has an entry in the process table, this entry being still needed to allow the process that started the zombie process to read its exit status. The term zombie process derives from the common definition of zombie—an undead person. In the term’s colorful metaphor, the child process has died but has not yet been reaped.” as stated in wikepedia article.

So u shud be now thinking of how to know which are zombie processes as there are plenty of processes running by system !!!

Here is the procedure to check which are the zombie processes. U can use the below commands for finding:

Use top command which shows how many zombie process are running and which are they can be get by seeing the STAT column which reads a ‘Z’

Or

Use the ps command as shown below which will display the PID:

# ps aux | awk '{ print $8 " " $2 }' | grep -w Z

Output:

Z 8751

Now you can kill these process using the PID:

kill -9 8751

Popularity: 74% [?]

Close
E-mail It
Blogarama - The Blog Directory Directory of Computers/Tech Blogs Add to Technorati Favorites Find Blogs in the Blog
Directory Software blogs Top Blogs British Blog Directory. FindingBlog - Blog Directory blog search directory blog sweet blogoriffic.com Top100 Bloggers - Top Blog Directory - Blog Top list Blogs Blog Directory 5starblogs Age less highclassblogs.com kmax.ws Blog Directory & Search engine Blogs Directory All-Blogs.net directory Webfeed (RSS/ATOM/RDF) registered at http://www.feeds4all.com Business Blogs & Directory LS Blogs

Rate Me on BlogHop.com!
the best pretty good okay pretty bad the worst help?

-->