memcached

安装libevent
tar zxvf libevent-1.4.5-stable.tar.gz 
cd libevent-1.4.5-stable
./configure --prefix=/usr/
make
make install

安装memcache
tar zxvf memcached-1.2.5.tar.gz 
cd memcached-1.2.5
./configure --with-libevent=/usr/
make
make install


配置LD_LIBRARY_PATH
vim ~/.bash_profile # 在最后加入一行 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib


启动memcache memcached -d -m 128 -p 12000 -u root 参数名称
作用 -d 作为守护进程启动 -m 指定使用的内存大小 -p 服务器端的监听端口 -u 用于运行memcached的用户 确认memcache成功启动
[code="java"]# ps aux | grep memcached
root 19913 0.0 0.0 18240 2184 ? Ss 11:14 0:00
memcached -d -m 128 -p 12000 -u root
root 19933 0.0 0.0 61148 700 pts/4 R+ 11:17 0:00[/code]
grep memcached IHS中需要修改的地方:
打开httpd.conf
cd /opt/IBM/HTTPServer/conf vim httpd.conf

加载mod_rewrite 去掉该行行首的#
# LoadModule rewrite_module modules/mod_rewrite.so

添加重写规则,紧跟在所有LoadModule指令之后
RewriteEngine on RewriteRule ^/online/s/(.*)/(.*)\.html$ /online/$1Action.do?method=$2&staticDisplay=front&%{QUERY_STRING} [PT]
RewriteRule ^/online/si/(.*)/(.*)/(.*)\.html$ /online/$1Action.do?method=$2&id=$3&staticDisplay=front&%{QUERY_STRING} [PT]
RewriteRule ^/online/sc/(.*)/(.*)/(.*)\.html$ /online/$1Action.do?method=$2&category=$3&staticDisplay=front&%{QUERY_STRING} [PT]
RewriteRule ^/online/st/(.*)/(.*)/(.*)\.html$ /online/$1Action.do?method=$2&typeId=$3&staticDisplay=front&%{QUERY_STRING} [PT]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值