On an article with everyone to learn how to build the knowledge of the lamp environment, today small series and we share how to quickly build LNMP environment, and build up a website. Nginx is a high-performance HTTP and reverse proxy server, also a IMAP/POP3/SMTP server. Now very popular with webmasters, especially the demand is not very high small and medium-sized websites.
First, download Lnmp One-click installation package
: http://soft.vpser.net/lnmp/lnmp1.2-full.tar.gz
Domestic alternate Address: https://api.sinas3.com/v1/SAE_lnmp/soft/lnmp1.2-full.tar.gz
(software Last updated: July 24, 2015 17:34 gmt+8)
Second, installation Lnmp
My system: CentOS 6.5 x64
I downloaded the extract directly from Linux and installed it to execute the command:
Wget-c http://soft.vpser.net/lnmp/lnmp1.2-full.tar.gz && tar zxf lnmp1.2-full.tar.gz && CD Lnmp1.2-full &&/install.sh Lnmp
After you follow the above command, you will see the following prompt:
Need to set the root password of MySQL (do not enter the direct return will be set to root) if the input has an error to delete, you can hold down CTRL and then press BACKSPACE to delete. Enter back and enter the next step as shown in:
Here you need to confirm whether MYSQLINNODB is enabled, if you are not sure whether you can enter Y for enable, enter Y for Enable, and N for not enabled. By default, y is enabled, enter back to enter next, select MySQL version:
Enter the serial number of the MySQL or mariadb version, enter the next step and select the PHP version:
Enter the number of the PHP version, enter the next step, choose whether to install memory optimization:
You can choose not to install, jemalloc or Tcmalloc, enter the corresponding serial number.
Then select Apache Version
When prompted "Pressany key to Install...or press CTRL + C to cancel", click Enter to confirm the installation begins.
The Lnmp script will automatically install software that compiles nginx, MySQL, PHP, PhpMyAdmin, Zend Optimizer.
(Installation time may vary from several 10 minutes to several hours, mainly due to the machine's configuration speed and other reasons.) )
If Nginx:ok,mysql:ok,php:ok is displayed, and Nginx, MySQL, PHP are both running,80 and Port 3306 are present, and Installlnmp V1.2 completed! Enjoy it. Then the instructions have been installed successfully.
Third, add the virtual host
Execution:lnmpvhost add appears as follows:
Here to enter the domain name to add the site, such as prompt to enter the domain name after the prompt
Here to ask whether to add more domain names, enter Y to add after the return, such as not adding input n
The following need to set the directory of the site, the site directory does not exist, will create a directory. You can also enter a directory that already exists or the directory you want to set ( Note that to enter the full path must be full path to/ start!!!). ). If you do not enter a direct return, use the default directory:/home/wwwroot/domain name.
The next pseudo-static can make the URL more concise and conducive to SEO, such as program support and need to set pseudo-static, such as enabling input y, do not enable input n return.
The next step is to set the log, such as enable log input y, and do not enable input n carriage.
Enter the name of the log you want to set, the default directory is:/home/wwwlogs/The default file name is: Domain name. Log enter confirmation, you will be asked whether to add the database and database users.
If you need to enable input Y, do not enable input n carriage. Here we enter n, because the database is created when you install the CMS system.
Iv. in Lnmp Building Websites in the environment
Here we take the Cicada know Enterprise Building Station system as an example, in just built a LNMP environment built a website.
Cicada know Enterprise Building Station system download: Http://www.chanzhi.org/download/chanzhi5.3-148.html/?u=xcj&a=cnblog
Cicada Knowledge System User's Manual: Http://www.chanzhi.org/book/chanzhieps.html/?u=xcj&a=cnblog
After downloading the extract, move the system folder to the WWW folder, and then upload all the files in the WWW folder to the root directory of the Web site you just built, and access the URL to install the operation.
Start the Setup program
Access to your domain name http://domain/install.php. If you install the Cicada in the level two directory, you also need to add a level two path.
Check module and directory permissions
Note: If the module or directory check does not pass, follow the instructions given by the system to resolve the issue.
Configuration database
Save configuration file
Set up an administrator account
Login background:
At this point we have successfully set up the LNMP service environment, and built a website in this environment.
How to quickly build LNMP service environment