In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
./ configure --prefix=/application/apache.2.2.27/\ //Specify installation location when installing
--enable-deflate \ //compress transfer files
--enable-expires \ //browser cache
--enable-headers \ //activate http headers
--enable-modules=most \ //Load apache modules
--enable-so \
--with-mpm=worker \ //Select apache mode of operation (support high concurrency worker)
--enable-rewrite //pseudo-static
Apache has three operating modes:
1, prefork MPM;
2, worker MPM;
3, perchild MPM.
prefork MPM
Administrators should select prefork MPM to implement a process-based Web server. While process-based servers have some slower performance, they provide stability and compatibility through modules that do not support threading. To improve performance, the server's parent process forks multiple child processes and makes them available to answer requests. When a request is received, the server assigns it to a subprocess. If no subprocess is available, the server creates a new subprocess and adds it to the library. However, the creation of subprocesses causes delays. When configuring this MPM, administrators can limit the number of subprocesses that can be created at startup, the maximum number of subprocesses, and so on. This MPM is good for forming a stable Apache server, but it also affects performance and memory consumption because the size of individual processes can account for a large portion.
The worker MPM
To implement a hybrid server, administrators can choose worker MPM, which offers superior reliability, failover, and scalability over prefork MPM. At startup, the parent process creates a specified number of child processes, which in turn contain multiple threads. Only one thread listens to the network in each subprocess, which simplifies program code and reduces collaboration between processes to improve performance. Although this MPM is stable and performs better than prefork, since it is thread-based, all modules used with it must be fully thread-safe. Most Apache 1.3 modules are not thread safe, and because the worker MPM is not backward compatible, administrators using this MPM cannot use Apache 1.3 modules with Apache 2.0. But compiling the server using prefork MPM allows administrators to use Apache 1.3 modules.
The perchild MPM
If you encounter a situation where security and performance considerations require Apache processes to run on different user IDs, administrators can compile hybrid servers using perchild MPM. Internet service providers (ISPs) often use this MPM for virtual hosting. When perchild starts, it creates a specified number of processes, each with a specified number of threads and a dedicated user ID. If the load on the server increases, it uses one of the existing processes to create a new thread instead of creating a new process. This MPM is the most scalable, but also the least reliable.
After installing mysql, apache, php, you need to associate apache with php, modify/aapplication/apache/conf/httpd.conf
DirectoryIndex html.php index.html Add index.php's home page.
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType application/x-httpd-php .php .phtml Add the last two lines, add php parsing
AddType application/x-httpd-php-source .phps
User www modifies the default username password to make the system more secure.
Group www
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.