Centos6.6 安装Memcached
2024-08-31 06:32:56
一.环境介绍
1)Centos6.4
2) memcached-1.4.24
二.部署安装
计划具体部署步骤:
步骤1:安装
步骤2:配置
步骤3:运行
步骤4:检查
现在开始:
1)安装
$ yum install -y wget gcc $ wget http://cloud.github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz $ tar zxvf libevent-2.0.-stable.tar.gz $ cd libevent-2.0.-stable $ ./configure --prefix=/usr/local/libevent $ make && make install
$ wget http://www.memcached.org/files/memcached-1.4.24.tar.gz $ tar zxvf memcached-1.4..tar.gz $ cd memcached-1.4. $ ./configure --prefix=/usr/local/memcached --with-libevent=/usr/local/libevent $ make && make install $ ln -s /usr/local/memcached/bin/memcached /usr/local/bin/
2)配置
$ touch /etc/init.d/memcached $ chmod /etc/init.d/memcached $ vi /etc/init.d/memcached #!/bin/sh # # memcached: MemCached Daemon # # chkconfig: - # description: MemCached Daemon # # Source function library. . /etc/rc.d/init.d/functions . /etc/sysconfig/network start() { echo -n $"Starting memcached: " daemon /usr/local/bin/memcached -u daemon -d -m -l 0.0.0.0 -c -p echo } stop() { echo -n $"Shutting down memcached: " killproc memcached echo } [ -f /usr/local/bin/memcached ] || exit # See how we were called. case "$1" in start) start ;; stop) stop ;; restart|reload) stop start ;; condrestart) stop start ;; *) echo $"Usage: $0 {start|stop|restart|reload|condrestart}" exit esac exit
3)运行
$ /etc/init.d/memcached start $ chkconfig memcached on
4)检查
#主要是检查进程以及端口
$ ps aux|grep memcached $ netstat -ntlp|grep memcached $ echo "stats settings" | nc 127.0.0.1
最新文章
- VC++ 设置软件开机自启动的方法
- eclipse 配置c++
- 使用IDEA和gradle搭建Spring MVC和MyBatis开发环境
- Android——GridView(网格视图)相关知识总结贴
- js如何判断一个数组中是否有重复的值
- dive into python 读笔(2)
- 将java应用程序打包成可执行文件
- Pasha and Phone(思维)
- Oracle 11g RAC database on ASM, ACFS or OCFS2
- Log4j配置文件位置+Spring数据源配置文件位置
- 运行时动态库:not found 及介绍-linux的-Wl,-rpath命令
- Message高级特性 &; 内嵌Jetty实现文件服务器
- 用pip安装python库下载timeout的解决办法
- mybatis入门--mybatis和hibernate比较
- 代码静态扫描工具sonar
- 关于ArrayList.clear()与=null以及new ArrayList<;E>;()
- 与众不同 制作会唱歌的WinRAR - imsoft.cnblogs
- OSS和CDN配置使用
- line search中的重要定理 - 梯度与方向的点积为零
- java多线程(一)之继承Thread类