Archive for March 2008

php , date_default_timezone_set

Sets the default timezone used by all date/time functions in a script

date_default_timezone_set( “Asia/Taipei” );

useful mysql command

show status like ‘Qcache%’;

explain select …..

分析 schema 

echo “select * from tbl_item procedure analyse()\G” | mysql db_name > ana.txt

mysql turning off query cache

set GLOBAL query_cache_size=0

File System Benchmarks for Postfix Mail Server

Protected: 在CentOS 4.5上安裝Oracle 10g

This post is password protected. To view it please enter your password below:


Protected: [轉貼] CentOS 5.1-初始環境設定

This post is password protected. To view it please enter your password below:


Protected: centos routing

This post is password protected. To view it please enter your password below:


adject file descriptors

On Unix, each TCP/IP connection uses a file descriptor, so you must increase the total number of descriptors available to the operating system, and also increase the maximum number of descriptors each process is allowed to use. All Unix style operating systems have a “ulimit” shell command (sh and bash) which can allow more open file descriptors to commands started in that shell, once the appropriate kernel tweak has been made. We recommend “ulimit -n 8192″. Here are our recommended kernel tweaks:

Linux: “echo 65536 > /proc/sys/fs/file-max” changes the number of system-wide file descriptors

FreeBSD: append to /etc/sysctl (or you can use sysctl -w to add these)

kern.maxfiles=65536
kern.maxfilesperproc=32768

Solaris: add the following to /etc/system and reboot:

set rlim_fd_max=0×8000
set rlim_fd_cur=0×8000

Top10SQLPerformanceTips

Top 84 MySQL Performance Tips

You can check the same tips from here.Here is very useful tips for all mysql DBA’s,

Developers these tips are noted from MySQL Camp 2006 suggested by mysql community experts. Continue reading ‘Top 84 MySQL Performance Tips’ »

Protected: Zend Framework

This post is password protected. To view it please enter your password below:


centos start up some service

chkconfig –level 234 httpd on

install package in Solaris 10

# pkgadd -d . SFWgcc2l

bash for Solaris 10

-bash-3.00$ cat .profile

export TERM=”vt100″
export EDITOR=”vi”
export PATH=”/usr/local/bin:/opt/sfw/bin:/usr/ucb:/bin:/sbin:/usr/bin:/usr/sbin:$PATH”
export LC_CTYPE=”en_US.ISO_8859-1″
alias h=”history 300″

umask 022

CSHRC for Solaris

[code language='sh']
umask 022
set path=(/usr/ucb /usr/local/bin /usr/ccs/bin /usr/X/bin /usr/sbin /bin /usr/bin /etc)
#set prompt="`whoami`@`hostname`:`pwd`% "
if ( $?prompt ) then
set history=32
endif

#set prompt="`whoami`@`hostname -s`:`pwd`%"
#alias cd ' chdir \!*; set prompt="`whoami`@`hostname`:`pwd`%"'
unset autologout
alias cd 'chdir \!*; set prompt="\n`whoami`@`hostname`:`pwd`% \n[%h] "'
set prompt="\n`whoami`@`hostname`:`pwd`% \n[%h] "
alias pu ' pushd \!*; set prompt="\n`whoami`@`hostname`:`pwd`% \n[%h] "'
alias po ' popd; set prompt="\n`whoami`@`hostname`:`pwd`% \n[%h] "'
alias cp 'cp -i'
alias mv 'mv -i'
alias rm 'rm -i'
alias del 'rm -i'
alias m more
set path = ($path ./)
alias h 'history 25'
alias j 'jobs -l'
alias la 'ls -a'
alias lf 'ls -FA'
alias ll 'ls -lA'
setenv LD_LIBRARY_PATH /usr/local/lib/mysql
alias joe 'joe -asis -nobackups -noxon'
[/code]

How to restart sshd service in solaris 10

/lib/svc/method/sshd restart

正解:

svcadm restart ssh

Protected: 前台安裝標準SOP

This post is password protected. To view it please enter your password below:


Protected: PHP 檢查信用卡號碼

This post is password protected. To view it please enter your password below:


simple Makefile

compile multiple source code