In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article focuses on "how to install Ubuntu nginx and its configuration to install Php and mysql", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to install Ubuntu nginx and its configuration to install Php and mysql.
To recommend a good use of the Ubuntu nginx system, such as let you have an understanding of the Ubuntu nginx system, and then a comprehensive introduction to the Ubuntu nginx system, hope to be useful to everyone Ubuntu nginx ("engine x") is a high-performance HTTP and reverse proxy server, is also an IMAP/POP3/SMTP proxy server. Ubuntu nginx was developed by Igor Sysoev for the second most visited Rambler.ru site in Russia, where it has been running for more than two and a half years.
Igor publishes the source code as a BSD-like license. Although it is still a beta, Nginx is already known for its stability, rich feature set, sample configuration files, and low system resource consumption.
Step * * install Ubuntu nginx
Since Ubuntu 904 already includes nginx, don't compile it at all, it's super easy to install! Modify the content of the / etc/apt/sources.list file to be a domestic image, and then run: apt-get update
Apt-get install nginx can complete the installation.
Start Ubuntu nginx:/etc/init.d/nginx start and then you can access it, http://localhost/, everything is fine! If you can't access it, don't continue, see what the reason is, and then continue after solving it. Let's configure php and mysql.
Step 2: install Php and mysql
Install php and MySQL:apt-get install php5-cli php5-cgi mysql-server-5.0 php5-mysql
Step 3, install FastCgi and configure
We need the / usr/bin/spawn-fcgi file, and it belongs to the lighttpd package, so we install lighttpd and set it to boot and not boot:
Apt-get install lighttpd # We just need / usr/bin/spawn-fcgi rcconf # to remove lighttpd from boot and modify the configuration file of nginx: / etc/nginx/sites-available/default modify server_name 58.30.17.154; modify the line of index to read: index index.php index.html index.htm
Remove the comments from the following section:
Location ~\ .php$ {fastcgi_pass 127.0.0.1 fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME / var/www/nginx-default$fastcgi_script_name; include / etc/nginx/fastcgi_params; restart Ubuntu nginx: / etc/init.d/nginx stop / etc/init.d/nginx start launch fastcgi php:
Spawn-fcgi-a 127.0.0.1-p 9000-C 10-u www-data-f / usr/bin/php-cgi
In order for php-cgi to boot itself:
Cd / etc/init.d
Cp nginx php-cgi
Vim php-cgi replaces Ubuntu nginx with php-cgi and modifies the corresponding section as follows:
DAEMON=/usr/bin/spawn-fcgi DAEMON_OPTS= "- a 127.0.0.1-p 9000-C 10-u www-data-f / usr/bin/php-cgi" stop) echo-n "Stopping $DESC:" pkill-9 php-cgi echo "$NAME."
Then run rcconf to set php-cgi to boot
Create a file in the / var/www/nginx-default/ directory: / var/www/nginx-default/index.php file contains:
< ?php phpinfo();?>Then the browser visits Ubuntu nginx and you can see that everything is fine and the above steps generally work.
At this point, I believe you have a deeper understanding of "how to install Ubuntu nginx and its configuration to install Php and mysql". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.