Unix环境下简单的部署memchache
发表于:2024-09-26 作者:千家信息网编辑
千家信息网最后更新 2024年09月26日,在很多大型网站或者是资讯类站点下往往都会有海量的查询,那么为了减小数据库的压力就出现了缓存系统,现在比较流行的缓存系统有很多,如memcache、Xcache等等,在这里就简单的说说开源的memcac
千家信息网最后更新 2024年09月26日Unix环境下简单的部署memchache
在很多大型网站或者是资讯类站点下往往都会有海量的查询,那么为了减小数据库的压力就出现了缓存系统,现在比较流行的缓存系统有很多,如memcache、Xcache等等,在这里就简单的说说开源的memcache的简单部署和使用。
memcache的使用要依赖于libevent网络库,所以在安装memcache之前必需要先安装libevent网络库然后再安装memcache,这里在二者的官网上都有稳定版的二进制包下载。libevent官网:http://libevent.org/,memcache官网:http://memcached.org/
[root@localhost src]# tar -zxvf libevent-2.1.8-stable.tar.gz[root@localhost src]# tar -zxvf memcached-1.4.34.tar.gz[root@localhost src]# cd libevent-2.1.8-stable[root@localhost libevent-2.1.8-stable]# ./configure --prefix=/usr/local/libevent[root@localhost libevent-2.1.8-stable]# make && make install[root@localhost libevent-2.1.8-stable]# cd ../memcached-1.4.34[root@localhost memcached-1.4.34]# ./configure --prefix=/usr/local/memchached --with-libevent=/usr/local/libevent[root@localhost memcached-1.4.34]# make && make install#实际到这一步基本安装就完毕了,但是最好还是要配置下相应环境[root@localhost memcached-1.4.34]# cd /usr/local/[root@localhost local]# ln -sv /usr/local/libevent/include/* /usr/include/#添加lib和include[root@localhost local]# ln -sv /usr/local/memchached/include/* /usr/include/[root@localhost local]# cd /etc/ld.so.conf.d/[root@localhost ld.so.conf.d]# vim libevent.conf/usr/local/libevent/lib[root@localhost ld.so.conf.d]# ldconfig[root@localhost ld.so.conf.d]# cd /etc/profile.d/#添加bin文件的环境路径[root@localhost profile.d]# vim libevent.shexport PATH=$PATH:/usr/local/libevent/bin[root@localhost profile.d]# source libevent.sh[root@localhost profile.d]# vim memcache.shexport PATH=$PATH:/usr/local/memchached/bin[root@localhost profile.d]# source memcache.sh
如此memcache的服务端部署就完成了,这里就说明下memcache的常用参数选项:
-d:用守护进程启动-m:以兆字节分配memcache的内存,缺省是64M-u:仅当以root是用户启动时,确定memcache的启动用户-p:用tcp端口指定memcache的监听端口,缺省是11211-U:用udp端口指定memcache的监听端口,缺省是11211,0表示关闭-c:确定memcache的最大并发连接数,缺省是1024-P:当使用-d的deamon模式时指定pid文件-s:指定要监听的socket文件,使用该选项为禁用网络支持-a:当使用套接字监听文件时,用于确定socket文件的文件掩码,缺省是0700-l:确定memcache的服务器监听ip
文件
监听
端口
网络
环境
用户
系统
缓存
服务
最大
二进制
内存
压力
参数
套接字
字节
实际
常用
数据
数据库
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
达州网络技术近期价格
互联网没什么科技技术
质量好软件开发多少钱
浅谈数据库技术初步认识
raid1 服务器电池电量不足
上海计算机网络技术的学校
地区三级联动数据库
上海品质软件开发联系人
基于数据库做分布式锁
云服务器备份方案
魔兽世界联盟服务器插件
日历时间数据库
永劫无间今天无法连接服务器
网络安全知识大纲
大家保险软件开发
数据库性能方面设计
机器学习数据库可以分为几类
浙教版高中网络技术应用
银川市网络安全宣传倡议书
最常用的软件开发方法有哪些
机房服务器专用机柜
简要简述对信息网络安全的理解
市人大常委会重视网络安全
宜兴通用软件开发定制价格
宜阳软件开发
济南弘日网络技术有限公司
数据库太大查不到
内存数据库 h2
网络安全宣常识
第一历史档案馆数据库阅读