当前位置:网站首页>LNMP architecture PHP installation
LNMP architecture PHP installation
2022-07-18 03:18:00 【dyh_ chd】
One 、lnmp Architecture introduction
LNMP yes web Application software portfolio
Linux+Nginx+Mysql/MariaDB+Perl/PHP/Python
A set of open source software commonly used to build dynamic websites or servers , They are independent procedures , But because it's often used together , Higher and higher compatibility , Together, a powerful WEB Application platform .
LNMP Architecture communication process :
LNMP It's a cs Architecture platform (client/server framework , The client side / Server architecture )web The client is based on TCP/IP adopt http The agreement initiates the request , The request may be dynamic or static , All servers judge by the suffix of the request . If it is static, it is determined by web The server handles it itself , Then send the resource to the client . If the request is dynamic, then web The server will go through FSATCGI The agreement was sent to php, adopt php Module to MySQL Take the data and pass Nginx Give it to the client .
Two 、php Introduce
Download path :PHP: Hypertext Preprocessor
https://www.php.net/
php meaning :Hypertext Preprocessor Hypertext processor
php It's a kind of server-side HTML Scripting language , It's a simple 、 Object oriented 、 Interpretive 、 Robust 、 Safe 、 Very high performance 、 Architecture independent 、 portable 、 Dynamic scripting language . It is widely used in Open Source( Open source ) Especially suitable for Web Develop and embed HTML Multi purpose scripting language .
php What can be done :
1)php Can do static website : Static website ( All are static pages that request already exists , No interaction with the database is required ), Usually, the request file is in the path + file name .html/htm
2)php Can also do dynamic website , Users can interact with the server ( The server can interact with the database )
PHP Responsible for handling requests submitted by users , Associate with a database , from PHP Operate the database for data interaction .
3、 ... and 、web The server
Website : A collection of multiple web pages .
User access :http://www.itcast.cn/teacher.html(URL: The absolute path of the Internet )
Webmaster : A website is a folder ( Local absolute path )Requests for static pages :http://localhost/index.html
Request step :
1. The user inputs the domain name of the website to be visited and the specific web page file to be requested in the browser
2. Domain name resolution : Find the local first hosts file , Then find the Internet DNS
3.web Server receives request , Get request file index.html
4.web Server return index.html
5. Browser parsing html Code , Display the data
Dynamic page request :http://localhost/index.php
Request step :
1. The user inputs the domain name of the website to be visited and the specific web page file to be requested in the browser
2. Domain name resolution : Find the local first hosts file , Then find the Internet DNS
3.web Server receives request , Get request file index.php
4. take index.php Documents to php Engine processing
5.php Engine parsing php Code , If you want to connect to the database, call mysql Expand , To manipulate the database , Finally, after parsing, it becomes html file
6.php The engine will generate html Documents to Nginx
7.web Server return index.php The final result is html file
8. Browser parsing html Code , Display the data
Four 、php Source code installation
Before installation, make sure that no other version of php
rpm -qa | grep php
Download source package installation :
tar jxf php-7.4.6.tar.bz2
cd php-7.4.6
./configure --prefix=/usr/local/lnmp/php --with-config-file-path=/usr/local/lnmp/php/etc --enable-fpm --with-fpm-user=nginx --with-fpm-group=nginx --with-curl --with-iconv --with-mhash --with-zlib --with-openssl --enable-mysqlnd --with-mysqli --with-pdo-mysql --disable-debug --enable-sockets --enable-soap --enable-inline-optimization --enable-xml --enable-ftp --enable-gd --enable-exif --enable-mbstring --enable-bcmath --with-fpm-systemd
make
make install
————————————————



Errors encountered during compilation , Install the corresponding packages and libraries :
Resolve dependencies
[[email protected] php-7.4.12]# yum install -y systemd-devel.x86_64
[[email protected] php-7.4.12]# yum install -y libxml2-devel.x86_64
[[email protected] php-7.4.12]# yum install -y sqlite-devel.x86_64
[[email protected] php-7.4.12]# yum install -y libcurl-devel.x86_64
[[email protected] php-7.4.12]# yum install -y libpng-devel.x86_64
[[email protected] ~]# yum install -y oniguruma-6.8.2-1.el7.x86_64.rpm oniguruma-devel-6.8.2-1.el7.x86_64.rpm
The above two packages can be downloaded from Alibaba cloud 1)


2)
3)

4)

5)
6) Go to Alibaba cloud to download the package that cannot be found

After the corresponding packages are installed , Again configure compile , success


边栏推荐
- 埃森哲22年《技术展望》报告:数字化转型将迎来下一个十年
- Internal and external links of [MySQL] table
- “代码写的越急,程序跑的越慢”
- Hcip notes (1)
- Two years ago, how were the leading players and blue chips in defi?
- 斗地主包含抢地主环节
- HCIP回顾(1)
- [cloud native] development of terrain addon based on kubevera Huawei cloud
- [detailed explanation] paging method: use of page helper
- 仓储系统亮灯分拣
猜你喜欢

万字详解SSH(SSH登录原理+SSH配置+模拟实现SSH免密登录)

Recurrence of two CVE vulnerabilities

HCIP笔记(1)

Hcip notes (1)

线程-interrupt方法详解

Storage system lighting sorting
![[live review] openharmony knowledge empowerment phase 6 lesson 3 - control panel function implementation of openharmony smart home project](/img/3d/23700d282053ff994f49e8a04e6be2.png)
[live review] openharmony knowledge empowerment phase 6 lesson 3 - control panel function implementation of openharmony smart home project

中国人力资源数字化生态图谱-灵活用工市场

Robotframework advanced (III) integrated Jenkins operation automation use case

ClickPaaS马俊:模型驱动的低代码平台实践
随机推荐
验证码与登录页面
RobotFramework进阶(一)集成Pycharm及UI自动化用例编写
js实现电子签名功能
【流放之路-第一章】
WebView loading URL prompt net:: error_ UNKNOWN_ URL_ SCHEME
索尼的元宇宙布局
知乎高赞:数据中台——风起阿里,成于DaaS
String splicing
聊聊异步编程的 7 种实现方式
Issue 90: the problem of a small program generating posters
Configure @ in vite to access files under Src
Listbox
美财政部批准与俄罗斯进行化肥、农产品交易
斗地主包含抢地主环节
金融市场暴跌忍不住想抄底?劝你看完本文再做决定
Number formatting
线程-interrupt方法详解
Sony's metauniverse layout
what? You don't know symbol yet?
RobotFramework进阶(二)集成Pycharm及Api自动化用例编写

