Set up an LNMP environment with BT-Panel

Updated at:

BT-Panel is a free, powerful, and easy-to-use server management software that supports both Linux and Windows systems. You can use it to configure LAMP, LNMP, websites, databases, FTP, and SSL certificates with a single click. It also provides a web-based interface to easily manage your server. This topic shows you how to use BT-Panel to quickly set up an LNMP environment and use phpMyAdmin to manage MySQL.

Prerequisites

  • You have deployed BT-Panel. For more information, see Quickly set up BT-Panel for Linux.

  • Ensure that the firewall allows traffic on the default ports for BT-Panel (8888), phpMyAdmin (888), and MySQL (3306). For more information, see Firewall settings.

Procedure

Step 1: Install LNMP and add a site

You can install required software packages and deploy a website by using BT-Panel based on your business needs. For more information about BT-Panel, visit the official BT-Panel website. This topic uses the installation of LNMP as an example.

  1. Install LNMP.

    1. When you first log on to BT-Panel, read and agree to the user agreement in the Welcome to BT-Panel dialog box, and then click Enter Panel.

      After you enter the panel, a dialog box appears prompting you to install LNMP or LAMP.

    2. In the LNMP(Recommended) section, click One-click Install.

      This step uses the installation of LNMP as an example. If you need to install other environments, go to the Software Store page to search for and install the required software.

      Note
      • You can select the software versions in the environment package that best suit your needs.

      • Select an Installation Method based on your requirements. For a production environment, we recommend selecting Compiled installation to ensure application stability.

      The recommended installation package dialog box is divided into the LNMP(Recommended) and LAMP sections. LNMP includes five components: Nginx, MySQL, Pure-FTPd, PHP, and phpMyAdmin. You can select a version for each component from its drop-down list. At the bottom, two installation methods are available: Fast installation and Compiled installation.

    3. The installation takes some time. You can track the installation progress in the Message Box. The Task List in the message box shows all components that are being installed, such as Nginx, MySQL, and PHP. The item currently being installed expands to show the Execution Log in real time, while other components show a Waiting status. When the message box displays No tasks currently!, the LNMP installation is complete.

  2. Link your BT-Panel account.

    You must link a BT-Panel account to use the panel. Follow the on-screen instructions to register and log on to your BT-Panel account. The dialog box provides fields for your Mobile number and Password. If you do not have an account, click Free Registration to create one.

  3. Add a site.

    1. In the left-side navigation pane of BT-Panel, click Website.

    2. On the Website Management page, click Add Site.

    3. In the Add site-Batch creation is supported dialog box, on the Create Site tab, configure the parameters and click Commit. Keep the default settings for parameters not described in the following table, such as FTP, PHP Version, and Site Category.

      The following table describes the key parameters. Keep the default settings for parameters that are not listed.

      Parameter

      Description

      Domain Name

      • If you have a domain name that points to your Simple Application Server instance, enter your domain name.

      • If you do not have a domain name that points to your instance, you can enter the public IP address of the instance for testing purposes.

      In this example, only the public IP address of the Simple Application Server instance is entered to test website access.

      Remarks

      The notes for the website are optional. In this example, the notes are set to LNMP.

      Root directory

      The root directory where your website files are stored. By default, BT-Panel stores websites in the /www/wwwroot path.

      In this example, the directory is set to /www/wwwroot/test.

      Database

      Select MySQL, and then enter a Database account and Password.

    4. On the Website Management page, view the site that you added. The site information is displayed in a list, including the Site name, Status (Running), Root Directory, Expiration time, Remarks, PHP version, SSL certificate status, and links in the Actions column (Firewall, Settings, Delete).

  4. Test the LNMP platform.

    1. On a computer with internet access, open a web browser.

    2. In the address bar, enter http://<public IP address of the Simple Application Server instance>.

      A success page appears, indicating that the LNMP environment is deployed. It displays the message Congratulations, site created successfully! This is the default index.html page, which you can modify or replace.

Step 2 (Optional): Manage the database

phpMyAdmin is a PHP-based software tool for managing MySQL databases through a web interface.

  1. In the left-side navigation pane of BT-Panel, click Database.

  2. On the Database Management page, find the database that you want to manage and click Manage in the Actions column.

  3. On the phpMyAdmin login page, enter the username and password for your MySQL database to sign in.

    For more information about phpMyAdmin, visit the official phpMyAdmin website. On the phpMyAdmin login page, you can select the interface Language, enter the database Username and Password, and then click Go to log in.