2018-3-8 Linux Learning Notes

Source: Internet
Author: User
Tags php error php error log install redis

11.32 PHP Expansion Module installation
    • This section learns how to install the PHP extension, as an example of installing a Redis module.
    • 1. We can check if PHP has a redis module
      /usr/local/php7/bin/php-m |grep redis #查看php加载的模块
    • 2. Download, unzip and install the Redis package
      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
    • The following is a generated configure file because does not have a configure file by default :
      /usr/local/php7/bin/phpize
    • Configure, compile, and install Redis:
      ./configure--with-php-config=/usr/local /php7/bin/php-config
      Make && do install
    • View Extension directory, we can customize the path in php.ini
      /usr/local/php7/ Bin/php-i |grep extension_dir
    • Fix the PHP configuration file to load the newly installed modulo fast:
      Vim/usr/local/php7/etc/php.ini
    • Add a line configuration (you can put it to the last line of the file)
      Extension = redis.so
    • View loading results:
      /usr/local/php7/bin/php-m|grep redis

    • In addition, the PHP source package comes with some extensions that are available for installation, which are located in the
      /usr/local/src/php-7.1.6/ext

      If the module exists in the directory, you do not need to go to the Internet to download, direct installation can be.

Summarize:

    • PHP Expansion Module installation process:
      CD into the module directory to install--->phpize generate configure files--->configure,make && make instal--->php.ini load modules---> View validation Load Results

    • Knowledge Points:
      Redis is a nosql, usually used in a lamp environment as a cache.

Extended Learning :
Apache Rewrite tutorial 1 http://coffeelet.blog.163.com/blog/static/13515745320115842755199/
Apache Rewrite tutorial 2 http://www.cnblogs.com/top5/archive/2009/08/12/1544098.html
Apache rewrite appears dead Loop http://ask.apelearn.com/question/1043
PHP error log level reference http://ask.apelearn.com/question/6973
PHP Open Short Tag http://ask.apelearn.com/question/120
PHP.ini detailed http://legolas.blog.51cto.com/2682485/493917

2018-3-8 Linux Learning Notes

Related Article

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.