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.