如何在 Redhat Linux 64 位上从 prefork 更改为worker mpm?

1 prefork apache-2.2

如何在 Redhat Linux 64 位上从 prefork 更改为工作器 mpm。

/bin/httpd -l
Compiled in modules:
  core.c
  mod_access.c
  mod_auth.c
  mod_include.c
  mod_log_config.c
  mod_env.c
  mod_setenvif.c
  mod_ssl.c
  prefork.c
  http_core.c
  mod_mime.c
  mod_status.c
  mod_autoindex.c
  mod_asis.c
  mod_cgi.c
  mod_negotiation.c
  mod_dir.c
  mod_imap.c
  mod_actions.c
  mod_userdir.c
  mod_alias.c
  mod_so.c

bin/httpd -V
Server version: Apache/2.0.55
Server built:   Mar  7 2006 00:10:58
Server's Module Magic Number: 20020903:11
Architecture:   32-bit
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D HTTPD_ROOT="/opt/httpd/apache-2.0.55"
-D SUEXEC_BIN="/opt/httpd/apache-2.0.55/bin/suexec"
-D DEFAULT_PIDLOG="logs/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="logs/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
Run Code Online (Sandbox Code Playgroud)

小智 5

编辑 /etc/sysconfig/httpd 文件。改变

#HTTPD=/usr/sbin/httpd.worker
Run Code Online (Sandbox Code Playgroud)

HTTPD=/usr/sbin/httpd.worker
Run Code Online (Sandbox Code Playgroud)

并重新启动apache服务。