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

Store Session with Memcached in Magento

app/etc/local.xml : [codesyntax lang="xml"] <config> <global> <session_save><![CDATA[memcache]]></session_save> <session_save_path><![CDATA[tcp://127.0.0.1:11211?persistent=1&weight=2&timeout=10&retry… Continue reading
Posted in Magento| Tagged | 2 Comments

Linux C hello world

1. vi functions.c [codesyntax lang="c"] #include <stdio.h> void hello_world(void) { printf("hello world!!\n"); } [/codesyntax] 2. vi hello.c [codesyntax lang="c"] #include <stdio.h> #include <stdlib.h… Continue reading
Posted in C, Linux| Tagged , | Leave a comment

My Linux files/dirs Distribution

Here is my linux files/dirs distribution. Main purpose is to easily centralized data maintenance. Company abc's directory /data/abc/ All web applications /data/abc/vhosts/ All the packages and depende… Continue reading
Posted in Linux| Tagged | Leave a comment

Install Webbench

1. Install [codesyntax lang="bash"] $ wget http://home.tiscali.cz/~cz210552/distfiles/webbench-1.5.tar.gz $ mkdir /usr/local/man $ tar zxvf webbench-1.5.tar.gz $ cd webbench-1.5 $ make && make install… Continue reading
Posted in Linux| Tagged , | Leave a comment

Encode PHP by ionCube

1. Environment : PHP 5.2.14 PHP-FPM 0.5.14 2. Encode with ionCube : Download(purchase or try free trial) ionCube encoder from http://www.ioncube.com/ [codesyntax lang="bash"] $ cd /data/soft_misc/ $ t… Continue reading
Posted in Optimization, PHP| Tagged , | Leave a comment

Sync Up the Repository by Rsync

rsync server : 192.168.0.132 rsync client : 192.168.0.133 1. Check and Install rsync : [codesyntax lang="bash"] $ rpm -q rsync $ yum install rsync [/codesyntax] or download and install from http://rsy… Continue reading
Posted in RHEL| Tagged , | Leave a comment

Install yum on RHEL5

1. Delete the default yum : [codesyntax lang="bash" lines="no" container="pre" tab_width="4"] $ rpm -aq | grep yum | xargs rpm -e --nodeps [/codesyntax] 2. Install yum of from http://mirrors.163.com/c… Continue reading
Posted in RHEL| Tagged , | 2 Comments