Welcome to the Linux community forum, interact with 2 million technical staff into 6, start fast_cgi process 1, sudousrbinspawn-fcgi-a127.0.0.1-p9000-C5-uwww-data-gwww-data-fusrbinphp5-cgi-Pvarrunfastcgi-php.pid7, set the boot to start fastcgi process and start sudo
Welcome to the Linux community forum, interaction with 2 million technical staff> 6. Start fast_cgi process 1, sudo/usr/bin/spawn-fcgi-a 127.0.0.1-p 9000-C 5-u www-data- g www-data-f/usr/bin/php5-cgi-P/var/run/fastcgi-php.pid 7. Set boot to start fastcgi process and start sudo
Welcome to the Linux community forum and interact with 2 million technicians>
6. Start the fast_cgi process.
1, sudo/usr/bin/spawn-fcgi-a 127.0.0.1-p 9000-C 5-u www-data-g www-data-f/usr/bin/php5-cgi-P // var/run/fastcgi-php.pid
7. Set boot to start fastcgi process and start
Sudo vi/etc/rc. local
Add next line
/Usr/bin/spawn-fcgi-a 127.0.0.1-p 9000-C 5-u www-data-g www-data-f/usr/bin/php5-cgi-P/var/ run/fastcgi-php.pid
If No input file specified is displayed when you open the php file, check the php. ini configuration.
Cgi. fix_pathinfo = 1
Doc_root =
In addition, you must set different directories for each Virtual Machine Based on its own virtual machine to ensure that the path is correct.
Check the configuration file in/etc/nginx/sites-available. The server contains the root and root address, not the root address in the location.
Start
Fast-cgisudo/usr/bin/spawn-fcgi-a 127.0.0.1-p 9000-C 5-u www-data-g www-data-f/usr/bin/php5-cgi-P // var/run/fastcgi-php.pid
The parameter description is as follows:
*-F specifies the location of the execution program of the process that calls FastCGI, Which is set according to the PHP installed on the system
*-A is bound to the addr address.
*-P bind to the port
*-S is the path to bind to the unix socket
*-C indicates the number of FastCGI processes generated. The default value is 5 (for PHP only)
*-P specifies the PID file path of the Generated Process
* What identity does-u and-g FastCGI use (-u user-g user group) to run? www-data can be used in Ubuntu, and others can be configured as needed, for example, nobody, apache, etc. Now you can test a probe or PHP file in the web root directory.
8. Install mysql
Sudo apt-get install mysql-server mysql-client
In the middle, you will be prompted to enter the Root user password and enter it in sequence.
Start MySQL
Sudo/etc/init. d/mysql start
Test whether the mysql service is normal:
Run
Mysql-uroot-p
Enter the mysql password
Show databases;
If you see the following content
| Database |
| Information_schema |
| Mysql |
Mysql is correctly installed.
So far, nginx + php + mysql installation in ubuntu is complete.
[1] [2]