Yum installing the PHP extension Module -memcache
Specific steps:
1. For convenience, we first make a soft connection to the PHP file, such as the following command: Ln-s/usr/local/php/bin/php/usr/bin. To view the module commands in PHP: Php–m, the results are as follows:
650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M01/8E/8A/wKioL1jEubnBRfbCAAAY0b-_4v4483.png-wh_500x0-wm_ 3-wmp_4-s_336412730.png "title=" 11.PNG "alt=" Wkiol1jeubnbrfbcaaay0b-_4v4483.png-wh_50 "/>
2. into the PHP installation directory, we can see that there is no memcache. Command: Cd/usr/local/src/php-5.3.27/ext, the result is as follows:
650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M00/8E/8A/wKioL1jEueTxdOFVAAAzdD5oUy4067.png-wh_500x0-wm_ 3-wmp_4-s_4112100978.png "title=" 22.PNG "alt=" Wkiol1jeuetxdofvaaazdd5ouy4067.png-wh_50 "/>
3. Install the memcache command as follows:
# yum Install libevent libevent-deve (Installation libevent library)
# Yum Install memcached (installation memcached)
# service memcached Start (start)
4. Test # Memcached–h, the results are as follows :
650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M00/8E/8C/wKiom1jEukjRmXZcAAAwJA25bQk840.png-wh_500x0-wm_ 3-wmp_4-s_2368797545.png "title=" 44.PNG "alt=" Wkiom1jeukjrmxzcaaawja25bqk840.png-wh_50 "/>
//If you can see the following style, the installation is normal
5. Install the PHP extension module
# yum-y Install libmemcached (Installation libmemcached extension)
# yum-y Install php-pecl-memcache.i686 (Installation Php-pecl-memcache extension)
6. Check if there is a memcached module
# Php-m | grep memcache//If the installation is correct, the Memcache module is displayed
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M00/8E/8A/wKioL1jEuvyxZOYwAAAGb5KP5cY813.png-wh_500x0-wm_ 3-wmp_4-s_1294623395.png "title=" 55.PNG "alt=" Wkiol1jeuvyxzoywaaagb5kp5cy813.png-wh_50 "/>
7. Find the PHP configuration file path
If you cannot find a PHP configuration file, you can use the following method:/usr/local/php/bin/php–i |grep–i php.ini, as shown in the results:
650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M02/8E/8A/wKioL1jEu0njksMcAAAQkcs_pL8693.png-wh_500x0-wm_ 3-wmp_4-s_1469506721.png "title=" 33.PNG "alt=" Wkiol1jeu0njksmcaaaqkcs_pl8693.png-wh_50 "/>
Get the absolute path to the PHP configuration file.
8. View memcache module, command: Cd/usr/lib/php/modules
9. Manually add the Memcache module to the PHP configuration file
Open the PHP configuration file and find extension to add memcache, as shown in:
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M00/8E/8C/wKiom1jEu5jz0tXNAAAi0JAUUJ4454.png-wh_500x0-wm_ 3-wmp_4-s_3480804186.png "title=" 66.PNG "alt=" Wkiom1jeu5jz0txnaaai0jauuj4454.png-wh_50 "/>
This article is from the "Wu Fei" blog, please be sure to keep this source http://wutengfei.blog.51cto.com/10942117/1905550
Yum Installing the PHP extension Module-memcache