LNMP environment Installation and usage tutorials

Source: Internet
Author: User
Tags php error phpinfo centos vps domain list phpmyadmin

From free virtual host to virtual host, to Winvps, to Linuxvps ... Is this growth?

Starting from Winvps can also be like operating a computer Configuration environment ... Since the same as the blind after the Linux, is totally blind touch!

Before a little white also taught me a cheat book "Install a panel" ... In other words, it is really convenient to install a panel, but some panels occupy too large memory ...

Ford said, open the more features, the more loopholes, the more unsafe website ...

Until yesterday my friend Aforzai pushed me to use LNMP to match the language environment ... All right... No, it's starting!

After connecting to SSH, start wget command:

The domestic choice:

Wget-c http://soft.vpser.net/lnmp/lnmp0.9-full.tar.gz

The selection of foreign countries:

Wget-c http://soft.vpser.net/lnmp/lnmp0.9.tar.gz

In fact, with the domestic VPS is really not much, buy low-cost VPS A lot of foreign, so the Ford directly with the second command to write a tutorial. (Two installation package is the difference is that the following is not with the software, the above is with full software, not in the installation process to download again.) )

Here's what happens when you copy the carriage return line.

Tar zxvf lnmp0.9.tar.gz

CD lnmp0.9

/centos.sh/* If you are Debian or Ubuntu, use./debian.sh or./ubuntu.sh*/

Input will appear as follows (bold section for the suggestions you want to enter do not use the domain name to be built to fill in below):

=========================================================================
Lnmp V0.9 for CentOS/RadHat Linux vps  written by licess
=========================================================================
A Tool To Auto-compile & install nginx+mysql+php on Linux

For more information visit http://www.lnmp.org/
=========================================================================
Please input domain:
(Default domain:www.lnmp.org): Myvps.rffan.info/* Here is the input domain name, but do not enter you to do the station domain name.
===========================
Domain=myvps.rffan.info
===========================
===========================
Please input the root password of MySQL:
(Default password:root): rffan123456/* Here is the root password for mysql input * *
===========================
mysqlrootpwd=rffan123456
===========================
===========================
Do your want to install the InnoDB Storage Engine?
(Default no,if you want please input:y, if not, press the Enter button):/* Here is the option to install the InnoDB engine, it should be said that most do not need to * *
INPUT error,the InnoDB Storage Engine would not install!

Press any key to start ...

When you press ENTER, you can wait for the installation to complete. The estimated time is probably 20-40min.

After the installation is complete, the following prompts are:

========================== Check Install ================================
Install LNMP 0.9 completed! Enjoy it.
=========================================================================
Lnmp V0.9 for Centos/radhat Linux VPS written by licess
=========================================================================

For more information visit http://www.lnmp.org/

LNMP status Manage:/root/lnmp {start|stop|reload|restart|kill|status}
Default MySQL root password:rffan123456
phpinfo:http://myvps.rffan.info/phpinfo.php
phpmyadmin:http://myvps.rffan.info/phpmyadmin/
prober:http://myvps.rffan.info/p.php
ADD VirtualHost:/root/vhost.sh

The path of some dirs:
MySQL dir:/usr/local/mysql
PHP dir:/usr/local/php
Nginx dir:/usr/local/nginx
Web dir:/home/wwwroot

=========================================================================
=========================================================================
Manager for Lnmp V0.9, written by licess
=========================================================================
LNMP is a tool to Auto-compile & install nginx+mysql+php on Linux
This script are a tool to Manage status of LNMP
For more information visit http://www.lnmp.org

Usage:/root/lnmp {start|stop|reload|restart|kill|status}
=========================================================================
Nginx is runing!
PHP-FPM is runing!
success! MySQL Running (13615)
Active Internet connections (only servers)
Proto recv-q send-q Local address Foreign
TCP 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
TCP 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
TCP 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
TCP 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
TCP 0 0:: £ º::* LISTEN

Here's how to use the tutorial ...

First, make sure you're in the root directory.

Cd/root

And then we start our station. Use the following command

SH vhost.sh

To start building the station. Input command will be followed by the following prompts, note, do not hit any of the wrong words, the wrong, then you can only CTRL + C cancellation, again. Well, let's start with the binding domain name link.

[Root@myvps ~]# SH vhost.sh
=========================================================================
Add Virtual Host for Lnmp V0.9, written by licess
=========================================================================
LNMP is a tool to Auto-compile & install nginx+mysql+php on Linux
This script are a tool to add virtual host for Nginx
For more information visit http://www.lnmp.org/

=========================================================================
Please input domain:
(Default domain:www.lnmp.org): www.rffan.info/* Here you enter your domain name, preceded by a hint * *

===========================
Domain=www.rffan.info
===========================
Do your want to add more domain name? (y/n)/* This is to ask you to add a domain name/
Y/* Ford chose Y, because there is a not with the WWW to bind * *
Type domainname,example (bbs.vpser.net forums.vpser.net luntan.vpser.net):
Rffan.info/* Here Enter the domain name without www.
===========================
Domain List=rffan.info
===========================
Please input to the directory for the Domain:www.rffan.info:/* Here, fill in the path of your program file, or you fill in * *
(Default directory:/home/wwwroot/www.rffan.info):/home/www/rffan.info
===========================
Virtual Host Directory=/home/www/rffan.info
===========================
===========================
Allow Rewrite rule? (y/n)/* Here ask you to add pseudo static, of course, choose y*/
===========================
Y
Please input the rewrite of programme:
Wordpress,discuz,typecho,sablog,dabr rewrite was exist.
(Default rewrite:other): WordPress/* Here ask you to choose what the rules of Pseudo static, OK Ford with the wordpress*/
===========================
You choose Rewrite=wordpress
===========================
===========================
Allow Access_log? (y/n)/* log files, SEO analysis of spiders, and the time is also useful when the rooster, recommended regular Cleaning * *
===========================
Y
Type access_log name (Default access log file:www.rffan.info.log):

===========================
You access log File=www.rffan.info.log
===========================

Press any key to start create Virtul host .../* Just click the button to start it.
Create Virtul Host Directory ...
Set permissions of Virtual Host directory ...
You select the exist rewrite rule:/usr/local/nginx/conf/wordpress.conf
Test Nginx Configure File ...
Nginx:the configuration file/usr/local/nginx/conf/nginx.conf syntax is OK
Nginx:configuration file/usr/local/nginx/conf/nginx.conf Test is successful

Restart Nginx ...
=========================================================================
Add Virtual Host for Lnmp V0.9, written by licess
=========================================================================
For more information visit http://www.lnmp.org/

Your Domain:www.rffan.info
Directory of Www.rffan.info:/home/www/rffan.info

=========================================================================

OK, after the above operation, the domain name is bound to complete. Let's upload the file and create the database below.

Upload the file, if there are ready-made documents on the network, then direct wget OK, command as follows

Wget-c http://cn.wordpress.org/wordpress-3.5.1-zh_CN.tar.gz/* This URL is the latest Chinese version of WordPress address * *

Tar zxvf wordpress-3.5.1-zh_cn.tar.gz If you are a zip compressed package, use the command unzip Wordpress-3.5.1-zh_cn.zip decompression

Cp-a wordpress/*/home/www/rffan.info/* The home/www/rffan.info here can be replaced by your website.

Chown-r Www:www/home/www/rffan.info/* This sentence means to give nginx sufficient authority * * must be the folder sufficient permissions!

OK purple OK, but if you do not want to use the command, then you can go back to look at the use of WINSCP, believe that winscp more in line with the first time to play Linuxvps of the child paper taste.

For security recommendations shielding PHP error, that is, php.in display_errors = Off

Let's create a database here.

Enter in the browser:

http://IP/phpmyadmin/

Of course you can choose the language on the landing page, if your English is good, then--or continue to use English, Ah fu don't mind ~

Then enter username: root password: ffan123456

Purple into the phpMyAdmin, click on the database above,

And then enter the middle of the data you want to create the name of the OK.

At this point, all the preparation required to create the site is OK.

Then enter your Web site in the browser (if you have been in DNS to resolve your domain name to your VPS) and then follow the prompts to install can ~ wish you good Luck ~

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.