Knowledgebase
Updating Apache
Posted by on 14 June 2012 11:15 AM

Updating Apache

Before you begin, you may wish to review the cPanel Apache Configuration Guide. 

http://docs1.cpanel.net/twiki/bin/view/EasyApache3/WebHome

Your WHM control panel includes an option to configure Apache options under Software -> Apache Update. 

However, the build process can use a substantial amount of memory. If you are running a Personal or Professional VPS and have a high level of memory usage, you may need to stop various services to free up memory. If you host customer sites on your VPS, you may need to schedule a "maintenance window" in advance to minimize downtime for your clients.

A sensible approach is to login via SSH to do the update manually and issue the following commands:

/usr/local/cpanel/bin/tailwatchd stop
service httpd stop service mysql stop service cpanel stop

You can also stop other services, but these have the highest memory usage. You can check available memory with the "free" command:
free -m

You'll need at least 150-200 MB free.

Once you have freed enough memory, you can run the EasyApache utility.
/scripts/easyapache


You'll see an option to load several "pre-configured" settings. In general, you'll want to use your existing configuration, Previously Saved Config


To move around, the Up and down arrows will scroll, the tab key will switch between sections, and space bar will select/deselect.

Select the version of Apache you wish to run, 1.3/2.0/2.2. (latest version is always preferred)

PHP Version

You'll then have the option to select the PHP version you want. Version 4 has been discontinued by the PHP Group (no more updates, including security fixes, will ever be provided), so version 5 is very highly recommended. It offers significant speed improvements over prior versions. You may select either or both. If you want to run multiple versions of PHP. (Again latest version is preferred for PHP Security and stablility)


On the Short Options List, you can select the basic options to configure. Be aware that these options can break your Apache configuration if you do not configure them properly. Be careful!


You can now save and build Apache. 
If you need specific PHP options configured, select "Exhaustive Options List" and choose the options you need. The following is a short list of most popular and commonly needed options.

CurlSSL
GD
Gettext
PDO
PDO MySQL
SQLite3
TTF (FreeType)
XmlRPC 

There are also many other common options already selected for you, leave these selected.

Once you've compiled Apache and there are no errors or problems, you can restart the services you previously disabled:

/scripts/restartsrv_tailwatchd 
service cpanel status service mysql status service httpd status

(0 vote(s))
This article was helpful
This article was not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
Help Desk Software by Kayako Fusion