Master-Slave MySQL-5.1 Replication

Environment: RHEL: 5.3 MySQL: 5.1.54 Master : 1. MySQL user and group [codesyntax lang="bash"] $ groupadd mysql $ useradd -g mysql mysql [/codesyntax] 2. Download and install MySQL [codesyntax lang="b… Continue reading
Posted in MySQL, RHEL| Tagged , | 2 Comments

Example of nginx.conf

Download example of nginx config file : nginx.conf [codesyntax lang="apache"] # nobody nobody but you ... user nobody; # max concurrent requests = worker_processes * worker_connections worker_processe… Continue reading
Posted in Nginx| Tagged , , , | Leave a comment

Customizing Magento Module with Event-Observer

1. About the Module : This module is for media sync when deploying magento as distributed application Module located at : app/code/local/Kim/Syncmedia/ There are only 4 files list below to make that a… Continue reading
Posted in Magento| Tagged | 2 Comments

PHP-FPM for RHEL

1. Patch PHP-FPM to PHP [codesyntax lang="bash"] $ wget http://php-fpm.org/downloads/php-5.2.17-fpm-0.5.14.diff.gz $ wget http://cn.php.net/distributions/php-5.2.17.tar.bz2 $ tar -jxf php-5.2.17.tar.b… Continue reading
Posted in PHP, RHEL| Tagged , | Leave a comment

Custom Function - getElementsByClassName

[codesyntax lang="javascript"] document.getElementsByClassName = function(className) { var hasClassName = new RegExp("(?:^|\\s)" + className + "(?:$|\\s)"); var allElements = document.getElementsByTag… Continue reading
Posted in JavaScript| Tagged | Leave a comment

My /etc/rc.local in Development Server of RHEL

[codesyntax lang="bash"] #!/bin/sh # # This script will be executed *after* all the other init scripts. # You can put your own initialization stuff in here if you don't # want to do the full Sys V sty… Continue reading
Posted in Linux, RHEL| Tagged , | Leave a comment

One Tips for the Loading Order of Environment Files

loading order which? who? when? 1 /etc/enviroment system once 2 /etc/profile (& /etc/profile.d/*) all users once 3 ~/.bash_profile | ~/.bash_login | ~/.profile you once 4 ~/.bashrc you each time 5 /et… Continue reading
Posted in Linux| Tagged , | Leave a comment

XHProf for PHP Profile

Environment : php 5.2.14 xhprof 0.9.2 graphviz 2.26.3 1. Download and install xhprof : [codesyntax lang="bash"] $ wget http://pecl.php.net/get/xhprof-0.9.2.tgz $ tar -xzf xhprof-0.9.2.tgz $ cd xhprof-… Continue reading
Posted in Optimization, PHP| Tagged , , | Leave a comment

Linux Hardware Detection

[codesyntax lang="bash"] # Linux Version $ cat /proc/version # System Core $ uname -a # CPU Type $ cat /proc/cpuinfo | grep "model name" | head -1 # Base Board Information $ dmidecode | more # Total M… Continue reading
Posted in Linux| Tagged | Leave a comment