Aliyun account purchase: how to deploy pagoda panel and LNMP environment from zero on Aliyun ECS!!
After buying servers and domain names, many people are blind to the dark Linux command line. It is also the installation environment and the allocation authority. If you accidentally type the wrong line of code, the system will collapse directly.
In fact, there is no need for such a hard core at all now. Take you to use today
The most grounded way of actual combat
, on ariyun ECS (cloud server), build a famous one from scratch
BaoTa Panel
, and a key to configure the website necessary
LNMP environment (Linux Nginx MySQL PHP)
.
Follow this tutorial, even if you are a pure novice, you can win in 10 minutes.
Core Process Overview
The whole process is actually three steps, the logic is very clear:
Server initialization and connection: install the system to the server and connect it with tools.
Open security group (key): "Open the door" to the pagoda panel in the Alibaba Cloud background ".
Install the pagoda with LNMP configuration: copy a line of commands and the rest is fully automatic.
Step 1: Prepare your Aliyun ECS server (1 minute)
If you haven't bought the server yet, or have just bought it, make sure the system is right.
1. How to choose the operating system?
When replacing or purchasing a system in the Alibaba Cloud ECS console,
AlmaLinux 8.x/ 9.x, Rocky Linux 8.x/ 9.x, or Ubuntu 22.04 / 20.04 is strongly recommended
.
⚠Avoid pit reminder: don't choose CentOS 7 again! CentOS 7 has completely stopped official maintenance (EOL) in 2024. As a successor, AlmaLinux or Rocky Linux is currently the most stable and recommended overseas/domestic mainstream choice for the deployment of pagoda. This tutorial takes AlmaLinux 9 as an example. Other systems operate exactly the same.
2. Reset password
After buying the server, find your ECS instance in the Aliyun console and click
Reset Password"
. Set a complex password (written on a small notebook), then restart the server to make the password effective.
Step 2: Release the security group port of Alibaba Cloud (2 minutes)
This is the novice most easy to step on the pit! Many people can't open the pagoda panel anyway because ariyun has blocked all the ports by default. Pagoda panel is required by default
8888
Port (the new pagoda will randomly generate a five-digit port, such
23456
, for insurance, we directly release the common ports required by the pagoda).
Log in to the Alibaba Cloud console and go to the ECS panel.
Click "Instance" in the left menu, find your server, and click the instance name to enter the details page.
Click the Security Groups tab and find Manage Rules on the right ".
Click "Quick Add" or "Manual Add" to add the following rules in the inbound direction: destination port: 8888 (pagoda old version/standby) destination port
: 888 (pagoda database management phpMyAdmin port) destination ports: 80 and 443 (website standard HTTP and HTTPS ports) destination ports: 20 and 21(FTP transmission port) source address: select 0.0.0.0/0 (allow everyone to access)
Click Save.
💡Advanced Security Advice: A security port will be randomly generated after the pagoda is installed. After your installation is complete, you can come back here and change the 8888 to the random port actually generated by the pagoda, so that the server will be more secure.
Step 3: Remotely connect to the server and install the pagoda (3 minutes)
Now we're going to load the pagoda software into the server.
1. Connect to the server
You can use Aliyun's own
"Workbench Remote Connection"
You can also use tools local to your computer (such as Xshell, Putty, or Mac Terminal).
Public IP: IP of your server (visible on the console)
User name: root
Password: The password you just reset
After connecting, you will see a line similar
[root@localhost ~]#
The prompt indicates that you have successfully entered.
2. Execute the installation command
Go to Pagoda official website to copy the latest installation script, or directly copy what I have prepared for you below.
AlmaLinux/Rocky Linux/CentOS
Common Installation Commands:
url=https://download.bt.cn/install/install_lts.sh;if [ -f /usr/bin/curl ];then curl -sSO $url;else wget -O install_lts.sh $url;fi;bash install_lts.sh ed8484bec
If you choose
Ubuntu
system, use this command:
url=https://download.bt.cn/install/install_lts.sh;if [ -f /usr/bin/curl ];then curl -sSO $url;else wget -O install_lts.sh $url;fi;bash install_lts.sh ed8484bec
Copy the command, in the black window
Right Paste
and then press Enter.
3. Confirm installation
After the script runs for a few seconds, a prompt will pop up on the screen:
Do you want to install Bt-Panel to the /www directory now?(y/n):
Don't hesitate, keyboard input
y
Then hit enter.
Next, the server will download and install it automatically. All you need to do is stare at the screen and watch the code fly and wait for about 2 to 3 minutes.
4. Save important information
When the terminal stops scrolling and a big frame appears, the installation is successful!
The following core information will be displayed on the screen. Please take a screenshot or copy and save it to Notepad immediately:
External network panel address
(Similar to https:
//123.45.67.89:23456/abcde)
Intranet panel address
username (initial user name)
password (initial password)
Step 4: One-click deployment of LNMP environment (4 minutes)
Take the "external network panel address" saved just now and copy it to the browser address bar to open it.
1. Login and binding
Enter the username and password in Notepad to log in. The first login, pagoda will pop up a "user agreement", check agree. Then you will be asked to bind a pagoda account (if not, you can register one on site, free of charge, and domestic regulations must be bound).
2. A key to install LNMP
After the binding is successful, the page will automatically pop up a gold prompt box, recommending your installation environment.
On the left is
LNMP (recommended)
On the right is
LAMP
. We undoubtedly choose the left
LNMP
.
It is recommended to check this parameter:
Nginx: Select the latest or stable version (such as Nginx 1.24 or 1.26)
MySQL: If your server memory is less than 2G, select MySQL 5.6/5.7; If the memory is greater than or equal to 2G, choose MySQL 8.0 decisively.
PHP: It is recommended to choose PHP 8.1 or 8.2 (perfect support for mainstream open source website building programs such as WordPress).
Pure static, phpMyAdmin: default.
Select installation method
: must choose
"Fast Installation"
(Compilation and installation are too slow and take more than half an hour).
Click
"One-click installation"
.
At this time, a digital prompt box will appear in the upper left corner of the pagoda to show the installation progress. You can turn off the pop-up window, make a cup of coffee, and wait for it to download and configure automatically in the background. Usually 3~5 minutes later, all software will be green light, installed.
Inspection results and next steps
When LNMP is successfully installed, click on the left side of the pagoda panel
"Status"
As long as you see Nginx, MySQL and PHP are running normally (green triangle is displayed), your server environment has been perfectly set up!
Next, you can:
Click "website" on the left $\rightarrow $"add site" and enter the domain name you have resolved.
The pagoda will automatically help you create a good website root directory and database.
Upload your code through the pagoda's "file" manager and your website will be officially accessible.
Done! From zero
Having a graphical and efficient server management background is actually as simple as that.
