Install NginxMySQLPHPFCGI under Ubuntu10.10Desktop
Source: Internet
Author: User
The operating environment is a patchwork old machine, running four gb cpu, GB memory, 40 GB Seagate IDE hard disk, which is roughly 04 years of hardware level. For LNMP installation, only WordPress is installed. The operating system is Ubuntu10.10 installed by myself. There is no problem when Ubuntu is used as a server in the desktop version. remember to make the operating environment of the language environment a piece of old machine, such as the 4g cpu, G memory, and 40g Seagate IDE hard disk, it is about 04 years of hardware level. For LNMP installation, only WordPress is installed.
The operating system is my own Ubuntu 10.10. It's okay to use Ubuntu on the desktop as a server. remember to set the language environment to English.
I installed LNMP once with the one-click installation package of LNMP. The result was unsuccessful and the error was not found, so all purge started from scratch. This time, all the software is installed with apt and configured manually. The result is smooth sailing.
Install nginx:
1. sudo apt-get install nginx
Instantly installed. The general structure of nginx is
All configuration files are stored in/etc/nginx/
The virtual host is in/etc/nginx/sites-available/. here I use "default"
You must create a link to the/etc/nginx/sites-available/VM configuration file under/etc/nginx/sites-enabled/. the default link is ready for installation.
Log in/var/log/nginx/
The startup script has been created in/etc/init. d/and also in/etc/rc2.d.
Start nginx now.
1. sudo/etc/init. d/nginx start
This is unlikely to be a problem. If the system prompts that bind fails, it may be that other processes (such as apache) occupy Port 80 and stop.
This is copied from someone else. I can't use this much, but it doesn't matter if I have to install more. if I have to install less, there may be problems with installing spawn-fcgi:
1. sudo apt-get install spawn-fcgi
I used to install php-fpm. as a result, the setting was not good, so I switched to spawn-fcgi instead. this was originally a lighttpd component, which was later independent and can be installed separately and used with nginx.
Configure nginx and spawn-fcgi: modify/etc/nginx/fastcgi_params and add the following line:
1. sudo apt-get install spawn-fcgi
Find the line cgi. fix_pathinfo = 1 in/etc/php5/cgi/php. ini and remove the comment above. In this way, php-cgi can use the SCRIPT_FILENAME variable normally.
Open the/etc/nginx/sites-available/default file and make some modifications. I pasted my post here:
There should be no bind failure. If it appears, you can find the process to kill or change the port.
We can add this line of code to the bottom of the/etc/rc. local file, so that the system can start the FastCGI process of PHP at the same time.
Reload nginx:
1. sudo/etc/init. d/nginx reload
After modifying the nginx configuration file, you must reload the file before it takes effect. Of course, restart is also supported. If you are prompted that the configuration file cannot be passed, go to the file to check for errors. Once, I found that the default file contains only one space.
Install PHP and MySQL:
1. sudo apt-get install mysql-server mysql-client
Enter the Root user password.
Start MySQ
1. Lsudo/etc/init. d/mysql start
I don't know SQL, so I didn't use the mysql command line to set it. Instead, I used phpmyadmin to set it on the browser page.
Install WordPress:
This is the easiest and most enjoyable thing to do, within five minutes. What needs to be done is to create a user and a database, then directly access the wordpress folder and follow what it says
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service