如何在 ubuntu 13.10 上启用 apache2-mpm-worker?

如何在 ubuntu 13.10 上启用 apache2-mpm-worker?

我正在尝试为 apache2 启用 apache2-mpm-worker - 但没有成功。为 ubuntu 13.10 安装和启用 apache2 mpm-working 的步骤是什么?是否有一些隐藏的设置可以说服不同的 apache?

Server version: Apache/2.4.6 (Ubuntu)
Server built:   Mar 19 2014 20:56:01
Server's Module Magic Number: 20120211:23
Server loaded:  APR 1.4.8, APR-UTIL 1.5.2
Compiled using: APR 1.4.8, APR-UTIL 1.5.2
Architecture:   64-bit
Server MPM:     event
  threaded:     yes (fixed thread count)
    forked:     yes (variable process count)
Server compiled with....
 -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 DYNAMIC_MODULE_LIMIT=256
 -D HTTPD_ROOT="/etc/apache2"
 -D SUEXEC_BIN="/usr/lib/apache2/suexec"
 -D DEFAULT_PIDLOG="/var/run/apache2.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="mime.types"
 -D SERVER_CONFIG_FILE="apache2.conf"

# uname -a
Linux Ubuntu-1310-saucy-64-minimal 3.11.0-19-generic #33-Ubuntu SMP Tue Mar 11 18:48:34 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

apache 说仍然没有 worker.c

# /usr/sbin/apache2 -l
Compiled in modules:
  core.c
  mod_so.c
  mod_watchdog.c
  http_core.c
  mod_log_config.c
  mod_logio.c
  mod_version.c
  mod_unixd.c

安装顺利

# sudo apt-get install apache2-mpm-worker
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  apache2
Suggested packages:
  apache2-doc apache2-suexec-pristine apache2-suexec-custom apache2-utils
The following NEW packages will be installed:
  apache2 apache2-mpm-worker
0 upgraded, 2 newly installed, 0 to remove and 25 not upgraded.
Need to get 0 B/88.0 kB of archives.
After this operation, 488 kB of additional disk space will be used.
Do you want to continue [Y/n]? 
Selecting previously unselected package apache2.
(Reading database ... 112810 files and directories currently installed.)
Unpacking apache2 (from .../apache2_2.4.6-2ubuntu2.2_amd64.deb) ...
Selecting previously unselected package apache2-mpm-worker.
Unpacking apache2-mpm-worker (from .../apache2-mpm-worker_2.4.6-2ubuntu2.2_amd64.deb) ...
Processing triggers for ureadahead ...
Processing triggers for ufw ...
Processing triggers for man-db ...
Setting up apache2 (2.4.6-2ubuntu2.2) ...
 * Restarting web server apache2                                                                                                                                                                                        [ OK ] 
Setting up apache2-mpm-worker (2.4.6-2ubuntu2.2) ...

答案1

apache2-mpm-worker 包只是一个依赖于 apache2 包的过渡包。该包具有 prefork、worker、itk 和 event MPM,如下所示数字存储示波器模块

您可以在 mods-available 中看到它们

$ ls /etc/apache2/mods-available/mpm*
/etc/apache2/mods-available/mpm_event.conf  /etc/apache2/mods-available/mpm_prefork.conf
/etc/apache2/mods-available/mpm_event.load  /etc/apache2/mods-available/mpm_prefork.load
/etc/apache2/mods-available/mpm_itk.conf    /etc/apache2/mods-available/mpm_worker.conf
/etc/apache2/mods-available/mpm_itk.load    /etc/apache2/mods-available/mpm_worker.load

并查看 mods-enabled 中的活动

$ ls -l /etc/apache2/mods-enabled/mpm*
lrwxrwxrwx 1 root root 32 Mar 25 21:09 /etc/apache2/mods-enabled/mpm_event.conf -> ../mods-available/mpm_event.conf
lrwxrwxrwx 1 root root 32 Mar 25 21:09 /etc/apache2/mods-enabled/mpm_event.load -> ../mods-available/mpm_event.load

您可以使用以下方式禁用和启用模块a2dismoda2enmod

你可能想坚持事件代替工人

相关内容