There are three methods to solve the problem of installing the PHPmemcache module in linux:
First
Yum install php-pecl-memcache
Second
Tar vxzf memcache-2.2.1.tgz
Cd memcache-2.2.1
/Usr/local/php/bin/phpize
./Configure -- enable-memcache -- with-php-config =/usr/local/php/bin/php-config -- with-zlib-dir
Make
Make install
Third
Enter the lnmp decompressed directory and run:./memcached. sh.
After you press enter to confirm, the memcache php extension and memcached will be automatically installed.
These three are the same ??? What's the difference? I'm dizzy.
Reply to discussion (solution)
First, you need to install yum to install php-memcache in this way.
The second method is to download the memcache installation package, decompress the package on the local machine, compile and install it, and the most basic installation method.
The third method is that the memcached. sh in inmp already contains all the execution statements in the second method. directly executing./memcached. sh is equivalent to the second installation method.
The three methods are the same. if you are not familiar with this, it is better to use yum.
First, you need to install yum to install php-memcache in this way.
The second method is to download the memcache installation package, decompress the package on the local machine, compile and install it, and the most basic installation method.
The third method is that the memcached. sh in inmp already contains all the execution statements in the second method. directly executing./memcached. sh is equivalent to the second installation method.
The three methods are the same. if you are not familiar with this, it is better to use yum.
The difference is that I installed php-m in the third method. | grep memcach cannot be found.
So you can use a device. Something written in memcached. sh may be faulty.
You may do a lot of positions during fertilization.
So
If you need
Select this posture
Yum install php-pecl-memcache
We recommend that you install the SDK in 2nd ways. later settings are more convenient.