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: https://launchpad.net/byobu/+download

wget https://launchpad.net/byobu/trunk/5.21/+download/byobu_5.21.orig.tar.gz

Untar the file

tar xzf byobu*.tar.gz

Go to the byobu directory and install from source:

cd byobu-5.21
./configure
make
make install

To use byobu, type

byobu

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

Continue reading

Install Rackspace Private Cloud on VMware ESXi

Rackspace recently released Private Cloud software which you can obtain from http://www.rackspace.com/cloud/private/openstack_software/. 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

http://www.rackspace.com/knowledge_center/article/installing-rackspace-private-cloud-vmware-esxi

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:

Cloud Services Drive Fast-Growing Outsourcing Market

Source – Rachael King

Companies are turning increasingly to IT outsourcing as a means of supplementing and, in some cases, replacing internal hires. That’s especially true of application hosting. About 35% of companies say they’ll outsource more in this area during the next year to 18 months, according to a new report from global consulting firm Bluewolf. Cloud computing is partially driving this growth, as more companies use applications from the likes of Salesforce, Google and Workday.

Companies spend nearly half of their outsourcing budgets on application services including development, hosting and maintenance. Bluewolf predicts that as more companies rely on cloud providers, the outsourcing of applications will grow, whether it’s to providers who offer niche services or larger companies like Google or Microsoft.
Continue reading

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 http://pecl.php.net/get/APC-3.1.6.tgz
# 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':

Install Mod_Pagespeed on Centos

What is mod_pagespeed ?

mod_pagespeed is an open-source Apache module that automatically optimizes web pages and resources on them. It does this by rewriting the resources using filters that implement web performance best practices. Webmasters and web developers can use mod_pagespeed to improve the performance of their web pages when serving content with the Apache HTTP Server.

mod_pagespeed includes several filter that optimize JavaScript, HTML and CSS stylesheets. It also includes filters for optimizing JPEG and PNG images. The filters are based on a set of best practices known to enhance web page performance. Webmasters who set up mod_pagespeed in addition to configuring proper caching and compression on their Apache distribution should expect to see an improvement in the loading time of the pages on their websites.

How to install mod_pagespeed?

First,  check which Linux distribution you are using by this command:

cloudtech ~: uname -a
Linux cloudtech 2.6.18.8-x86_64-linode10 #1 SMP Tue Nov 10 16:29:17 UTC 2009 x86_64 x86_64 x86_64 GNU/Linux

Second, download the package at this link: mod_pagespeed latest version

Here I am using 64 bits CentOS Linux system, so i ‘ve downloaded mod_pagespeed 64-bit .rpm (CentOS/Fedora)

wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-beta_current_x86_64.rpm

Third,  install the package

rpm -i mod-pagespeed-*.rpm

or follow the instruction in official site. If you cannot install it, try this:

Install and import Google key into RPM, then you can install mod_pagespeed package using yum localinstall command:

wget https://dl-ssl.google.com/linux/linux_signing_key.pub
rpm --import linux_signing_key.pub
yum localinstall mod-pagespeed-*.rpm

Check which files you just installed:

cloudtech ~: rpm -ql mod-pagespeed-beta
/etc/cron.daily/mod-pagespeed
/etc/httpd/conf.d/pagespeed.conf
/usr/lib64/httpd/modules/mod_pagespeed.so
/var/www/mod_pagespeed/cache
/var/www/mod_pagespeed/files

Last, restart Apache to load the new module

cloudtech ~: service httpd restart

How to upgrade mod_pagespeed?

Download the latest version 0.9.15.3-404 and use command yum localinstall mod-pagespeed-*.rpm to install

http://code.google.com/speed/page-speed/download.html

With this release,  you can perform the upgrade to 0.9.15.3-404 with these commands:
  sudo yum update
  sudo /etc/init.d/httpd restart
On Debian or Ubuntu installation you can use:
  sudo apt-get upgrade mod-pagespeed-beta
  sudo /etc/init.d/apache2 restart

How to test mod_pagespeed?

Visit your site without mod_pagespeed

http://www.cloudtech.org/?ModPagespeed=off

Visit your site with mod_pagespeed

http://www.cloudtech.org/?ModPagespeed=on

Without mod_pagespeed, my site score is 73/100.

With mod_pagespeed, my site score is 81/100.

Monitor the results using Firebug + Pagespeed on your Firefox browser

You can also test your site at ModPageSpeed.com