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

gentoo wine rtx

http://wiki.gentoo.org/wiki/Wine
http://www.php-oa.com/2011/01/06/linux-wine-rtx.html
http://www.haogongju.net/art/1371511
http://www.cnblogs.com/pchgo/archive/2012/03/29/2423488.html

winetm2009安装使用

http://www.longene.org/forum/viewtopic.php?f=6&t=4700

1.用归档管理器 解压 tm2009 ,然后
2.evan@mygentoo ~ $ sudo cp -a opt/longene/ /opt/.
3.mygentoo ~ #/opt/longene/tm2009/tm2009.sh

#如果桌面没有tm2009 icon 重启机器 再执行一下上面的脚本

ondav971

http://item.tmall.com/item.htm?id=16784515703
http://item.taobao.com/item.htm?spm=a230r.1.10.65.aa079e&id=15635798588&_u=eavjbas091f
http://detail.tmall.com/item.htm?spm=a230r.1.10.1.70ac9a&id=16745023391&_u=eavjbasae4b

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