In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to build a php development environment in ubuntu. The content of the article is of high quality, so the editor shares it for you as a reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.
Install nginx first
The installation and configuration of nginx is actually very simple. Nginx itself is very lightweight.
Just sudo apt-get install nginx is fine.
His configuration file is in / etc/nginx/, and the website project path is in / var/www. After installation, make sure that the startup account of nginx has access to the website directory, otherwise an error will be reported.
Step 2: install cgi
There are many cgi programs under linux. Here I choose php5-fpm to facilitate. There is actually a pit here. Many materials on the Internet say that the default port after installing cgi is 9000. I made a mistake here.
After installation, add the forwarding configuration of cgi to the servers of nginx
The copy code is 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 mark should be paid attention to, which is different from other materials on the Internet.
Just reload the nginx configuration after saving it.
The copy code is as follows:
Sudo php5-fpm stop
Sudo php5-fpm start
Sudo service nginx reload
After the above steps, you can basically ensure that there is no problem with running php
Then install memcached
The copy code is as follows:
Sudo apt-get install memcached
After installing the Memcache server, we need to start the service:
The copy code is as follows:
Memcached-d-M128-p 11111-u root
Xdebug installation
The copy code is as follows:
Sudo apt-get install php5-dev php5-cli
# where php5-dev must be installed in order to install xdebug.
Sudo apt-get install http://www.bbqmw.net/qm_scbzqmz/ php5-xsl
# xsl extension is required for Xinc
Sudo apt-get install php-pear
# required for pecl install
Sudo pecl install xdebug
# install xdebug. If the compilation is successful, the installation is complete.
Then add to the php configuration item
The copy code is as follows:
Zend_extension=xdebug.so
And then
The copy code is as follows:
Sudo php5-fpm stop
Sudo php5-fpm start
You can see the option of xdebug in phpinfo ();
On how to build the php development environment in ubuntu to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.