Install Byobu on CentOS

Byobu is similar to Screen. It is popular in Ubuntu, to install Byobu on CentOS, we need to compile it from source. Download Byobu from:

[cc lang=”bash”]wget[/cc]

Untar the file

[cc lang=”bash”]tar xzf byobu*.tar.gz[/cc]

Go to the byobu directory and install from source:

[cc lang=”bash”]
cd byobu-5.21
make install

To use byobu, type
[cc lang=”bash”]

Press F9 to show help menu:

Build high performance wordpress site using Nginx + Varnish

Highlight: Ubuntu + Nginx + PHP-FPM + Varnish for WordPress site

The current site is hosted on CentOS 6 using Apache in home lab server, so you may experience slowness due to network limitation. When I was using Apache Bench tool to test the site performance, it can only server 10 requests per second. I’ve tried using Memcache and APC, the performance gain is minimum. After use Varnish in front of Apache server, the site can server over 10,000 requests per second. Here, I am going to setup another test server using Nginx + Varnish to compare with current setup. With Nginx only, it can serve 60 requests per second. That’s 6 times faster than Apache without any cache program. Now, let’s see how much performance Nginx can gain by using Varnish compare to Apache.

Varnish in realtime


Install Rackspace Private Cloud on VMware ESXi

Rackspace recently released Private Cloud software which you can obtain from Just fill in your contact info, then you will receive a download link in your email.

For evaluation purposes, I installed both Controller and Computer nodes to one VM on my ESXi homelab. Rackspace has an article showing how to install the software

The instruction is clear, but I run into an error after boot the VM. It keeps telling me that the hardware virtualization is not enabled. This is because by default ESXi automatically detect software/hardware Virtualization. You can fix this by:

Edit VM Settings >> Options >> Advanced >> CPU/MMU Virtualization >> Chose “Use Intel VT-x/AMD-V for ….”. Also, make sure on Options tab, change the Guest Operating System to Other – VMWare ESXi 5.x as I couldn’t find this when I use automatic for CPU Virtualization. Reboot the VM, you will be able to install the software.

VM Console:

Openstack Dashboard:

Use APC(Alternative PHP Cache) for WordPress on VPS

W3 Total Cache support many page cache methods. For VPS or Dedicated server, it’s better to use Opcode than disk.  The Alternative PHP Cache will be built into PHP6, so it’s a good to try it now.

“APC is a free, open, and robust framework for caching and optimizing PHP intermediate code.”

On CentOS, you can install it though:

# pecl install apc

Or manually install it

# wget
# tar -xvzf APC-*.tgz
# cd APC-*
# phpize
# ./configure
# make
# make install

I’ve see the following error when to install APC through pecl. To solve the problem, just install pcre-devel package first

# yum install pcre-devel
//Error message
/root/tmp/pear/APC/apc.c:369: error: expected specifier-qualifier-list before 'pcre' /root/tmp/pear/APC/apc.c: In function 'apc_regex_compile_array': /root/tmp/pear/APC/apc.c:430: error: 'apc_regex' has no member named 'preg' /root/tmp/pear/APC/apc.c:430: error: 'apc_regex' has no member named 'preg' /root/tmp/pear/APC/apc.c:431: error: 'apc_regex' has no member named 'nreg' /root/tmp/pear/APC/apc.c:431: error: 'apc_regex' has no member named 'nreg' /root/tmp/pear/APC/apc.c: In function 'apc_regex_match_array':

Amazon free cloud service

To help new AWS customers get started in the cloud, AWS is introducing a new free usage tier. Beginning November 1, new AWS customers will be able to run a free Amazon EC2 Micro Instance for a year, while also leveraging a new free usage tier for Amazon S3, Amazon Elastic Block Store, Amazon Elastic Load Balancing, and AWS data transfer. AWS’s free usage tier can be used for anything you want to run in the cloud: launch new applications, test existing applications in the cloud, or simply gain hands-on experience with AWS.

Display Chinese Characters in WordPress

By default, Chinese characters do not work in WordPress if you didn’t originally setup your WordPress to handle it. To display or compose Chinese in your blog, you can change the WordPress database Collations to utf8_unicode_ci for all tables. If you have phpMyAdmin, you can manually change them one by one. However, it will take long time to fix all of them. Here is an easy way to change all Collations using script.

1. Create a file as: alter_mysql_tables.php

2. Copy and paste the following lines to the file and modify it using your own database connection

Download File: [download id=”1″]
3. Save the file and upload to your ftp.
4. Run the script in browser:
5. That’s all!