Centos7 Compiling PHP Extensions-detailed version

Source: Internet
Author: User

Today the company to use SQL Server, I do not know what the eldest brother smoked crazy, no way, their environment to install expansion AH.

Join Microsoft's Source

    Curl HTTPS://packages.microsoft.com/config/rhel/7/prod.repo >/etc/yum.repos.d/mssqlrelease.repo

Install the driver (three must be installed, indispensable)

    Yum Install msodbcsql MSSQL-Tools UnixODBC-devel

Download Pdo_sqlsrv expansion pack Http://pecl.php.net/package/pdo_sqlsrv

Note: The extension package is on pecl, and the simple explanation is the PHP expansion pack. As for PECL is specific what does not know the degree Niang bar.

  

wget download

  

Extract

  1. Command: Tar -zxvf pdo_sqlsrv-4.3.0.tgz
  2. Command: CD pdo_sqlserv-4.3.0
  3. Description: (more nonsense) looking for your phpize my is using the pagoda panel, each person's phpize may not be the same, specific according to Phpize, installed is the php7.1 environment, find my phpize extension command in/www/server/php/71/ Bin/phpize
  4. Command:/www/server/php/71/bin/phpize
  5. Command:. /configure--with-php-config=/www/server/php/71/bin/phpize
  6. Make && make install
  7. Modify php.ini find: Extension = again last extension= added on extension = "pdo_sqlsrv.so" General after make && do install will show your extension build Position
  8. My Build Extension location

    Restart PHP

Command: php-m | grep pdo_sqlsrv

Done

  

This method is common to other extensions as long as the download of different extension packages is compiled in pecl.

    

Centos7 Compiling PHP Extensions-detailed version

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.