How to install nginx + php + mysql on centos

Source: Internet
Author: User
Tags fpm install php mysql client centos


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.

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.