标签:href 编译 ati set www configure 规划 bin group
安装环境Memcached编译安装环境
L:Linux(centos 7.6)
R: Memcached(1.5.12)http://www.memcached.org/files/memcached-1.5.12.tar.gz
主机信息:
部署规划:
172.24.77.241(sr1.dj.com):运行Memcached
172.24.77.242(sr2.dj.com):运行Memcached
cd /usr/local/src/
wget http://www.memcached.org/files/memcached-1.5.12.tar.gz
yum install libevent libevent-devel –y
tar xvf memcached-1.5.12.tar.gz
cd memcached-1.5.12
./configure --prefix=/usr/local/memcache
make && make install
添加启动用户
groupadd -g 1001 memcached && useradd -u 1001 -g 1000 memcached -s /sbin/nologin
/usr/local/memcache/bin/memcached -u memcached -p 11211 -m 2048 -c 65536 &
tar xvf memcached-1.2.8-repcached-2.2.1.tar.gz
cd memcached-1.2.8-repcached-2.2.1
./configure --prefix=/usr/local/repcached --enable-replication
cp memcached.c memcached.c.bak
vim memcached.c +56
/ FreeBSD 4.x doesn‘t have IOV_MAX exposed. /
ifndef IOV_MAX
define IOV_MAX 1024
endif
make
make install
/usr/local/repcached/bin/memcached -h
通过 repcached 安装的 memcached 命令启动 memcache 服务并实现 memcache 主备结构,其中-x 为对方即主 memcache 的 IP, -X 为本地启动的用数据同步的端口:
server 1 相关操作:
/usr/local/repcached/bin/memcached -d -m 2048 -p 11211 -u root -c 2048 -x 172.24.77.243 -X 16000
server 2 相关操作:
/usr/local/repcached/bin/memcached -d -m 2048 -p 11211 -u root -c 2048 -x 172.24.77.241 -X 16000
yum install telnet -y
telnet 172.24.77.243 11211
set name 0 4
test
quit
telnet 172.24.77.241 11211
标签:href 编译 ati set www configure 规划 bin group
原文地址:https://blog.51cto.com/13688209/2509807