PHPUnit Installation using PEAR

PHPUnit Installation using PEAR


Installing PHPUnit


PHPUnit should be installed using the PEAR Installer. This installer is the backbone of PEAR, which provides a distribution system for PHP packages, and is shipped with every release of PHP

The PEAR channel (pear.phpunit.de) that is used to distribute PHPUnit needs to be registered with the local PEAR environment. Furthermore, a component that PHPUnit depends upon is hosted on the Symfony Components PEAR channel (pear.symfony-project.com).


#> pear channel-discover pear.phpunit.de
#> pear channel-discover components.ez.no
#> pear channel-discover pear.symfony-project.com


This has to be done only once. Now the PEAR Installer can be used to install packages from the PHPUnit channel:

Check the List of Packages in Remote PHPUnit.
#> pear remote-list -c phpunit
Install PHPUnit Using this command
#> pear install phpunit/PHPUnit
Check the Installed PHPUnit Packages
#> Pear list -c phpunit
Check PHPUnit_Selenium installed in that list.


After the installation you can find the PHPUnit source files inside your local PEAR directory; the path is usually /usr/lib/php/PHPUnit. Or /usr/local/lib/php/PHPUnit


If you are facing installation error while follow the above steps?
Then Try this.


pear update-channels
pear install --onlyreqdeps phpunit/PHPUnit.

Ant Instalaltion

Ant Installation in Linux:

Download Ant from http://ant.apache.org/bindownload.cgi

Unzip the ant and rename the folder as ant

move that folder in to /usr/local/

Check the JDK 1.6 installed in your machine by

#> java -version

Set path in the .bash_profile

Open the file /root/.bash_profile and add the following codes:

# vim /root.bash_profile

export ANT_HOME=/usr/local/ant

export JAVA_HOME=/opt/java/jdk1.6

export PATH=${PATH}:${ANT_HOME}/bin

#> ant -version

it will show the current installed version.



Ant Installation in Windows:

Download Ant from http://ant.apache.org/bindownload.cgi

Unzip the ant and rename the folder as ant

move that folder in to c:\

Check the JDK 1.6 installed in your machine by

#> java -version

Right click My Computer icon

* Choose properties

* Choose Advanced Tab

* Choose Environment Variables Button

* In the System Variables, click New Button

* Give the Variable Name:ANT_HOME Give the Value: C:\Ant

* Click OK


* Then Edit the PATH variable, at the end of the line add this: %ANT_HOME%\bin;

* Click OK to finish

In the command prompt type

ant -version

you will get the result like this

Apache Ant version X.x.X compiled at XXXX.






Introduction to OpenSource Technology:

Generically, opensource refers to a program in which the source code is available to the general public for use and/or modification from its original design free of charge, in which programmers improve upon the code and share the changes within the community.


some of the open source softwares: Linux, java, php, MySQl, Open Office, Apache Tomcat, Mozilla, Python, Eclipse, etc...


Here we are going to see one of the most popular open source software called Linux.

Introduction to Linux:


Linux:
  • Unix-like operating system.

  • open source development

  • Basically it is a server based operating system

  • free software

  • Anyone to use, modify, and redistribute software freely.
Some of the Linux distributions:
Red Hat Enterprise, SUSE, Fedora, CentOS, Debian, Gentoo, Knoppix, Mandriva, MEPIS, Slackware, Ubuntu,

UNIX/Linux History see the photo album
  • First version of UNIX created in Bell Labs – 1969
  • Created by Ken Thompson and Dennish Ritchie.
  • Linus Trovalds a Finnish college student Created Linux Kernel in 1991

Some of the Unix-like operating systems:

A/UNIX, AIX, BSD, FreeBSD, GNU, HP-UNIX, IRIX, Linux,

Mac OS, X Minix, NetBSD, NEXTSTEP, OpenBSD, Plan 9, QNX ,

SCO, OpenServer, Solaris, System, V Tru64, Xenix,

History:
  • In 1983, Richard Stallman founded the GNU Project, with the goal of developing a complete Unix-like operating system composed entirely of free software. By the beginning of the 1990s, GNU had produced or collected most of the necessary components of this system—libraries, compilers, text editors, a Unix-like shell—except for the core component kernel.
  • Meanwhile, in 1991, another kernel was begun as a hobby by Finnish university student Linus Torvalds
  • Torvalds originally used Minix on his own computer, a simplified Unix-like system written by Andrew Tanenbaum for teaching operating system design. However, Tanenbaum did not permit others to extend his operating system, leading Torvalds to create a replacement for Minix.
Features of Linux:
  • Reliability,
  • Multi-tasking,
  • Multi user,
  • Network application capabilities,
  • Most of the scientific software runs on UNIX/LINUX,
  • Unix/LINUX is rich in commands and software,
  • Development capabilities,
  • Graphical user interface,
  • Hardware support,
  • comes with a built set of compilers/debug tools,
  • More secure,
  • Virtual console (multiple non GUI logins ie. 6),
  • Multiple Desktop (shared workspace),
  • Both text mode and GUI logins,
  • Everything is a file (including hardware),
  • Shell scripts,
  • Small single purpose programs,
  • Free browsers, office packages,
  • Command line help,
  • Easy installation,
  • In built driver programs.

Is LINUX really UNIX?

Well, yes and no:
Yes, because it has essentially the same look and feel like any UNIX operating System.and it offers the ability to run nearly any program that runs on UNIX systems (through API conventions such as POSIX, etc..).

No, because the heart of the system (kernel) has a lot of new features that go beyond the classical design philosophy of UNIX kernels.

FILE SYSTEM:
  • It is a method for storing and organizing computer files and the data.

  • It is used to make it easy to find and access the files.
Some of the file Systems are:
  • Windows – FAT32,NTFS,
  • Linux – EXT 2, EXT 3.
  • CDROM – ISO 9660
File Structure and Directory Structure:
" / "


it is the main or root directory (can access by administrator privilege user)


sub directories of " / "


Root, Home, Bin, Sbin, dev, etc, mnt, tmp, opt, usr, var, lib, boot,

Each subdirectories have some special purpose



root: Super User Directory

home: Contains user Information's

Bin: Binary Executable file (ie.User Commands)

sbin: Binary Executable file (Super User Commands)

dev: Device Files which contains driver files

etc: System Configuration Files (Host name, IP Address, Gateways.

mnt: mount information like CD ROM, Floppy, etc

tmp: Temporary File

opt: Optional Third Party Packages

usr: User, Contains documents of services like DNS, web service

var: Contains LOG information (Time of logged in & out)

lib: Library Files

boot: Booting & Boot Loader Information's


Architecture of Linux OS:



What is Kernel?
The kernel is the central part in most computer operating systems which manages the system's resources and the communication between hardware and software components. It performs various operations like.
1. Process management

  • Multi-tasking

  • scheduling

2. Memory management (Allocate and delete memory for process),

3. Device management (control the Hardwares),

4. System calls:

It is a well defined programs to instruct the kernel to do various operations and exchange the

data between the kernel and the program.


Shell:

Shell is the interface between user and the kernel. It’s like command prompt.

Types of shells:

  • Bourne shell
  • BASH Shell (Bourne Again Shell)

  • C shell

  • K shell

LOGIN:

  • Text mode (CUI) login at virtual console (CTRL + ALT +F [ 1 - 6 ])

  • Graphical login (GUI) at CTRL + ALT + 7

login: root (for administrator login)

password: (should be minimum 6 letters)


File Permissions:

Linux File security:

every file and directory has permissions set, that determine who can access it

permissions are set for:


  • the owner of file (i.e.. current user)

  • the group members

  • all others

permissions that are set are called read, write, execute permissions.

To set the file permissions chmod command is used.
file permissions may be viewed using ls

$ ls –l filename

file type and file access permissions are symbolized by a 1, 0 character string.

click to see Large image


Linux Basic Commands:
Click here to see/download Basic Commands

If u have any doubts in the linux, open source, mail me to:

techsun10@gmail.com