Moving Back to QuickWeb

· 3 min read

Last night, I am moving back this blog to the QuickWeb. There is nothing wrong with BuyVM, but I just want to try again with QuickWeb.
This Blog which created using LowEndScript with Debian 5,  now also equipped with Memcached and W3 Total Cache.
 
So, here is the tutorial for installing the Memcached in this Debian VPS :

  1. Set the permissions of wp-content/ to 755 :
    # chmod 755 /var/www/domain.com/wp-content/
  2. Update the installation:
    # apt-get update && apt-get upgrade
  3. Install the C Compiler
    # apt-get install gcc
  4. Installing the Sysvconfig for configuring init script
    # apt-get install sysvconfig
  5. Installing required package
    # apt-get install php-pear
    # apt-get install php-devel
    # apt-get install php5-devel
    # apt-get install zlib-devel
    # apt-get install pcre-devel
  6. Installing libevent
    # apt-get install libevent libevent-devel

    If the previous command not working, we can try to compile it from the source. Now lets download the package and extract it :

    # cd /usr/local/src && wget http://monkey.org/~provos/libevent-2.0.11-stable.tar.gz && tar -xzf libevent-2.0.12-stable.tar.gz && cd libevent-2.0.12-stable
  7. Compile the memcached
    # ./configure && make && make install

    After finished, you should see something like :

    Libraries have been installed in: /usr/local/lib
  8. Run the following command
    # echo "/usr/local/lib/" > /etc/ld.so.conf.d/libevent.conf
  9. Config the server for the new install
    # ldconfig -v
  10. Download and extract the latest memcached
    # cd /usr/local/src && wget http://memcached.googlecode.com/files/memcached-1.4.6.tar.gz && tar -xzf memcached-1.4.6.tar.gz && cd memcached-1.4.6
  11. Compile the memcached
    # ./configure && make && make install
  12. Make sure memcached started when server start
    # touch /etc/init.d/memcached
    # echo '#!/bin/sh -e' >> /etc/init.d/memcached
    # echo '/usr/local/bin/memcached -d -m 128 -p 11211 -u nobody -l localhost' >> /etc/init.d/memcached
    # chmod u+x /etc/init.d/memcached
    # echo '/etc/init.d/memcached' >> /etc/rc.local
  13. Start the memcached
    # /etc/init.d/memcached
  14. Restart the Nginx and PHP-Cgi
    # service nginx restart
    # service php-cgi restart


PECL Memcache Module Installation:

  1. Installing using PECL
    # pecl install memcache
  2. Or by doing manual compilation. Lets download and extract the package
    # cd /usr/local/src/ && wget http://pecl.php.net/get/memcache-2.2.6.tgz && tar -xzf memcache-2.2.6.tgz && cd memcache-2.2.6
  3. Performing compilation
    # phpize && ./configure && make && make install
  4. Copying the memcache.ini from the WordPress W3Total Cache plugin directory to the PHP conf.d directory
    # cp /var/www/vhosts/domain.com/httpdocs/wp-content/plugins/w3-total-cache/ini/memcache.ini /etc/php.d/

    If you don’t have /etc/php.d directory, you can copy it to the /etc/php5/conf.d/

    # cp /var/www/vhosts/domain.com/httpdocs/wp-content/plugins/w3-total-cache/ini/memcache.ini /etc/php5/conf.d/memcache.ini
  5. Restart the Nginx and PHP-CGI
    # service nginx restart
    # service php-cgi restart
    
  6. Memcache installation is finished. Now test the following command, if it returns anything, then you’re all set :
    # php -r 'phpinfo();' | grep 'memcache'

Geekbench Testing

# wget http://www.primatelabs.ca/download/Geekbench21-Linux.tar.gz
# tar xf Geekbench21-Linux.tar.gz
# ./dist/Geekbench21-Linux/geekbench_x86_32
System Information
  Platform:                  Linux x86 (32-bit)
  Compiler:                  GCC 4.1.2 20070925 (Red Hat 4.1.2-33)
  Operating System:          Linux 2.6.18-274.3.1.el5.028stab094.3 i686
  Model:                     Linux PC (Intel(R) Xeon(R) CPU E31230 @ 3.20GHz)
  Motherboard:               Unknown Motherboard
  Processor:                 Intel(R) Xeon(R) CPU E31230 @ 3.20GHz
  Processor ID:              GenuineIntel Family 6 Model 42 Stepping 7
  Logical Processors:        1
  Physical Processors:       1
  Processor Frequency:       3.19 GHz
  L1 Instruction Cache:      0.00 B
  L1 Data Cache:             0.00 B
  L2 Cache:                  256 KB
  L3 Cache:                  0.00 B
  Bus Frequency:             0.00 Hz
  Memory:                    15.6 GB
  Memory Type:               N/A
  SIMD:                      1
  BIOS:                      N/A
  Processor Model:                     Intel(R) Xeon(R) CPU E31230 @ 3.20GHz
  Processor Cores:           1
Integer
  Blowfish
    single-threaded scalar    2078 ||||||||
    multi-threaded scalar     2200 ||||||||
  Text Compress
    single-threaded scalar    2197 ||||||||
    multi-threaded scalar     2409 |||||||||
  Text Decompress
    single-threaded scalar    3026 ||||||||||||
    multi-threaded scalar     3098 ||||||||||||
  Image Compress
    single-threaded scalar    2336 |||||||||
    multi-threaded scalar     2304 |||||||||
  Image Decompress
    single-threaded scalar    2275 |||||||||
    multi-threaded scalar     2334 |||||||||
  Lua
    single-threaded scalar    3922 |||||||||||||||
    multi-threaded scalar     3922 |||||||||||||||
Floating Point
  Mandelbrot
    single-threaded scalar    2669 ||||||||||
    multi-threaded scalar     2714 ||||||||||
  Dot Product
    single-threaded scalar    4274 |||||||||||||||||
    multi-threaded scalar     4571 ||||||||||||||||||
    single-threaded vector    5160 ||||||||||||||||||||
    multi-threaded vector     6013 ||||||||||||||||||||||||
  LU Decomposition
    single-threaded scalar    3423 |||||||||||||
    multi-threaded scalar     3462 |||||||||||||
  Primality Test
    single-threaded scalar    4521 ||||||||||||||||||
    multi-threaded scalar     3666 ||||||||||||||
  Sharpen Image
    single-threaded scalar   10417 |||||||||||||||||||||||||||||||||||||||||
    multi-threaded scalar    10529 ||||||||||||||||||||||||||||||||||||||||||
  Blur Image
    single-threaded scalar    8121 ||||||||||||||||||||||||||||||||
    multi-threaded scalar     8090 ||||||||||||||||||||||||||||||||
Memory
  Read Sequential
    single-threaded scalar    5714 ||||||||||||||||||||||
  Write Sequential
    single-threaded scalar    8351 |||||||||||||||||||||||||||||||||
  Stdlib Allocate
    single-threaded scalar    3093 ||||||||||||
  Stdlib Write
    single-threaded scalar    7264 |||||||||||||||||||||||||||||
  Stdlib Copy
    single-threaded scalar   13220 |||||||||||||||||||||||||||||||||||||||||||||                                                                             |||||||
Stream
  Stream Copy
    single-threaded scalar    5255 |||||||||||||||||||||
    single-threaded vector    7312 |||||||||||||||||||||||||||||
  Stream Scale
    single-threaded scalar    5217 ||||||||||||||||||||
    single-threaded vector    7025 ||||||||||||||||||||||||||||
  Stream Add
    single-threaded scalar    5292 |||||||||||||||||||||
    single-threaded vector    6581 ||||||||||||||||||||||||||
  Stream Triad
    single-threaded scalar    5426 |||||||||||||||||||||
    single-threaded vector    4981 |||||||||||||||||||
Integer Score:                2675 ||||||||||
Floating Point Score:         5545 ||||||||||||||||||||||
Memory Score:                 7528 ||||||||||||||||||||||||||||||
Stream Score:                 5886 |||||||||||||||||||||||
Overall Geekbench Score:      4971 |||||||||||||||||||

Geekbench Results:http://browse.geekbench.ca/geekbench2/view?id=520769