In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you the "deployment of LNMP architecture in how to install PHP", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "deployment of LNMP architecture in how to install PHP" this article.
What is PHP
PHP, or "hypertext preprocessor", is a general open source scripting language. PHP is a scripting language executed on the server side, which is similar to C language and is a commonly used website programming language. PHP's unique syntax is a mix of C, Java, Perl, and PHP's own syntax. Conducive to learning, widely used, mainly suitable for the field of Web development.
Similar to the general principle of the LAMP architecture, one difference is that in the LNMP structure, php starts a service: php-fpm, while php in LAMP exists only as a module of Apache. Nginx passes the user's dynamic request to the php service, which interacts with the database. Users' static requests are processed directly by Nginx, and Nginx processes static requests much faster than apache, so there is little difference between apache and Nginx in dynamic request processing, but if it is static request processing, you will obviously find that Nginx is faster than apache, and Nginx can withstand tens of thousands of concurrency, so larger websites will use Nginx as the web server.
2. Experiment
1. Install the deployment environment package
two。 Extract the php installation package to the / opt directory
3. Install the configuration function module
4.make & & make install
5. Modify the core configuration file
6. Open the php-fpm module
You need to enable the monitoring engine pid in the configuration file
7. Modify the extension profile
8. Open the service check port
9. Make all the commands of php easy for the system to recognize
10. Let nginx support PHP function
Location ~\ .php$ {root html;// specifies the site directory fastcgi_pass 127.0.0.0.1 fastcgi_pass 9000 role / specifies the location of the fpm module, IP address, port 9000 fastcgi_index index.php;// specifies the default home page type fastcgi_param SCRIPT_FILENAME / usr/local/nginx/html$fastcgi_script_name;// specifies the directory include fastcgi_params where the script file is located / / convert variables in nginx to variables that PHP can recognize}
All the services of the LNMP architecture have been built here.
Restart the service and test it!
These are all the contents of the article "how to install PHP in deploying LNMP Architecture". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.