Give PHP and Apache a speed boost!

So, I got bored one weekend and decided to recompile PHP using EasyApache, but I thought to myself, well if I am compiling a c program, why not compile it with custom GCC flags? So, here’s what I did:

This requires that you have ROOT SSH access to your cPanel server

echo "-O3" > /var/cpanel/easy/apache/rawenv/CFLAGS
screen -S ea3 /scripts/easyapache --skip-cpanel-version-check --build

This will automatically rebuild the last saved EasyApache build with the new CFLAGS.  If you have not built PHP with EA3, you can use:

screen -S ea3 /scripts/easyapache

This will take you through the EasyApache wizard, and once you start the build it will then use the custom flags.

Thanks to cPanel for providing this neat feature! :)

This entry was posted in Daily Fixes, General, Howtos, cPanel and tagged , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">