Because it's just a development environment, it's all about choosing a simpler apt-get installation, but there's a problem in the middle.
First install Nginx
Nginx installation and configuration is actually very simple, nginx itself is very lightweight,
The direct sudo apt-get install nginx is OK
His profile is in the/etc/nginx/, the website project path is inside/var/www, after installation must ensure that Nginx's startup account has access to the site directory, otherwise it will be an error.
Step two, install the CGI
Linux under the CGI program is very much, here I choose php5-fpm convenient here is actually a pit, a lot of information on the Internet that the default after the installation of CGI port is 9000, I have a mistake here.
After installation, add a CGI forwarding configuration to the Nginx servers
Copy Code code as follows:
Location ~. *\.php?$
{
Include Fastcgi_params;
Fastcgi_pass Unix:/var/run/php5-fpm.sock;
Fastcgi_index index.php;
Fastcgi_param script_filename $document _root$fastcgi_script_name;
}
The red place is to be noted, and the other information on the Internet is also different
Once you've saved it, it's better to load the Nginx configuration.
Copy Code code as follows:
sudo php5-fpm stop;
sudo php5-fpm start;
sudo service nginx reload;
After a few steps, you can basically make sure that running PHP is fine.
Then install memcached
Copy Code code as follows:
sudo apt-get install memcached
After installing the Memcache server, we need to start the service:
Copy Code code as follows:
Memcached-d-M 128-p 11111-u Root
Xdebug Installation
Copy Code code as follows:
sudo apt-get install Php5-dev php5-cli
#其中php5-dev must be installed in order to install Xdebug.
sudo apt-get install php5-xsl
#Xinc需要xsl extension
sudo apt-get install Php-pear
The #pecl install must
sudo pecl install Xdebug
#安装xdebug, the installation completes when the compilation succeeds
And then add it to the PHP configuration item
Copy Code code as follows:
And then
Copy Code code as follows:
sudo php5-fpm stop;
sudo php5-fpm start;
You can see the Xdebug option in Phpinfo ().