Ubuntu – switching to worker mpm for apache 2 on ubuntu

apache-2.2mpm-preforkmpm-workerperformance-tuningUbuntu

How to switch from prefork mpm to worker mpm on ubuntu server?
how to roll back if there is any problem?

    root@myserver:~# apache2ctl -l
Compiled in modules:
core.c
mod_log_config.c
mod_logio.c
prefork.c
http_core.c
mod_so.c
root@myserver:~# aptitude search apache2-mpm-
p   apache2-mpm-event                                                      - Event driven model for Apache HTTPD
p   apache2-mpm-itk                                                        - multiuser MPM for Apache 2.2
p   apache2-mpm-perchild                                                   - Transitional package - please remove
i A apache2-mpm-prefork                                                    - Traditional model for Apache HTTPD
p   apache2-mpm-worker                                                     - High speed threaded model for Apache HTTPD
root@myserver:~#

Thanks in advance.

Best Answer

As you will be changing your configuration it would be advisable to backup your current configuration befor your install:

$ cp -R /etc/apache2 ~/backup
$ sudo apt-get install apache2-mpm-worker

If you run into problems you can

$ sudo apt-get install apache2-mpm-prefork
$ cp -R ~/backup /etc/apache2