背景:
阅读新闻
memcached服务器和客户端脚本安装
[日期:2013-01-25] 来源:Linux社区 作者:5921271 [字体:]
memcached服务器端
#!/bin/bash
yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype
yum -y install freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel
yum -y install bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5
yum -y install krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap
yum -y install openldap-clients openldap-servers ntpd nmap patch cmake bison cgi* libtool-* gettext
yum -y install *libxml-devel libcurl-devel libevent libevent-devel net-snmp-devel lsof unzip
cd /mydata/soft/
tar -zxvf libevent-1.4.13-stable.tar.gz
cd libevent-1.4.13-stable
./configure --prefix=/usr
make && make install
ls -al /usr/lib|grep libevent
cd /mydata/soft/
tar -zxvf memcached-1.4.5.tar.gz
cd memcached-1.4.5
./configure --with-libevent=/usr
make && make install
ls -al /usr/local/bin/mem*
##标红的地方可自行修改
memcached客户端
#!/bin/bash
cd /mydata/soft/
tar -zxvf memcache-2.2.5.tgz
cd memcache-2.2.5
/usr/local/php/bin/phpize
./configure --enable-memcache --with-php-config=/usr/local/php/bin/php-config --with-zlib-dir
make && make install
cd /usr/local/php/etc/php.d
touch /usr/local/php/etc/php.d/memcache.ini
echo "extension = \"memcache.so\"" >> /usr/local/php/etc/php.d/memcache.ini
echo "memcache.chunk_size = 32768" >> /usr/local/php/etc/php.d/memcache.ini
##标红的地方可自行修改
启动服务
memcached -d -m 2048 -u root -l IP -p 11211 -c 3096 -P /tmp/memcached.pid
相关资讯
本文评论 查看全部评论 (0)
尊重网上道德,遵守中华人民共和国的各项有关法律法规 承担一切因您的行为而直接或间接导致的民事或刑事法律责任 本站管理人员有权保留或删除其管辖留言中的任意内容 本站有权在网站内转载或引用您的评论 参与本评论即表明您已经阅读并接受上述条款
评论声明
最新资讯