Help Center/ Huawei Cloud EulerOS/ Best Practices/ Installing lnmp Online
Updated on 2024-04-07 GMT+08:00

Installing lnmp Online

Introduction

lnmp is compiled using Linux Shell and can be used to install LNMP (Nginx, MySQL, and PHP), LNMPA (Nginx, MySQL, PHP, and Apache), or LAMP (Apache, MySQL, and PHP) for a variety of Linux servers or independent servers.

This tutorial describes how you can install Inmp in Huawei Cloud EulerOS 2.0.

Preparations

Prepare an ECS and assign a public IP address or EIP to the ECS.

Procedure

  1. Run the following command to download lnmp2.0 and decompress it to the directory:

    wget http://soft.vpser.net/lnmp/lnmp2.0.tar.gz -O lnmp2.0.tar.gz && tar zxf lnmp2.0.tar.gz && cd lnmp2.0

  2. Run the following command to modify the main.sh file:

    vim include/main.sh

    Add an elif judgment to the Get_Dist_Name function.

    elif grep -Eqi "Huawei Cloud EulerOS" /etc/issue || grep -Eq "Huawei Cloud EulerOS" /etc/*-release; then
        DISTRO='HCE'
        PM='yum'

  3. Run the following command to modify the init.sh file:

    vim include/init.sh

    Add the following to the if judgment of the Install_Freetype function:

    echo "${HCE_Version}" | grep -Eqi "^2\.[0-9]" ||

  4. Run the following command to start the installation:

    ./install.sh lnmp

    If the following information is displayed, the installation is successful.