slides - bits, pilani - the official homepage

Post on 10-May-2015

2.996 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 1

Lecture 01

IntroductionBackground SurveyCourse Overview

Jargon BusterIntro to LAMP

Filesystem Hierarchy StandardAbsolute & Relative Path

Shell Commands

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 2

Ajay Rungta Project Assistant, SDET Unit / CSIS Group

Webmaster, BITS Website

Pursuing M. E. in Software Systems

Software Engineer, Infosys [2 years]

M. Sc. (Hons.) Physics, BITS Pilani [Class of 2006]

rungta.ajay@bits-pilani.ac.in

3258 [IBM Lab]

Enough of me, lets talk about you now…

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 2

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 3

LAMP Linux Apache

HTMLCSS JavaScriptPHP

Fundamentals Session / Cookies PEAR PHP Frameworks

MySQL RDBMS SQL Queries DB Connections

XMLAJAXPrithvi AccountDesktop / LaptopExpectation

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 4

Details

Tue & Thu 5:30 to 7 pm, 5101 [LTC]

http://sdetu/csd/courses/CSDL0101/

http://groups.google.com/group/lamp_csd_bitspilani/

CCH: Mon 5.30 to 6.30 pm, 3258 [IBM Lab]

rungta.ajay@bits-pilani.ac.in

Handout

Download Handout soft copy from course website

Likely to change in time

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 4

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 5

Lectures

Sets pace of Course

Highlights important points

Demo/Sample Programs presented [Ensure that you

understand them fully]

Course Material

Either on course website or IntraBITS

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 5

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 6

Evaluation

Quiz – 4 [10%]

Labs

Practice & Evaluative Labs [20%]

Each 60 Min

Date, Time & Venue – TBD

Assignments/Projects – Take Home [20%]

Submission Dates – 1st Oct, 2009 & 5th Nov 2009

Mid Sem– 12th Oct 2009, Monday [90 Min][20%]

End Sem– 21st Nov 2009, Saturday [120 Min][30%]

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 6

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 7

TB1: Timothy Boronczyk, Elizabeth Naramore, Jason Gerner, Yann Le Scouarnec, Jeremy Stolz, Michael K. Glass: Beginning PHP6, Apache, MySQL Web Development, Wrox 2009

TB2: W. Jason Gilmore: Beginning PHP & MySQL - From Novice to Professional, Apress, 3rd Edition, 2008

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 8

Linux

Fundamentals

File Handling Commands

Shell and vi

Apache

Configuration

Files Hierarchy

User Webpages

Virtual Hosts and aliases

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 8

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 9

MySQL

MySQL Databases & Tables

Value Types

SQL Queries

PHP

Fundamentals

Forms, Sessions, Cookies

AJAX

PEAR and PHP Frameworks

Security8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 9

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 10

Technocrat Era: Programmers serving programmers

Early Business Era: Programmers attempt to serve

others

Late Business Era: Programmers and artists meet and

do battle

Product Design Era: Can programmers and artists

learn to work together?

Lead users

*Source: http://www.lostgarden.com/2006/02/software-developments-evolution.html

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 10

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 118-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 11

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 128-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 12

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 138-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 13

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 148-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 14

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 15

A group of users that solves a difficult program far ahead of the mass market

The first was the game industry

The second were companies like Apple

The third were web design companies

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 15

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 16

Free and open source softwareUsed to run dynamic websites or servers

Linux – the Operating System

Apache - the Web Server

MySQL – the Database Management System

PHP – the server side scripting language

LAMP - Perl, PHP or Python

Coined by Michael Kunze in an article in German

computing magazine c’t in April 1998**Link http://www.heise.de/kiosk/archiv/ct/1998/12/230_kiosk

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 16

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 17

Open source doesn't just mean access to the source code.

Distribution must comply with the following:

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 17

Free Redistribution

Source Code

Derived Works

Integrity of The Author's

Source Code

No Discrimination Against

Persons or Groups

No Discrimination Against Fields of

Endeavor

Distribution of License

License Must Not Be Specific to a

Product

License Must Not Restrict Other Software

License Must Be Technology-Neutral

*Source: http://www.opensource.org/docs/osd

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 18

Unix-like OS based on Linux kernelWritten in 1991 by Linus TorvaldsDeveloped on Minix using the GNU^ C compilerAnnounced on 25 Aug ‘91 on Usenet newsgroup

”comp.os.minix.”$

Kernel – Central Component

Apache HTTP Server

X Window System – GUI

Desktop Environments – GNOME, KDE, etc

Utilities and Libraries, etc$Announcement http://groups.google.com/group/comp.os.minix/msg/b813d52cbc5a044bPronounce Linux http://groups.google.com/group/comp.os.linux/msg/53a76cbbbcb6e1c8^GNU's Not Unix http://www.gnu.org/*Why Tux? http://lkml.indiana.edu/hypermail/linux/kernel/9605/0855.html

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 18

Tux*

Linus Torvalds

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 19

Developed and maintained under Apache Software Foundation

1st version was created by Robert McCool known as NCSA^ HTTPd

Became first web server to surpass the 100 million web site milestone in Feb ‘09*

Served over 46% of all websites & over 66% of the million busiest as of Aug ‘09#

Why Apache? http://httpd.apache.org/docs/1.3/misc/FAQ.html#name Apache Software Foundation http://www.apache.org/Apache HTTP Server Project http://httpd.apache.org/^National Center for Supercomputing Applications http://www.ncsa.illinois.edu/*http://news.netcraft.com/archives/2009/02/18/february_2009_web_server_survey.html#http://news.netcraft.com/archives/2009/08/31/august_2009_web_server_survey.html

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 19

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 20

Relational Database Management System It is My Structured Query LanguageRuns as a server providing multi-user access to a

number of databasesEg - Flickr, Facebook, Wikipedia, Google (not for

searches), Nokia, YouTube, etcOriginally developed by Michael

Widenius and David Axmark beginning in 1994Created by MySQL AB [Founded in 1995]Sun Microsystems acquired MySQL AB in 2008Oracle deal to acquire Sun Microsystems is open

*MySQL http://www.mysql.com/

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 20

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 21

It is PHP: Hypertext Preprocessor

Scripting language to produce dynamic web pages

Created by Rasmus Lerdorf in 1995

Succeeds an older product, named PHP/FI –

Personal Home Page/ Form Interpreter

Now managed by The PHP Group

*PHP http://www.php.net/

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 21

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 22

Directory Description

/ Primary hierarchy root & root directory of the entire file system hierarchy

/bin Essential command binaries for all users, e.g., cat, ls, cp.

/boot Static files of the boot loader e.g., kernels, initrd; often separate partition

/dev Essential Device files /dev/ttyX, /dev/hdaX

/etc Host-specific system-wide configuration files /etc/bashrc

/home Users' home directories - saved files, personal settings, etc

/lib Essential shared libraries and kernel modules

/media Mount point for removeable media such as CD-ROMs

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 22

Defines the main directories and their contents in most software systems

using UNIX and Unix-like operating systems

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 238-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 23

Directory Description

/mnt Mount point for mounting a filesystem temporarily

/opt Add-on/Optional application software packages

/proc Virtual filesystem documenting kernel and process status as text files, e.g., uptime, network

/root Home directory for the root user

/sbin Essential system binaries

/srv Data for services provided by this system

/tmp Temporary files. Often not preserved between system reboots.

/usr Secondary hierarchy for read-only user data

/var Variable files—files whose content is expected to continually change during normal operation of the system—such as logs, spool files, and temporary e-mail files

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 24

User Program

Set of instructions written by the user

Process

Instance of a program under execution

Shell

Provides a processing environment for the user

programs

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 24

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 25

The Absolute Path

The entire pathname starting from root(/)

Eg - /home/students/grad/h2008123The Relative Path

The path relative to your present working

directory . – Current Directory .. – Parent Directory in hierarchy ~ - User Home Directory ~username – username Home Directory

Eg – cd, cd ., cd .., cd ../../, cd ~, cd ~user8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 25

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 26

Man Pages - Applications, utilities, and shell prompt commands usually have corresponding manual pages

Man Pages show the reader the available options and values of file or executable

Eg man whoami

Word Search in Man Pages

man –k <word>

apropos <word>

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 26

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 27

Left Blank Intentionally

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 27

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 28

Left Blank Intentionally

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 28

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 29

Questions

8-Sep-09 Ajay Rungta, CSD, BITS Pilani LAMP 29

top related