2013-04-25 127 views
1

我不得不承认在这里黑暗中摸索。我相当擅长PHP,但我对管理LINUX服务器知之甚少。我需要我的64位的CentOS 6服务器上安装Memcached和跨两个非常丰富的资源在CentOS 6上安装memcached

http://boomshadow.net/tech/installs/how-to-install-memcached/

来到我遵循的步骤expained那里,memcached的守护进程了,现在我的服务器上运行。我还需要安装PHP扩展的内存缓存,所以我尝试的步骤这里说明

http://boomshadow.net/tech/installs/how-to-install-php-memcache/

这里的输出我得到

[[email protected] ~]# pecl install memcache 
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update 
pecl.php.net" to update 
downloading memcache-3.0.8.tgz ... 
Starting to download memcache-3.0.8.tgz (70,523 bytes) 
.................done: 70,523 bytes 
15 source files, building 
running: phpize 
Configuring for: 
PHP Api Version:   20090626 
Zend Module Api No:  20090626 
Zend Extension Api No: 220090626 
Enable memcache session handler support? [yes] : yes 
building in /var/tmp/pear-build-rootZi8fyR/memcache-3.0.8 
running: /var/tmp/memcache/configure --enable-memcache-session=yes 
checking for grep that handles long lines and -e... /bin/grep 
checking for egrep... /bin/grep -E 
checking for a sed that does not truncate output... /bin/sed 
checking for cc... no 
checking for gcc... no 
configure: error: in `/var/tmp/pear-build-rootZi8fyR/memcache-3.0.8': 
configure: error: no acceptable C compiler found in $PATH 
See `config.log' for more details. 
ERROR: `/var/tmp/memcache/configure --enable-memcache-session=yes' failed 
[[email protected] 

我不能让这个秘密 - 这个最对我来说是希腊语。我想我已经想出了pecl正在寻找一个C编译器来从下载的源代码构建PHP memcache驱动程序,并且找不到它。即使这是正确的,它并没有多大帮助。

在这里我需要做些什么来使事情正常工作。

回答

7

老习惯很难死,我猜 - 再次回答我自己的问题。

# yum groupinstall 'Development Tools' 

安装包括gcc编译器在内的开发工具。 memcahe.so扩展名使用zlib,因此您还需要执行以下操作:

# yum install zlib-devel 
0

如果您来过配置:错误:否,sasl.h不可用。使用--disable-memcached-sasl运行配置以禁用此检查 错误:/var/tmp/memcached/configure --with-libmemcached-dir=no' failed

./configure --enable-memcached-sasl=no 
make 
make install 

pecl install memcached