LNMP environment setup-php

Source: Internet
Author: User
LNMP environment setup-php installation uses the source code method. Currently, you can download version 5.6.17 from the php official website. Upload the file to linux and decompress it.

Tar xvf php-5.6.17.tar.bz2cd php-5.6.17 /. /configure -- prefix =/usr/local/php5.6 -- with-mysql = mysqlnd -- with-mysqli = mysqlnd -- with-pdo-mysql = mysqlnd -- enable-mbstring -- enable-fpm -- with-opensslmakemake install

The key step above is configure:

Prefix is the installation path, and I also select/usr/local.

Next is the mysql driver. according to the Internet, mysqlnd is the php driver, that is, whether you have installed mysql or not. it doesn't matter where the path is.

The next mbstring is used for thinkPHP. for a string processing function and language encoding, it seems that it will be a lot of trouble not to install it.

Fpm is used to parse nginx requests to php. for details about fastcgi, go to Baidu.

Openssl may be required by the project.

At this point you can start php-fpm, but before you need to set the fpm configuration file, there is a default configuration file php-fpm.conf.default fpm under/usr/local/php5.6/etc, copy it or rename it a php-fpm.conf.

Other environment configurations are provided in nginx installation.

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.