24.3.2 Installing
24.3.2.1 Installing
When installing on Raspberry Pi, use the following command:
sudo apt-get install apache2
24.3.2 Installing
24.3.2.1 Installing
When installing on Raspberry Pi, use the following command:
sudo apt-get install apache2
24.3 Apache web server
24.3.1 Web server and Apache
24.3.1.1 Web server
By installing a web site on the Internet, people can access the site through a web browser, view the data they want, and do other various necessary works.
A web server is required to install and operate such a web site. People send various client requests to a web site through a web browser. At this time, web server is the application to perform functions that receive the request from the client, interpret the contents, perform necessary processing, and then return the web page contents of the corresponding web site to the client.
24.2.5 Database SQL
24.2.5.1 Introduction of Database SQL
All relational databases use special instruction called SQL (Structured Query Language) to manage their internal data. By using SQL, you can define the type and content of data in the database, to enter data into the database, to modify the data entered, and to view the data entered.
The main functions of SQL that are necessary for database management are as follows:
24.2.4 Using – “mysql” command
24.2.4.1 Basic Framework of
Use to use MySQL database. is a simple SQL Shell program that allows you to enter and edit your own database commands.
This can be used both in interactive manner and in noninteractive manner. When used interactively, the results are displayed in an ASCII-table format, and if used noninteractively, the results are displayed in tab-separated format.
24.2.3 MySQL Management Tool
24.2.3.1 – mysqladmin command
is a management-dedicated utility program used to manage the MySQL database system on the whole. This command is used in a noninteractive manner.
This program is automatically installed on the computer where is installed. However, if you want to remotely access a system with a MySQL database from another computer on the network and perform management works, you need to download a appropriate program for the operating system of the remote computer and install it separately.
24.2.2 Installing
24.2.2.1 Installing
To install on Raspberry Pi, use the following command:
sudo apt-get install mysql-server
When the command is executed, the screen to enter password for “root” account will appear as shown below.
24.2 MySQL Database
24.2.1 Relational Database and SQL
24.2.1.1 Relational database
The database is a tool to provide a function that stores and manages many complicated data systematically and search the data in various formats easily later.
There are many types of databases, but the type of most databases that are most popular in the world is relational database. Relational database is that many of datas in it are not simply managed as independent data, but rather that the data are systematically managed in relation to each other. The relationship between these data is defined at the same time when defining the form of the data in advance, and the data is managed according to the defined relationship and provides various functions.
24.1.2 LAMP
On Linux systems, there is a powerful combination of tools that can build a web site using database and web server along with operating system, LAMP. LAMP is a combination of Linux, Apache, MySQL, and PHP. The basic compositions and roles are as follows.
■ OS — Linux
■ Web server — Apache
■ Database — MySQL
■ script Language — PHP
24.1 LAMP Overview
24.1.1 Needs for Database and Web
Until now, all we could do was to run command on Terminal screen to check the result, or run a specific application program and do limited work by using function provided by the program. But this level of functionality alone can not meet all of the requirements we need, so a number of additional features are required.
Chapter 24 Utilizing Database and Web
Chapter’s Main Topics
This Chapter describes database used to systematically store and analyze a lot of data, and discuss how to communicate with other people on the Internet in various dynamic ways using HTML, script language.
It includes descriptions on the following topics:
■ LAMP Overview
■ MySQL Database
■ Apache web server
■ PHP web script language