memcached服务器和客户端脚本安装
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
#!/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
相关推荐
郗瑞强 2020-08-16
85590296 2020-07-22
jkzyx 2020-06-29
luotuo 2020-06-26
LinuxJob 2020-06-26
ol0 2020-06-26
清溪算法君老号 2020-06-25
86251043 2020-06-13
CSDN0BLOG 2020-06-09
ol0 2020-05-26
andyhuabing 2020-05-22
程序员俱乐部 2020-05-06
83530391 2020-05-05
ol0 2020-05-02
83530391 2020-04-09
85590296 2020-03-25
carolAnn 2020-03-07
大脸猫脸大 2020-03-03
ol0 2020-02-18