System: centos 5.9 64-bit
Software: libiconv-1.14.tar.gz mysql-5.5.25a.tar.gz required
1. Preparations before installation
2. Install libiconv
The code is as follows: |
Copy code |
1./configure -- prefix =/usr/local/libiconv
2 make & make install |
3. Only install the mysql client
The code is as follows: |
Copy code |
1 cmake. & make mysqlclient libmysql
2 make install |
In this way, only the mysql client is installed, and then you can enter whereis mysql to view the mysql installation location.
Whereis mysql
Well, we can see that it is similar to the yum installation.
4. Install php
In the past, when mysql was 5.1, you only needed to add the -- with-mysql = mysql client installation directory, but the parameter mysql 5.5.x was changed, below are the php compilation parameters:
The code is as follows: |
Copy code |
1. /configure -- prefix =/usr/local/php -- enable-fastcgi -- enable-fpm -- with-fpm-log =/var/log/php-fpm.log -- with-fpm-conf =/ etc/php-fpm.conf 2 -- with-fpm-pid =/var/run/php-fpm.pid -- with-config-file-path =/etc -- with-config-file-scan-dir =/etc/php. d 3 -- with-openssl -- with-zlib -- enable-bcmath -- with-bz2 -- with-curl -- enable-ftp 4 -- with-gd -- enable-gd-native-ttf -- with-jpeg-dir -- with-png-dir -- with-gettext -- with-mhash 5 -- enable-mbstring -- with-mcrypt -- enable-soap -- enable-zip -- with-iconv =/usr/local/libiconv 6 -- with-mysql = shared,/usr -- with-mysqli = shared,/usr/bin/mysql_config |
You can see the last line, -- with-mysql = shared,/usr -- with-mysqli = shared,/usr/bin/mysql_config, which is different from the previous line. well, the rest will not be written, which is similar to before.