free and open source software (foss) · expert meeting on free and open source software: policy and...

Post on 13-Oct-2020

4 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

1/67

ehesham.cu.edu.egehesham@cu.edu.eg

Free and Open Source Software (FOSS)

2/67

3/67

4/67

Agenda• Introduction.• FOSS World Wide.• Indicators.• Apache• PHP (What/Why/How)• MYSQL (What/Why/How)• FOSS for Africa

5/67

6/67

7/67

8/67

9/67

10/67

11/67

UNCTAD Expert Meeting on Free and Open Source Software:

Policy and Development Implications

Session 3: Government Usage and Policy23 September 2004

“Technological Neutrality in Software Procurement: The Soundest IT and Procurement Policy”

Robert Kramer, VP of Public PolicyComputing Technology Industry Association

Executive Director, Initiative for Software Choice

12/67

• Global ReachØ 16,000 Corporate Members in 102 countries, Ø Over 4,000 institutional members and 8,000 IT professional

(individual) membersØ 85%+ of our corporate members are SMEs

• InclusiveØ Members from major industry markets, representing all in the IT

industry; Hardware; Software; Telecommunications; IT Services; IT training;

Ø Corporations and not-for-profit organizations/ Schools, Community Colleges and Universities/government partnerships

• EffectiveØ Largest vendor-neutral provider of IT training certifications,

including Linux+Ø Successful track record of collaboration and facilitation of global

standardsØ Industry driven through members ‘cornerstone’ process

CompTIA: A Global ITC Trade Association

13/67

London

Amsterdam Düsseldorf

Tokyo

Singapore

JohannesburgSydney

Toronto

International Offices

Chicago, HQWashington DC

Sao Paulo

Hong Kong

BrusselsOttawa

14/67

FOSS on the Internet• In use on over 5.5 million domains

• Market share of Internet webservers– Apache : 60%– IIS servers (ASP) : 30%

(from http://www.netcraft.com/survey/)

F:\courses2004-2005\InternetTech\webpage\h.htm

15/67

16/67

17/67

18/67

Apache

Apache: “Industrial strength” HTTP/1.1 compliant web server

• Highly configurable• Implements many features in addition to its core

functionality (e.g., security/access control, virtual hosting, CGI script execution, …)

• Extensible with third-party modules (e.g., servlet engine, security, WebDAV, …)

19/67

Modules for Apache• mod-ssl (secure HTTP communication

between a browser and a web server): – Provides strong cryptography for privacy– Provides use of digital signatures for data integrity– Allows server and/or client authentication– Integrates SSL/TLS protocols w/ Apache (via

OpenSSL)• mod-dav (publishing into the web

environment):– Provides server support for WebDAV (web-based

distributed authoring and versioning)– Implements WebDAV extensions to HTTP 1.1

20/67

APACHE

bin conf libexeclogs

htdocs securedocs

(more)

Apache is:•Full-featured and extensible•Efficient•Robust•Secure (at least, more secure than other servers)•Up to date with current standards•Open source•Free

21/67

Why PHP ?• FOSS technology (Low cost)• High performance• Interfaces to many different database

systems• Built-in libraries for many common Web

tasks• Ease of learning and use• Portability• Availability of source code

22/67

• Netcraft Statistics– 11,869,645 Domains, 1,316,288 IP Addresses

(Hosting + domain name) cost about 110$/year

About 1.3 G$ …

23/67

CLIENT

WEB SERVER

HTTP Request(url)

<HTML><?php PHP code ?></HTML>

Gets Page

<HTML><B>Hello</B></HTML>

Interprets the PHP codeServer response

Browser createsthe web page

Hello

24/67

What is a PHP script ?• Code embedded within tags : jumping

between HTML and PHP (like ASP and Cold Fusion)

• No heavy code to output HTML (as needed in Perl or C)

• PHP code is enclosed in special start and end tags

<html><head><title>Example</title></head><body><?php

echo "Starting to write a PHP script"; ?></body></html>

HTML tags

PHP code

HTML tags

25/67

PHP is server-sideWhat the web server sees (and executes on-the-fly)<H1>Greetings</H1><P ALIGN="center"><?phpprint ”Hello GEN!";?></P><HR>

What the web browser receives (it never sees PHP code)<H1>Greetings</H1><P ALIGN="center">Hello GEN!</P><HR>

=> it is not possible to copy the source code from the web browser

26/67

Three-tier architecture

Web brow

ser

Presentation tier

Database server

Data storage tier

Web server

API

CG

IPH

PJSP

Business Logic tier

ASP

CFThin client

Thick server

27/67

System requirements• Operating systems :Linux, many Unix

variants (HP-UX, Solaris and OpenBSD, ...), Microsoft Windows, Mac OS X, RISC OS, …

• Web servers : Apache, Microsoft Internet Information Server, Personal Web Server, Netscape, iPlanet, Oreilly Website Pro server, Caudium, Xitami, OmniHTTPd, Zeus, ...

• Databases : Oracle, Informix, Sybase, InterBase, PostgreSQL, MySQL, ODBC, ...

28/67

Get the software FOSS⇒http://www.h-elmahdy.net/graphics/htools.htm 14.3MB⇒http://www.h-elmahdy.net/graphics/books.htmOr from the CD distributed

• After uploading and unzipping you get:

• Double click on this file• It takes about five minutes.• You will get this:

How to install PHPTraid ? (1/4)

29/67

How to install PHPTraid ? (2/4)• Get the clean run of the Apache, like this

Not like this:

• Your folders in the C:\ drive will have:• Getting your IP address, from DOS

Command Prompt, type ipconfig /allif you are using the free Internet

30/67

How to install PHPTraid ? (3/4)Or use the TCP/IP properties

Now, you are ready to use your computer as a web server:

In the Internet Explorer, in the address bar, you can use

Server is a process, Client is another process. Both of them can be run on the same computer

31/67

How to install PHPTraid ? (4/4)Now, everybody can see you in the internet at your IP address

All accounts to be put under this folder

You have to name the first file index.html of the main account and for each account

32/67

First PHP (to pass parameters)

33/67

First PHP (to get parameters)

34/67

Second PHP (Write to a file)

35/67

Third PHP (Content of a file)

36/67

Advantages of PHP• Easy to learn… availability of source• Free and open development

(independence, security, community)• Native database connectivity (mysql,

ODBC, …)• Availability for a variety of platforms

(Windows, UNIX, Linux, Mac OS, RISC)• Simple but powerful, thin client• Many functions (databases, mail server,

PDF, …)

37/67

Disadvantages of PHP• Immature language

• Mixing of HTML and program code : disorganization (application and layout not always well separated), bug prone

• Going to the server every time

• PHP programs are compiled at execution time, and they are distributed in clear text, so it needs more time and effort to be protected

• Can not be integrated with non-based applications

38/67

MySQL• MySQL is a very popular, open source

database.• Officially pronounced “my Ess Que Ell” (not my

sequel).• Handles very large databases; very fast

performance.• Why are we using MySQL?

– Free (much cheaper than Oracle!)– Each one can install MySQL locally.– Easy to use Shell for creating tables,

querying tables, etc.– Easy to use with Java JDBC

39/67

§ SQL provides a structured language for querying/updating multiple databases.

§ The more you know SQL, the better.§ The most important part of SQL is learning to

retrieve data.§ selecting rows, columns, boolean operators, pattern

matching, etc.

§ Keep playing around in the MySQL Shell.

40/67

Adjusting MySQL shell path

41/67

Running MySQL shellRunning the MySQL

Run Command Prompt,

then type mysql

42/67

MySQL line commandsList all databases on the sql server:

To delete a db:

Create a db:

43/67

MySQL line commandsUse a db:

Create a table:

Loading data from a file:

44/67

PHP program uses MySQL

45/67

PHP program uses MySQL

46/67

PHP program uses MySQL

47/67

PHP program uses MySQL

48/67

49/67

50/67

51/67

52/67

53/67

54/67

54/35

top related