Introduction
Servercore is a cloud hosting provider known for its local, scalable, and reliable IT infrastructure. In this guide, we’ll show you how to set up a LEMP stack (Linux, Nginx, MariaDB/MySQL, PHP) on an Ubuntu server provisioned on Servercore—using aaPanel to simplify server management and stack installation.
Using aaPanel—a free, user-friendly control panel—you can manage your server through an intuitive web interface. This approach saves you from manually configuring services via the command line and lets you easily install, monitor, and update your LEMP components.
Why Use aaPanel on Servercore?
- Simplicity: aaPanel’s one-click installation features let you deploy the LEMP stack without complex CLI commands.
- Centralized Management: Manage Nginx, MariaDB/MySQL, PHP, and additional services from one dashboard.
- Local Support: With Servercore’s local data centers (e.g., Nairobi), you benefit from lower latency and local technical support.
- Scalability & Cost Efficiency: Easily scale your resources with Servercore’s pay-as-you-go pricing and manage everything via aaPanel.
Prerequisites
Before starting, ensure you have:
- A Servercore Account: Sign up at Servercore and create a new cloud server instance running Ubuntu (preferably Ubuntu 22.04 LTS or later).
- Basic Linux Knowledge: Familiarity with the command line helps, although aaPanel minimizes direct CLI use.
- Sudo Privileges: Your user account must have administrative rights.
- An SSH Client: For initial server access.
Step 1: Provision Your Ubuntu Server on Servercore
-
Log in to the Servercore Dashboard: Select “Cloud Servers” and provision a new Ubuntu server with your desired resources.
-
Connect via SSH: Once your server is ready, note its public IP and connect:
ssh your_username@your_server_ip
Step 2: Install aaPanel on Your Ubuntu Server
aaPanel simplifies server management by providing a graphical interface for installing and configuring services. To install aaPanel:
-
Download the Installation Script: In your SSH session, run:
URL=https://www.aapanel.com/script/install_7.0_en.sh && if [ -f /usr/bin/curl ];then curl -ksSO "$URL" ;else wget --no-check-certificate -O install_7.0_en.sh "$URL";fi;bash install_7.0_en.sh aapanel
-
Wait for the installation to complete
Step 3: Deploy the LEMP Stack via aaPanel
Once aaPanel is installed, open your web browser and navigate to the provided URL (typically something like http://your_server_ip:port/security-entrance
). Log in using the credentials shown during installation.
- Access the aaPanel Dashboard: The dashboard offers a “Software Store” (or “App Store”) where you can install various server components.
- Install the LEMP Stack:
- Locate the LEMP Stack one-click installer.
- Click Install to deploy Nginx, MariaDB/MySQL, and PHP (with PHP-FPM) automatically.
- aaPanel will handle dependency management, service configuration, and integration.
- Verify Installation: After the installation completes, you can view the status of each component from the aaPanel dashboard.
Step 4: Configure Your Website in aaPanel
- Create a New Website: Within aaPanel, go to the Website Management section and click Add Site.
- Enter your domain name or use the server’s IP address if you’re testing.
- Set the web root (e.g.,
/www/wwwroot/your_site
), which aaPanel creates automatically.
- Manage Settings: aaPanel allows you to configure SSL certificates, rewrite rules, and other settings directly from its interface.
- Deploy Content: You can use the built-in file manager to upload your website files or connect via FTP/SFTP.
Step 5: Test Your LEMP Setup
-
Create a PHP Info File: Using aaPanel’s File Manager or SSH, create a file named
info.php
in your website’s root directory with the following content:<?php
phpinfo();
?>
Access the File in a Browser: Navigate to
http://your_domain_or_IP/info.php
. You should see a detailed PHP configuration page.-
Security Tip: Once confirmed, delete the
info.php
file to prevent exposing sensitive information.
Conclusion
By leveraging aaPanel on a Servercore cloud server, you’ve simplified the deployment of a robust LEMP stack on Ubuntu. This method not only saves time and reduces manual errors but also offers a user-friendly way to manage your server environment. With local infrastructure support from Servercore and an intuitive control panel from aaPanel, you’re well-equipped to host dynamic websites and scalable web applications.
For additional support or advanced configuration tips, explore the aaPanel documentation and Servercore’s support resources. Enjoy your new, efficient LEMP environment!
NB remember to change aapanel default configurations from the settings tab.