LAMP Architecture

11.1 LAMP Architecture
LAMP is the abbreviation of Linux, Apache, MySQL, and PHP. In fact, Apache, MySQL and PHP are installed on the Linux system to form an environment to run the PHP scripting language. As for what the php scripting language is, I will not introduce it here. Apache is the most commonly used WEB service software, and MySQL is a relatively small database software. Both of these software and PHP can be installed on Windows machines.

PHP is integrated with Apache in the form of modules, but Apache cannot directly deal with MySQL. It can only communicate with each other through the PHP module. This process is called dynamic request. For example, when a password is used to log in to a webpage, it is a dynamic process. Enter the password at the webpage login portal displayed by Apache, and then use the PHP module to compare the data on MySQL. If the password is correct or wrong, it will be fed back to Apache through PHP, and then displayed on the browser. The static files in the above picture, similar to the logo and other pictures on the web page, the pictures taken out by Apache through the static files, etc., do not need to go through MySQL data, and can be displayed directly on the browser, so it is a static request. MySQL cannot store pictures, etc., but stores data such as usernames, passwords, points, and text.

11.2 Introduction to MySQL_MariaDB

11.3 MySQL Installation

It is recommended to use binary free compilation for MySQL installation package.
First download the installation package, go to the website r.aminglinux.com to find the latest MySQL binary installation package. The binary package distinguishes between 32-bit systems and 64-bit systems. Use the command uname -a to check the number of bits of the system.

1. wget  http://mirrors.sohu.com/mysql/MySQL-5.6/mysql-5.6.36-linux-glibc2.5-x86_64.tar.gz  installation

2. tar zxvf mysql-5.6.36-linux-glibc2.5-x86_64.tar.gz //decompress

3. mv mysql-5.6.36-linux-glibc2.5-x86_64 /usr/local/mysql //renamed to mysql

4. useradd mysql //Create user

5. ./scripts/mysql_install_db --user=mysql  --datadir=/data/mysql    

yum -y install autoconf //Data:Dumper module will be installed when this package is installed

6. cp support-files/my-default.cnf /etc/my.cnf //Copy the configuration file

7. cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld //Copy startup files

basedir=/usr/local/mysql //mysql program directory
datadir=/usr/local/mysql/data //database directory

8. chkconfig --add mysqld //Set boot up

9. service mysqld start //Start mysql service

/usr/local/mysql/bin/mysqld_safe --defaults-file=/etc/my.cnf --use=mysql --datadir=/data/mysql& //Another startup method

 

  

 

 

 

 

  

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326944928&siteId=291194637