1. php mysql extension pdo_mysql (in the directory where PHP source code is located)
1.1 into the PHP package PDO extension Directory cd /usr/local/services/php-5.6.5/ext/pdo _mysql/
1.2 execute phpize command, generate configure file /usr/local/php/bin/phpize
& nbsp 1.3 performing configuration ./configure --with-php-config=/usr/local/php/bin/php-config -- with-pdo-mysql=/usr/local/mysql/
where--with-pdo-mysql=/usr/local/mysql/specifies MySQL The installation directory location of the database
here if MySQL is manually installed should not have any problem, because my system has been automatically installed on the MySQL, the result is constantly, it is recommended to manually install MySQL
Solutions:
A, automatically installed MySQL-related files are generally scattered in the various subdirectories of/usr, At this point the--with-pdo-mysql should be specified directly as/usr/, i.e.--with-pdo-mysql=/usr/
B, make error
This is because the MySQL header file is required at compile time, and the default search path does not find the location of the head file, so this problem occurs, so the/usr/include/ The MySQL header file in the mysql/directory is linked to the /usr/local/include/directory, which is:
ln-s /usr/include/mysql/* /usr/local/include/
This will be OK, continue make,make install
1.4 The generated pdo_mysql.so file is placed in this directory after the installation is complete /usr/local/ php/lib/php/extensions/no-debug-non-zts-20131226, modify php config file php.ini
extension=/usr/ Local/php/lib/php/extensions/no-debug-non-zts-20131226/pdo_mysql.so
2. Curl Installation
2.1 TAR-ZXVF curl-7.19.6.tar.gz
CD curl-7.19.6
./configure--prefix=/usr/local/curl
Make
Make install
2.2 into the Linux PHP source directory in the Ext directory, where the source code for each extension module, select the module you need, such as the Curl module: CD curl execution phpize generate compiled files, phpize in the PHP installation directory of the bin directory:
/usr/local/php5/bin/phpize
./configure--with-curl=/usr/local/curl--with-php-config=/usr/local/php5/bin/php-config
Make
Make install
In this way, the curl.so is copied to the PHP directory (/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226), and then the PHP configuration file needs to be modified php.ini
Installation of several modules in PHP