2018-04-19 Linux Learning

Source: Internet
Author: User

11.32 PHP Expansion Module installation

PHP Dynamic Extension Module

/usr/local/php/bin/php -m     //查看模块下面安装一个redis模块    cd /usr/local/src/    wget https://codeload.github.com/phpredis/phpredis/zip/develop    mv develop phpredis-develop.zip    unzip phpredis-develop.zip    cd phpredis-develop    yum install -y autoconf         /usr/local/php/bin/phpize    //生成configure文件    ./configure --with-php-config=/usr/local/php/bin/php-config    make && make install    /usr/local/php/bin/php -i |grep extension_dir    //查看扩展模块存放目录,我们可以在 php.ini 中去自定义该路径,默认模块路径不需要修改    vim /usr/local/php/etc/php.ini   //增加一行配置(可以放到文件最后一行)    extension=redis.so

Operation Process

[[email protected] ~]#/usr/local/php/bin/php-m View no Redis module [[email protected] ~]# Cd/usr/local/src/[[email  protected] src]# wget https://codeload.github.com/phpredis/phpredis/zip/develop[[email protected] src]# MV Develop phpredis-develop.zip[[email protected] src]# unzip phpredis-develop.zip [[email protected] src]# CD phpredis-develop/[[email protected] phpredis-develop]#/usr/local/php/bin/phpize[[email protected] phpredis-develop]#/usr/local/php/bin/phpize[[email protected] phpredis-develop]#./configure-- With-php-config=/usr/local/php/bin/php-config[[email protected] phpredis-develop]# make[[email  Protected] phpredis-develop]# make installinstalling shared extensions:/usr/local/php/lib/php/extensions/ No-debug-zts-20131226/[[email protected] phpredis-develop]# ls/usr/local/php/lib/php/extensions/ no-debug-zts-20131226/opcache.so redis.so[[email protected] phpredis-develop]#/usr/local/php/bin/php-i |grep ExteNsion_dirextension_dir =/usr/local/php/lib/php/extensions/no-debug-zts-20131226 =/usr/local/php/lib/php/ Extensions/no-debug-zts-20131226sqlite3.extension_dir = no value = no value[[email protected] phpredis-develop]# Vim/usr/local/php/etc/php.ini in; Extension=php_shmop.dll add Extension=redis.so[[email pro below Tected] phpredis-develop]#/usr/local/php/bin/php-m |grep Redisredis

2018-04-19 Linux Learning

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.