Because it is only the development environment, so is to choose a relatively simple apt-get installation method, but also encountered a little problem in the middle.
First install Nginx
Nginx installation and configuration is actually very simple, nginx itself is very lightweight,
Direct sudo apt-get install Nginx is available.
His profile is inside the/etc/nginx/, the site project path is inside the/var/www, after installation must ensure that Nginx startup account has access to the site directory, or will error.
Step two, install CGI
Linux under the CGI program very much, here I choose is php5-fpm convenient here in fact there is a pit, online a lot of information is said to install CGI after the default port is 9000
, I'm going to make a mistake here.
After installation, add the CGI forwarding configuration to the Nginx servers
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;
}
Red is the place to pay attention to, and other information on the Internet is also different
Save it and then reload the Nginx configuration,
sudo php5-fpm stop;
sudo php5-fpm start;
sudo service nginx reload;
After a few steps, you can basically make sure there's nothing wrong with running PHP.
Then install memcached
sudo apt-get install memcached
After installing the Memcache server, we need to start the service:
Memcached-d-M 128-p 11111-u Root
Read more about this blog
http://wdtxslqnn.blog.163.com/blog/static/44246485201152911188205/
Xdebug Installation
sudo apt-get install Php5-dev php5-cli
#其中php5-dev in order to install XDEBUG, it must be installed.
sudo apt-get install php5-xsl
#Xinc需要xsl extension
sudo apt-get install Php-pear
#pecl the Install must
sudo pecl install Xdebug
#安装xdebug, the installation is complete when the compilation is successful
Then add the PHP Config item
Zend_extension=xdebug.so
And then
sudo php5-fpm stop;
sudo php5-fpm start;
You can see the Xdebug option in Phpinfo ();