This article describes the construction and principle of the LNMP environment and one-click installation. LNMP (Linux, Nginx, MySQL, PHP) is a popular open-source web server software stack, widely used in web development, deployment, and maintenance. The LNMP environment construction involves configuring and setting up the underlying system, installation of the Nginx web server, MySQL database management system, and PHP scripting language. Additionally, this article introduces how to install LNMP using a one-click script, which simplifies the installation process and reduces the time and effort required. The LNMP environment is a powerful tool for web development, deployment, and maintenance, and understanding how to construct and install it is essential for web developers and system administrators.