blog上mysql的简单备份

#!/bin/sh
USERNAME=root
PASSWORD=123456

DATE=`date +%Y-%m-%d`
OLDDATE=`date +%Y-%m-%d -d '-1 days'`
#FTPOLDDATE=`date +%Y-%m-%d -d '-60 days'`

MYSQL=/usr/local/mysql/bin/mysql
MYSQLDUMP=/usr/local/mysql/bin/mysqldump
MYSQLADMIN=/usr/local/mysql/bin/mysqladmin
SOCKET=/tmp/mysql.sock

BACKDIR=/data/backup/db
[ -d ${BACKDIR} ] || mkdir -p ${BACKDIR}
[ -d ${BACKDIR}/${DATE} ] || mkdir ${BACKDIR}/${DATE}
[ ! -d ${BACKDIR}/${OLDDATE} ] || rm -rf ${BACKDIR}/${OLDDATE}

for DBNAME in wordpress
#for DBNAME in mysql wordpress
do
${MYSQLDUMP} -u${USERNAME} -p${PASSWORD} ${DBNAME}> ${BACKDIR}/${DATE}/${DBNAME}-backup-${DATE}.sql
tar -cjvf ${BACKDIR}/${DATE}/${DBNAME}-backup-${DATE}.sql.tar.bz2 ${BACKDIR}/${DATE}/${DBNAME}-backup-${DATE}.sql && rm -rf ${BACKDIR}/${DATE}/${DBNAME}-backup-${DATE}.sql
#gzip > ${BACKDIR}/${DATE}/${DBNAME}-backup-${DATE}.sql.gz && rm -rf ${BACKDIR}/${DATE}/${DBNAME}-backup-${DATE}.sql
#logger "${DBNAME} has been backup successful - $DATE"
/bin/sleep 5
done

eg

[root@326219 db]# ls 2012-10-28/
wordpress-backup-2012-10-28.sql.tar.bz2

fedora初始化

多媒体支持
su -c 'yum localinstall --nogpgcheck http://mirrors.163.com/rpmfusion/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://mirrors.163.com/rpmfusion/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm'

安装 mp3 和其它音频支持:

yum install gstreamer-plugins-good gstreamer-plugins-bad gstreamer-plugins-ugly libtunepimp-extras-freeworld xine-lib-extras-freeworld -y

#视频解码库

yum install ffmpeg ffmpeg-libs gstreamer-ffmpeg libmatroska xvidcore -y

好用的输入法
yum -y install fcitx
之后,修改环境变量:
vi ~/.bashrc
#增加如下内容:
export GTK_IM_MODULE=xim
export XMODIFIERS="@im=fcitx"
export QT_IM_MODULE=xim

#保存后退出。

yum install dkms gcc install kernel-devel kernel-headers
yum update kernel
reboot os is ok

php.ini安全配置

php的安全模式
安全,PHP代码编写是一方面,PHP的配置更是非常关键。

海岛程序要求 安全,所以
) 安全模式下执行程序主目录
safe_mode_exec_dir = /us/local

今天只用到这个,其它的详细见下面
http://www.phpwind.net/read-htm-tid-944838.html
http://club.topsage.com/thread-2270341-1-1.html