SlideShare a Scribd company logo
A presentation on
web server
&
Database Server
1
What is a web server?
"Web server" can refer to hardware or software, or
both of them working together.
2
On the hardware side, a web server is a computer that
stores web server software and a website's component
files (e.g. HTML documents, images, CSS stylesheets, and
JavaScript files). It is connected to the Internet and
supports physical data interchange with other devices
connected to the web.
Hardware Side
3
On the software side, a web server includes several parts
that control how web users access hosted files, at
minimum an HTTP server. An HTTP server is a piece of
software that understands URLs (web addresses)
and HTTP (the protocol your browser uses to view
webpages). It can be accessed through the domain
names (like mozilla.org)of websites it stores, and delivers
their content to the end-user's device.
Software Side
4
At the most basic level, whenever a browser needs a
file which is hosted on a web server, the browser
requests the file via HTTP. When the request reaches
the correct web server (hardware), the HTTP
server (software) accepts request, finds the requested
document (if it doesn't then a 404 response is
returned), and sends it back to the browser, also
through HTTP.
5
6
To publish a website, you need either a static or a dynamic web
server.
A static web server, or stack, consists of a computer (hardware) with
an HTTP server (software). We call it "static" because the server
sends its hosted files "as-is" to your browser.
A dynamic web server consists of a static web server plus extra
software, most commonly an application server and a database. We
call it "dynamic" because the application server updates the hosted
files before sending them to your browser via the HTTP server.
7
What is a Database server?
A database server is a server which houses a database
application that provides database services to other
computer programs or to computers, as defined by
the client–server model.
8
Database management systems (DBMSs) frequently
provide database-server functionality, and some
database management systems (such as MySQL) rely
exclusively on the client–server model for database
access (while others e.g. SQLite are meant for using as
an embedded database)
9
Users access a database server either through a "front end" running on the
user's computer – which displays requested data – or through the "back end",
which runs on the server and handles tasks such as data analysis and storage.
Most database applications respond to a query language. Each database
understands its query language and converts each submitted query to server-
readable form and executes it to retrieve results.
For clarification, a database server is simply a server that maintains services
related to clients via database applications.
10
Why do most servers run on Linux OS?
11
There are many reasons that most servers
on the Internet run
Linux.
12
Software: Web servers, caches, FTP servers, web applications, DNS severs, and
on and on. They are available for Linux and Unix first and in a wide variety.
History: Windows was designed for the single user desktop, whereas Unix was
designed as a multiuser networked machine early on, even before Windows
existed.
Secondly, Unix was commercial, and the BSDs were tied up in court when
Linux rose to power.
13
Price: Linux systems are free. A company can grab a Linux variant and have an
industrial strength server for free. Sure, they can get support and such if they
pay - but the fact is many companies let support go.
Security: Linux was designed as a multiuser environment from the start, as was
Unix. Windows had to be retrofitted with multiuser support, and the user base
was used to their Windows system being all their own.
14
Top open source
web server
Software's
15
16
17
Top
Database
Software's
18
19
What is APACHE?
20
Apache
The Apache HTTP server is a software (or program) that runs in the background
under an appropriate operating system, which supports multi-tasking, and
provides services to other applications that connect to it, such as client web
browsers. It was first developed to work with Linux/Unix operating systems, but
was later adapted to work under other systems, including Windows and Mac.
The Apache binary running under UNIX is called HTTPd (short for HTTP
daemon), and under win32 is called Apache.exe.
Apache HTTP Server
Apache is the most popular web server (after which comes Microsoft's IIS) available. The
reasons behind its popularity, to name a few, are:
It is free to download and install.
It is open source: the source code is visible to anyone and everyone, which basically enables
anyone (who can rise up to the challenge) to adjust the code, optimize it, and fix errors and
security holes. People can add new features and write new modules.
It suits all needs: Apache can be used for small websites of one or two pages, or huge websites
of hundreds and thousands of pages, serving millions of regular visitors each month. It can serve
both static and dynamic content.
21
22
How Apache Works
Apache's main role is all about communication over networks, and it uses the
TCP/IP protocol (Transmission Control Protocol/Internet Protocol which allows
devices with IP addresses within the same network to communicate with one
another).
The TCP/IP protocol is a set of rules that define how clients make requests and
how servers respond, and determine how data is transmitted, delivered, received,
and acknowledged.
The Apache server is set up to run through configuration files, in which directives
are added to control its behavior. In its idle state, Apache listens to the IP
addresses identified in its config file (HTTPd.conf). Whenever it receives a request,
it analyzes the headers, applies the rules specified for it in the Config file, and
takes action.
23
General Structure
Regardless of the platform used, a hosted website will typically have four main directories: htdocs, conf, logs, cgi-
bin.
Htdocs: is the default Apache web server document directory, meaning it is the public directory whose contents are
usually available for clients connecting through the web. It contains all static pages and dynamic content to be
served once an HTTP request for them is received.
Conf: is the directory where all server configuration files are located. Configuration files are basically plain text files
where directives are added to control the web server's behaviour and functionality.
Logs: is the directory where server logs are kept, and includes Apache access logs and error logs. The Apache HTTP
Server provides a variety of different mechanisms for logging everything that happens on it.
cgi-bin: is the directory where CGI scripts are kept. The CGI (Common Gateway Interface) defines a way for a web
server to interact with external content-generating programs, which are often referred to as CGI programs or CGI
scripts. These are programs or shell scripts that are written to be executed by Apache on behalf of its clients.
24
What is MySQL?
25
MySQL is one of the most popular open source database management systems. It is widely
used in websites and web applications to store data. Irrespective of its extensive use and
acceptance by developers, MySQL requires backups when deployed in a production
environment.
MySQL is a relational database management system (DBMS or RDBMS) owned by Oracle.
MySQL
MySQL is based on client-server model. The core part of MySQL is MySQL Server . MySQL
Server is used to handle database commands .The MySQL Server is fast , scalable and easy
to use. MySQL can be used with different languages using certain connectors.
26
Installation of the
Apache Web Server
on Ubuntu
27
28
29
30
31
32
33
34
35
36
37
38
39
Install
MySQL Server
on Ubuntu
40
Install MySQL
Allow remote access
Start the MySQL service
Launch at reboot
Start the MySQL shell
Set the root password
View users
42
43
Create a database
44
Add a database user
45
46
Grant database user permissions
47
After running apache server
port 80 is listening for http request
48
49
50
51
52
53
54
55
56
57
58
59

More Related Content

Web Server And Database Server

  • 1. A presentation on web server & Database Server 1
  • 2. What is a web server? "Web server" can refer to hardware or software, or both of them working together. 2
  • 3. On the hardware side, a web server is a computer that stores web server software and a website's component files (e.g. HTML documents, images, CSS stylesheets, and JavaScript files). It is connected to the Internet and supports physical data interchange with other devices connected to the web. Hardware Side 3
  • 4. On the software side, a web server includes several parts that control how web users access hosted files, at minimum an HTTP server. An HTTP server is a piece of software that understands URLs (web addresses) and HTTP (the protocol your browser uses to view webpages). It can be accessed through the domain names (like mozilla.org)of websites it stores, and delivers their content to the end-user's device. Software Side 4
  • 5. At the most basic level, whenever a browser needs a file which is hosted on a web server, the browser requests the file via HTTP. When the request reaches the correct web server (hardware), the HTTP server (software) accepts request, finds the requested document (if it doesn't then a 404 response is returned), and sends it back to the browser, also through HTTP. 5
  • 6. 6
  • 7. To publish a website, you need either a static or a dynamic web server. A static web server, or stack, consists of a computer (hardware) with an HTTP server (software). We call it "static" because the server sends its hosted files "as-is" to your browser. A dynamic web server consists of a static web server plus extra software, most commonly an application server and a database. We call it "dynamic" because the application server updates the hosted files before sending them to your browser via the HTTP server. 7
  • 8. What is a Database server? A database server is a server which houses a database application that provides database services to other computer programs or to computers, as defined by the client–server model. 8
  • 9. Database management systems (DBMSs) frequently provide database-server functionality, and some database management systems (such as MySQL) rely exclusively on the client–server model for database access (while others e.g. SQLite are meant for using as an embedded database) 9
  • 10. Users access a database server either through a "front end" running on the user's computer – which displays requested data – or through the "back end", which runs on the server and handles tasks such as data analysis and storage. Most database applications respond to a query language. Each database understands its query language and converts each submitted query to server- readable form and executes it to retrieve results. For clarification, a database server is simply a server that maintains services related to clients via database applications. 10
  • 11. Why do most servers run on Linux OS? 11
  • 12. There are many reasons that most servers on the Internet run Linux. 12
  • 13. Software: Web servers, caches, FTP servers, web applications, DNS severs, and on and on. They are available for Linux and Unix first and in a wide variety. History: Windows was designed for the single user desktop, whereas Unix was designed as a multiuser networked machine early on, even before Windows existed. Secondly, Unix was commercial, and the BSDs were tied up in court when Linux rose to power. 13
  • 14. Price: Linux systems are free. A company can grab a Linux variant and have an industrial strength server for free. Sure, they can get support and such if they pay - but the fact is many companies let support go. Security: Linux was designed as a multiuser environment from the start, as was Unix. Windows had to be retrofitted with multiuser support, and the user base was used to their Windows system being all their own. 14
  • 15. Top open source web server Software's 15
  • 16. 16
  • 18. 18
  • 20. 20 Apache The Apache HTTP server is a software (or program) that runs in the background under an appropriate operating system, which supports multi-tasking, and provides services to other applications that connect to it, such as client web browsers. It was first developed to work with Linux/Unix operating systems, but was later adapted to work under other systems, including Windows and Mac. The Apache binary running under UNIX is called HTTPd (short for HTTP daemon), and under win32 is called Apache.exe.
  • 21. Apache HTTP Server Apache is the most popular web server (after which comes Microsoft's IIS) available. The reasons behind its popularity, to name a few, are: It is free to download and install. It is open source: the source code is visible to anyone and everyone, which basically enables anyone (who can rise up to the challenge) to adjust the code, optimize it, and fix errors and security holes. People can add new features and write new modules. It suits all needs: Apache can be used for small websites of one or two pages, or huge websites of hundreds and thousands of pages, serving millions of regular visitors each month. It can serve both static and dynamic content. 21
  • 22. 22 How Apache Works Apache's main role is all about communication over networks, and it uses the TCP/IP protocol (Transmission Control Protocol/Internet Protocol which allows devices with IP addresses within the same network to communicate with one another). The TCP/IP protocol is a set of rules that define how clients make requests and how servers respond, and determine how data is transmitted, delivered, received, and acknowledged. The Apache server is set up to run through configuration files, in which directives are added to control its behavior. In its idle state, Apache listens to the IP addresses identified in its config file (HTTPd.conf). Whenever it receives a request, it analyzes the headers, applies the rules specified for it in the Config file, and takes action.
  • 23. 23 General Structure Regardless of the platform used, a hosted website will typically have four main directories: htdocs, conf, logs, cgi- bin. Htdocs: is the default Apache web server document directory, meaning it is the public directory whose contents are usually available for clients connecting through the web. It contains all static pages and dynamic content to be served once an HTTP request for them is received. Conf: is the directory where all server configuration files are located. Configuration files are basically plain text files where directives are added to control the web server's behaviour and functionality. Logs: is the directory where server logs are kept, and includes Apache access logs and error logs. The Apache HTTP Server provides a variety of different mechanisms for logging everything that happens on it. cgi-bin: is the directory where CGI scripts are kept. The CGI (Common Gateway Interface) defines a way for a web server to interact with external content-generating programs, which are often referred to as CGI programs or CGI scripts. These are programs or shell scripts that are written to be executed by Apache on behalf of its clients.
  • 25. 25 MySQL is one of the most popular open source database management systems. It is widely used in websites and web applications to store data. Irrespective of its extensive use and acceptance by developers, MySQL requires backups when deployed in a production environment. MySQL is a relational database management system (DBMS or RDBMS) owned by Oracle. MySQL MySQL is based on client-server model. The core part of MySQL is MySQL Server . MySQL Server is used to handle database commands .The MySQL Server is fast , scalable and easy to use. MySQL can be used with different languages using certain connectors.
  • 26. 26 Installation of the Apache Web Server on Ubuntu
  • 27. 27
  • 28. 28
  • 29. 29
  • 30. 30
  • 31. 31
  • 32. 32
  • 33. 33
  • 34. 34
  • 35. 35
  • 36. 36
  • 37. 37
  • 38. 38
  • 40. 40 Install MySQL Allow remote access Start the MySQL service Launch at reboot
  • 41. Start the MySQL shell Set the root password View users
  • 42. 42
  • 45. 45
  • 46. 46 Grant database user permissions
  • 47. 47
  • 48. After running apache server port 80 is listening for http request 48
  • 49. 49
  • 50. 50
  • 51. 51
  • 52. 52
  • 53. 53
  • 54. 54
  • 55. 55
  • 56. 56
  • 57. 57
  • 58. 58
  • 59. 59