Download and install LNMP/ one-click installation

Download and install LNMP/ one-click installation

This tutorial is a fool-style tutorial to install LNMP, please go around. Based on my habit of developing in a virtual machine, I installed it in the Centos environment this time.

1. Enter your virtual machine

Insert picture description here

2. Download the LNMP package

system requirement:

1. CentOS/RHEL/Fedora/Debian/Ubuntu/Raspbian/Deepin/Aliyun/Amazon/Mint Linux distribution
2. Need more than 5GB free hard disk space, MySQL 5.7, MariaDB 10 at least 9GB free space
3. Need more than 128MB memory (128MB Small memory VPS, Xen must have SWAP, OpenVZ must have at least 128MB of vSWAP or burst memory), please be careful not to use 64-bit systems for small memory!
4. Installing MySQL 5.6 or 5.7 and MariaDB 10 must have at least 1G of RAM, and higher versions must at least 2G of RAM!.
5. Installing PHP 7 and above must have more than 1G RAM!.
6. The VPS or server must be set up with available yum or apt-get sources and ensure that they can work normally. Offline installation needs to increase the CheckMirror=n parameter!
7. Linux is case sensitive, please pay attention when entering commands!
8. If you have MySQL/MariaDB installed through yum or apt-get, please back up data and other related files by yourself!
9. The official website of CentOS 5, Debian 6 and previous versions has ended and cannot be used!
10. Ubuntu 18+, Debian 9+, Mint 19+, Deepin 15.7+ and all new Linux distributions can only be installed with 1.7!
11. PHP 7.1.* The following versions do not support Ubuntu 19+, Debian 10 and other very new Linux distributions!
12. Don't use the Alibaba Cloud Ubuntu 14.04 system template if there is a problem! ! !
13. PHP 7.4 upgrade or installation must be CentOS 8+, Debian 8+, Ubuntu 16.04+ and 1.7 must be used! ! !
14. MySQL 8.0 upgrade or installation must be CentOS 8+, Debian 9+, Ubuntu 16.04+ and 1.7 must be used! ! !

Download and install the LNMP one-click installation package:

Install the stable version of LNMP
If you need unattended installation, please use the unattended command generation tool (copy the following commands directly to the virtual machine to install):

wget http://soft.vpser.net/lnmp/lnmp1.7.tar.gz -cO lnmp1.7.tar.gz && tar zxf lnmp1.7.tar.gz && cd lnmp1.7 && ./install.sh lnmp

Insert picture description here
After running the above LNMP installation command, the following prompt will appear:
Insert picture description here
Enter the serial number in front of the corresponding MySQL or MariaDB version , and press Enter to enter the next step.

Insert picture description here
Set MySQL root password (for safety, do not enter directly, it will be set to lnmp.org# random number). If there is an input error and need to be deleted, you can hold down Ctrl and then press Backspace to delete (in some cases, only Backspace is required) key). After entering, press Enter to enter the next step, as shown in the following figure:
Insert picture description here
Ask whether you need to enable MySQL InnoDB. The InnoDB engine is enabled by default. Generally, it is recommended to enable it. Press Enter or enter y. If you are sure that the engine is not needed, you can enter n, (MySQL 5.7+ version cannot close InnoDB), input is complete, press Enter to go to the next step.

Insert picture description here
Enter the serial number of the PHP version you want to select, press Enter to go to the next step, and choose whether to install memory optimization:

Insert picture description here
You can choose not to install, Jemalloc or TCmalloc, enter the corresponding serial number and press Enter, and press Enter to default to not install.
Insert picture description here
If it is LNMPA or LAMP, it will be prompted to set up the mailbox and select Apache "Please enter Administrator Email Address:", you need to set the administrator mailbox, which will be displayed on the error page when an error is reported.

Then select the Apache version
Insert picture description here

Enter the serial number in front of the corresponding version as prompted, and press Enter.

After prompting "Press any key to install…or Press Ctrl+c to cancel", press Enter to confirm to start the installation.
The LNMP script will automatically install and compile Nginx, MySQL, PHP, phpMyAdmin and other software and related components.

The installation time may vary from tens of minutes to several hours, mainly due to factors such as the configuration network speed of the machine.

Installation is complete:
if it displays Nginx: OK, MySQL: OK, PHP: OK

Insert picture description here

And Nginx, MySQL, PHP are all running, 80 and 3306 ports exist, and the installation time and Install lnmp V1.6 completed! Enjoy it. It means that the installation has been successful.
Some systems may keep stuck on Install lnmp V1.5 completed! Enjoy it. If you do not exit automatically, you can press Ctrl+c to exit.

After the installation is complete, you can start using it. Press the add virtual host tutorial. After adding the virtual host, you can use the sftp or ftp server to upload the website code, resolve the domain name to the VPS or the IP of the server, and the resolution will take effect.

installation failed
Insert picture description here

If the installation fails, please check whether the memory of the virtual machine is not enough and whether the network is normal. Finally, if it fails, check the configuration environment of the virtual machine, and then repeat the above installation steps.

Guess you like

Origin blog.csdn.net/qq_41441669/article/details/106530763