memcache安裝配置
下載軟體
編譯安裝libevent
tar zxf libevent-2.0.20-stable.tar.gz
cd libevent-2.0.20-stable
./configure --prefix=/usr/local/libevent && make && make install
安裝memcache
tar zxf memcached-1.4.15.tar.gz
cd memcached-1.4.15
./configure --prefix=/usr/local/memcached --with-libevent=/usr/local/libevent && make && make install
安裝php的memcache擴充套件
安裝libmemcached
tar zxf libmemcached-1.0.14.tar.gz
cd libmemcached-1.0.14
./configure --prefix=/usr/local/libmemcached
make
出錯
/libmemcached-1.0/memcached.h:46:27: error: tr1/cinttypes: No such file or directory
make[1]: *** [libmemcached/csl/libmemcached_libmemcached_la-context.lo] Error 1
make[1]: Leaving directory `/packages/libmemcached-1.0.9'
make: *** [all] Error 2
解決
安裝gcc44 gcc44-c++ libstdc++44-devel
rpm -ivh -nodeps gcc44 gcc44-c++ libstdc++4-devel
export CC=/usr/bin/gcc44
export CXX=/usr/bin/g++44
繼續編譯安裝,加引數--with-memcached
編譯安裝libevent
tar zxf libevent-2.0.20-stable.tar.gz
cd libevent-2.0.20-stable
./configure --prefix=/usr/local/libevent && make && make install
安裝memcache
tar zxf memcached-1.4.15.tar.gz
cd memcached-1.4.15
./configure --prefix=/usr/local/memcached --with-libevent=/usr/local/libevent && make && make install
安裝php的memcache擴充套件
安裝libmemcached
tar zxf libmemcached-1.0.14.tar.gz
cd libmemcached-1.0.14
./configure --prefix=/usr/local/libmemcached
make
出錯
/libmemcached-1.0/memcached.h:46:27: error: tr1/cinttypes: No such file or directory
make[1]: *** [libmemcached/csl/libmemcached_libmemcached_la-context.lo] Error 1
make[1]: Leaving directory `/packages/libmemcached-1.0.9'
make: *** [all] Error 2
解決
安裝gcc44 gcc44-c++ libstdc++44-devel
rpm -ivh -nodeps gcc44 gcc44-c++ libstdc++4-devel
export CC=/usr/bin/gcc44
export CXX=/usr/bin/g++44
繼續編譯安裝,加引數--with-memcached
./configure --prefix=/usr/local/libmemcached
--with-memcached
make && make install
安裝memcached的php擴充套件
tar zxf memcached-2.1.0.tgz
cd memcached-2.1.0
沒有configure檔案,用phpize生成configure檔案
/usr/local/php/bin/phpize 產生configure檔案
./configure --with-php-config=/usr/local/php/bin/php-config --with-libmemcached-dir=/usr/local/libmemcached/
make
make install
編輯php.ini,加入extension=memcache.so
cat /usr/local/lib/php.ini |grep memcache
extension=memcache.so
啟動memcache
/usr/local/memcached/bin/memcached -u root -d restart -m 1500 -c 1024 -l 192.168.151.138 -p 11211 -vv >/var/log/memcache.log 2>&1
引數說明,具體見memcached -h
-p TCP port number to listen on (default: 11211)
-U UDP port number to listen on (default: 11211, 0 is off)
-l interface to listen on (default: INADDR_ANY, all addresses)
may be specified as host:port
-d run as a daemon
-c max simultaneous connections (default: 1024)
-m max memory to use for items in megabytes (default: 64 MB)
-v verbose (print errors/warnings while in event loop)
-vv very verbose (also print client commands/reponses)
-vvv extremely verbose (also print internal state transitions)
make && make install
安裝memcached的php擴充套件
tar zxf memcached-2.1.0.tgz
cd memcached-2.1.0
沒有configure檔案,用phpize生成configure檔案
/usr/local/php/bin/phpize 產生configure檔案
./configure --with-php-config=/usr/local/php/bin/php-config --with-libmemcached-dir=/usr/local/libmemcached/
make
make install
編輯php.ini,加入extension=memcache.so
cat /usr/local/lib/php.ini |grep memcache
extension=memcache.so
啟動memcache
/usr/local/memcached/bin/memcached -u root -d restart -m 1500 -c 1024 -l 192.168.151.138 -p 11211 -vv >/var/log/memcache.log 2>&1
引數說明,具體見memcached -h
-p TCP port number to listen on (default: 11211)
-U UDP port number to listen on (default: 11211, 0 is off)
-l interface to listen on (default: INADDR_ANY, all addresses)
may be specified as host:port
-d run as a daemon
-c max simultaneous connections (default: 1024)
-m max memory to use for items in megabytes (default: 64 MB)
-v verbose (print errors/warnings while in event loop)
-vv very verbose (also print client commands/reponses)
-vvv extremely verbose (also print internal state transitions)
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/27181165/viewspace-775756/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- memcache安裝
- CentOS5.2下Memcache的安裝與配置CentOS
- Windows下的Memcache安裝 linux下的Memcache安裝WindowsLinux
- 安裝PHP的memcachePHP
- CentOS7 安裝 memcacheCentOS
- memcached安裝和php擴充套件memcache安裝PHP套件
- 【memcache快取專題(2)】memcache安裝與命令列使用快取命令列
- 安裝PHP的memcache擴充套件PHP套件
- nginx+php+memcache安裝筆記NginxPHP筆記
- 安裝PHP及Memcache擴充套件PHP套件
- php以及php擴充套件memcache 安裝PHP套件
- php安裝memcache、redis擴充套件模組PHPRedis套件
- memcache與memcached的區別與安裝
- windows平臺安裝php_memcache模組WindowsPHP
- Windows下的Memcache安裝與測試教程Windows
- ubuntu 下安裝memcache 以及php擴充套件UbuntuPHP套件
- 【memcache快取專題(3)】PHP-memcache擴充套件的安裝以及使用快取PHP套件
- windows下安裝各個版本memcache擴充套件Windows套件
- 原始碼安裝memcached和php memcache擴充套件原始碼PHP套件
- redis和memcache的對比——配置Redis
- 本地windows搭建spark環境,安裝與詳細配置(jdk安裝與配置,scala安裝與配置,hadoop安裝與配置,spark安裝與配置)WindowsSparkJDKHadoop
- php7安裝redis擴充套件和memcache擴充套件PHPRedis套件
- zabbix安裝—–nginx安裝和配置Nginx
- Zookeeper 安裝配置
- 【mongodb安裝配置】MongoDB
- ceph安裝配置
- ELK 安裝配置
- Prometheus安裝配置Prometheus
- MySQL安裝配置MySql
- SwitchOmega 安裝配置
- Hive安裝配置Hive
- JWT安裝配置JWT
- oracle安裝配置Oracle
- VNC安裝配置VNC
- rlwrap 安裝配置
- otrs安裝配置
- Sybase安裝配置
- mfs安裝配置