Google
 

2009年09月02日

●database backup

#!/bin/sh

keepday=30

dest=/var/share/backup

/usr/bin/pg_dump cms_production > $dest/pgsql-backup

srcfile=$dest/pgsql-backup

timestamp=`date +%Y%m%d`
old_date=`date "-d$keepday days ago" +%Y%m%d`

bkfile=$dest/$timestamp.tar.gz

tar zcvf $bkfile $srcfile > /dev/null 2>&1

if [ $? != 0 -o ! -e $bkfile ]; then
echo "backup faild -- ($srcfile)"
exit 1
fi

rmfile=$dest/$old_date.tar.gz

if [ -e $rmfile ]; then
rm -f $rmfile
fi

rm -f $dest/pgsql-backup


#database backup
29 0 * * * /var/www/dbbackup.sh > /dev/null 2>&1

2009年08月03日

●Xinstall

#yum grouplist

#yum groupinstall "X Window System" "GNOME Desktop Environment"

#X -configure

#setup

2009年07月28日

●UTF-8をSJISに変換

htaccess
php_flag output_buffering On
php_value output_handler mb_output_handler
php_value default_charset Shift_JIS
php_value mbstring.language Japanese
php_flag mbstring.encoding_translation On
php_value mbstring.http_input auto
php_value mbstring.http_output Shift_JIS
php_value mbstring.internal_encoding UTF-8
php_value mbstring.substitute_character none

続きを読む "UTF-8をSJISに変換"
2009年07月25日

●eaccelerator

wget http://nchc.dl.sourceforge.net/sourceforge/eaccelerator/eaccelerator-0.9.5.tar.bz2
bunzip2 eaccelerator-0.9.5.tar.bz2
tar xvf eaccelerator-0.9.5.tar -C /usr/local/src
cd /usr/local/src/eaccelerator-0.9.5
phpize


./configure --enable-eaccelerator=shared --with-php-config=/usr/bin/php-config --with-eaccelerator-info

make
make install
cp ./modules/eaccelerator.so /usr/lib/php/extensions/


php.ini

zend_extension = "/usr/lib/php/extensions/eaccelerator.so"
eaccelerator.shm_size="16"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.log_file = "/var/log/eaccelerator_log"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
eaccelerator.allowed_admin_path="/home/kimchi/html/control.php"

2009年07月08日

●debian crontab エディター変更

# update-alternatives --config editor

2009年06月23日

●Debian不要なサービスの自動起動を停止

# update-rc.d -f apache2 remove

# update-rc.d apache2 defaults


# apt-get update

# apt-get upgrade

2009年06月06日

●Windows 2000で大容量HDを使う

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\atapi\Parameters]
"EnableBigLba"=dword:00000001

2009年05月20日

●courier-imap

wget http://optusnet.dl.sourceforge.net/sourceforge/courier/courier-authlib-0.59.tar.bz2
tar -xjf courier-authlib-0.59.tar.bz2
chown -R root.root courier-authlib-0.59
cd courier-authlib-0.59

./configure --prefix=/usr/local/courier-authlib --without-authpam --without-authldap --without-authpwd --without-authmysql --without-authpgsql --without-authshadow --without-authuserdb --without-authcustom --without-authcram --without-authpipe --with-authdaemon --with-authvchkpw --with-redhat

make
make install
make install-configure


vi /usr/local/courier-authlib/etc/authlib/authdaemonrc
authmodulelist="authvchkpw"


cp courier-authlib.sysvinit /etc/rc.d/init.d/courier-authlib
chmod 744 /etc/rc.d/init.d/courier-authlib
chkconfig --add courier-authlib

/etc/rc.d/init.d/courier-authlib start

wget http://optusnet.dl.sourceforge.net/sourceforge/courier/courier-imap-4.1.2.tar.bz2
tar -xjf courier-imap-4.1.2.tar.bz2
chown -R root.root courier-imap-4.1.2
cd courier-imap-4.1.2

COURIERAUTHCONFIG=/usr/local/courier-authlib/bin/courierauthconfig CPPFLAGS=-I/usr/local/courier-authlib/include ./configure --prefix=/usr/local/courier-imap --disable-root-check --with-ssl --enable-unicode=iso-2022-jp,iso-8859-1,utf-8,iso-8859-10 --with-redhat

make
make install
make install-configure

2009年05月18日

●OIDs

PostgreSQL8.x デフォルトの設定でOIDsの設定は無効。
プリマリキーが存在しない時、プリマリキーとしてOIDsは認識しない。

postgresql.conf

default_with_oids = on

2009年05月11日

●XdebugとWinCacheGrind

XdebugとWinCacheGrind