kieranbarnes Independent PHP, WordPress & CubeCart Programmer

cPanel Apache Tuning

Posted on November 22, 2010

Posted by Kieran

One of the first things I do is run /scripts/easyapache and rebuild my PHP / Apache configuration.
I usually select Apache 2.2 and PHP 5.2.9. At the time of writing I stay away from the 5.3 versions as they aren't supported by programs and programmers enough yet.

Although this guide was originally inspired from a cPanel install, its Apache specific and doesn't require cPanel.

Installing memcached on CentOS/cPanel

Posted on November 21, 2010

Posted by Kieran

memcached a (distributed) memory object caching system vital if your running a HA Linux* setup or a web farm. Or even if you need fast as **** caching for an application.

Consider it extra memory for your server, so you can cache more, for example large arrays, SQL queries and other stuff!

* Actually I've discovered there are memcached extensions for Java, C & .NET. Wow, it just grew up!

Tagged as: , , , Continue reading

[Snippet] Tuning / Tweaking MySQL

Posted on November 20, 2010

Posted by Kieran

There are a couple of good scripts out there that will help you to tune your mysql usage for better perfomance.  I’ve used both of these, and they are very intuative.  Personally, I prefer the latter, however, I still use both for tweaking.

tuning-primer

OK, so not the most original blog post ever, but useful all the same.
“This script takes information from “SHOW STATUS LIKE…” and “SHOW VARIABLES LIKE…”
to produce sane recomendations for tuning server variables.”

PCI Compliance – Disable SSLv2 and Weak Ciphers

Posted on November 6, 2010

Posted by Kieran

Section 4.1 of the the Payment Card Industry Data Security Standard (PCI-DSS) v1.2, merchants handling credit card data are required to “use strong cryptography and security protocols such as SSL/TLS or IPSEC to safeguard sensitive cardholder data during transmission over open, public networks.”

Apache redirects based on IP Address/Subnet

Posted on November 5, 2010

Posted by Kieran

Ever needed to redirect a source IP address or source subnet in apache?

Why? Redirect annoying spam bots, users or other individuals away from your blog for example.

Slam the following code into your .htaccess file or VirtualHost Directive.

Tagged as: Continue reading

Mini WHMCS SagePay Terminal Mod

Posted on November 4, 2010

Posted by Kieran

We have a few customers that phone and pay WHMCS generated invoices over the phone - we now use the SagePay Virtual Terminal.
So I added a link on the Client Summary page with a direct link. Simple and silly I know, but kinda useful.

MySQL Root Password on cPanel

Posted on November 4, 2010

Posted by Kieran

Wheres the MySQL root password in cPanel installs? Easy, look in /root/.my.cnf

Filed under: cPanel/WHM, MySQL No Comments

MySQL: Can’t get hostname for your address

Posted on October 28, 2010

Posted by Kieran

Can''t remotely login to your shiney, new MySQL server due “Can’t get hostname for your address” or "Can't get hostname for your address". Another random MySQL error message.

Simply put, if you look in the logs, MySQL cannot lookup your IP/hostname. Its that simple.

Is your DNS broke? Or just on a Local Area Network with no DNS anyway?
Just add skip-name-resolve option to the [mysqld] section of your my.cnf/my.ini

Imitation is flattery.

Posted on October 11, 2010

Posted by Kieran

Thats all.

Filed under: General No Comments

[Snippet] Create a large file in Linux

Posted on August 21, 2010

Posted by Kieran

Need to create a large file? For disk speed tests? Or space tests?

  1. dd if=/dev/zero of=your.big.file bs=1MB count=500

This will create a 500Mb file in your current directory called  your.big.file

  1. 500+0 records in
  2. 500+0 records out
  3. 500000000 bytes (500 MB) copied, 4.08855 seconds, 122 MB/s
Tagged as: , 1 Comment
Page 2 of 2412345...1020...Last »