[转载]与朋友或同事谈到mysql查询缓存功能的时候,个人喜欢把Query Cache比作荔枝, 是非常营养的东西,但是一次性吃太多了,就容易导致上火而流鼻血,虽然不是特别恰当的比喻,但是有很多相似的地方,另外Query Cache有其特殊的业务场景,也不像其他数据库产品,缓存查询语句的执行计划等信息,而是直接缓存查询语句的记录集和对应的SQL语句。本文就给大家介 绍下查询缓存的相关知识,希望可以引导大家正确地使用Query Cache这个独门武器。
对mysql查询缓存从五个角度进行详细的分析:Query Cache的工作原理、如何配置、如何维护、如何判断查询缓存的性能、适合的业务场景分析。
阅读全文...
7zip是一款开源的解压缩软件,不仅自己独有的7z格式,而且支持zip,rar,tar,gzip等众多其他格式,同时7z格式的压缩比例很 高,目前很多硬盘版的游戏都采用zip进行打包。下面介绍一下如何在CentOS/Debian/Ubuntu Linux上安装7zip。
CentOS安装7zip:
目前yum源上好像还没有7zip,我们可以到http://dag.wieers.com/rpm/packages/p7zip/下载rpm包安装。
linux系统多少位查看方法:
终端输入: file /sbin/init
如 显示:/sbin/init: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
即是32位的 linux, 如是64位的, 显示的是 64-bit
Linux启动项
apmd--apmd用来监视系统用电状态,并将相关信息通过syslogd写入日志。也可以用来在电源不足时关机
arpwatch--用来维护以太网物理地址和ip地址的对应关系
atd--运行用户用at命令调度的任务。也在系统负荷比较低时运行批处理任务
autofs--当您需要时自动转载文件系统,而当您不需要时自动卸载
chargen--tcp版本的chargen server
chargen-udp--udp版本的chargen server
crond--周期地运行用户调度的任务。比起传统的unix版本添加了不少属性,而且更安全,配置更简单
daytime--tcp版本的daytime server
daytime-udp--udp版本的daytime server
echo--tcp版本的echo server阅读全文...
yum groupinstall "X Window System" 安装X Window System
yum groupinstall "GNOME Desktop Environment" 安装GNOME Desktop Environment
startx 启动图形界面阅读全文...
安装PHP
#wget http://cn2.php.net/get/php-5.3.8.tar.gz/from/cn.php.net/mirror
#tar -zxvf php-5.3.8.tar.gz
#cd php-5.3.8
#./configure --prefix=/usr/local/php --enable-fpm --with-mcrypt=/usr/local/libmcrypt --with-zlib --enable-mbstring --with-openssl --with-mysql --with-mysqli --with-mysql-sock --with-gd --with-jpeg-dir=/usr/lib --enable-gd-native-ttf --without-sqlite --enable-pdo --with-gettext --with-curl --with-pdo-mysql --enable-sockets --enable-bcmath --enable-xml --with-bz2 --with-gettext --with-snmp --enable-zip --with-snmp --with-png-dir=/usr/lib
出现如下内容,
+--------------------------------------------------------------------+
| License: |
| This software is subject to the PHP License, available in this |
| distribution in the file LICENSE. By continuing this installation |
| process, you are bound by the terms of this license agreement. |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point. |
+--------------------------------------------------------------------+
Thank you for using PHP.
安装
#make
#make install
# wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.12.tar.gz
# tar zxvf pcre-8.12.tar.gz
# cd pcre-8.12
# ./configure --prefix=/usr/local/webserver/pcre
&nbs阅读全文...
@关闭SELinux
#vi /etc/selinux/config
设置: SELINUX="disabled"
@升级必备程序
#yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers libevent-devel libtool-ltdl libtool-ltdl-devel阅读全文...
@安装LibMMSeg
#wget http://www.coreseek.cn/uploads/csft/3.2/mmseg-3.2.14.tar.gz
#tar zxf mmseg-3.2.14.tar.gz
#cd mmseg-3.2.14
#./configure --prefix=/usr/local/webserver/mmseg
注意看是否有
#make
出错:cannot find input file: src/Makefile.inaclocal
解决:
#aclocal
#libtoolize --force 运行后有一个错误,不用管它。
#automake --add-missing
#autoconf
#autoheader
#make clean
再次配置
#./configure --prefix=/usr/local/webserver/mmseg
再次#make
#make install阅读全文...
#groupadd vsftpd
#useradd vsftpftp -g vsftpd -d /data/www -s /sbin/nologin
#passwd vsftpftp
输入两次密码
#cd /usr/local/src
#wget http://fossies.org/linux/misc/vsftpd-3.0.2.tar.gz
#tar zxvf vsftpd-3.0.2.tar.gz
#mv vsftpd-3.0.2 /usr/local/webserver/vsftpd
#cd /usr/local/webserver/vsftpd
#mkdir /usr/local/man/man8
#mkdir /usr/local/man/man5
#make