归档之于 ‘ 2013 年一月

安装php memcached扩展支持

需要安装的插件

http://pecl.php.net/package/memcached

https://launchpad.net/libmemcached/+download

先安装libmemcached

./configure –prefix=/usr/local/libmemcached  –with-memcached
make && make install

如果遇到libmemcached编译报错请看
libmemcached 编译错误

阅读全文

linux nginx gzip 配置详解

先看示例

gzip on;
gzip_buffers 4 16k;
gzip_comp_level 2;
gzip_min_length 1000;
gzip_http_version 1.1;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain application/xml;
gzip_disable "MSIE [1-6]\.";
gzip_vary off;

打开nginx.conf找到gzip修改就可以了。

阅读全文

删除wordpress侧边栏的功能

找到网站wordpress安装目录,在wp-includes/default-widgets.php中,在此文件里搜索查找<li>标签里带有rss2_url、comments_rss2_url、wordpress.org,就可以找到了。

libmemcached 编译错误 libmemcached/auto.cc: In function ‘memcached_return_t text_incr_decr(memcached_server_st*, bool, const char*, size_t, uint64_t, bool)’:

编译libmemcached1.0.6时出现
libmemcached/auto.cc: In function ‘memcached_return_t text_incr_decr(memcached_server_st*, bool, const char*, size_t, uint64_t, bool)’:
libmemcached/auto.cc:73: error: expected `)’ before ‘PRIu64’
是gcc版本过低,需要更新并且设置全局变量。

首先
yum install gcc44 gcc44-c++ libstdc++44-devel
export CC=/usr/bin/gcc44
export CXX=/usr/bin/g++44

然后重新编译即可

return top