Preface
In the previous article [ Huawei Cloud Yaoyun Server L Instance Evaluation | Quick Deployment MySQL User Guide ], we have used [Huawei Cloud Yaoyun Server L Instance] to complete the deployment and simple use of MySQL in the command line window. However, a friend in the background left a message with me and asked if I could use [Huawei Cloud Yaoyun Server L Instance] to implement a simple game? This way everyone won't feel bored.
Since you asked the question sincerely, I won’t hide it anymore. I will show you today: use [Huawei Cloud Yaoyun Server L Instance] to implement the deployment of the whack-a-mole game. Let’s take a look at the two pictures first.
Article directory
Configuration
In the last article, we clicked the [Remote Login] button and entered the command line window. Today we have a different experience. Click directly on the location in the picture to enter the details page.
Because we have already configured the password and security group of [Huawei Cloud Yaoyun Server L Instance] in the last article, we do not need to configure it this time.
It looked like this before configuration
pagoda panel
What is a pagoda panel?
BT-Panel is a Web-based server management panel that provides a graphical interface and rich functions to facilitate users to manage and configure the server. Its goal is to simplify server operations so that ordinary users can easily build and manage their own servers.
Using the Pagoda panel, you can complete the following operations through the graphical interface:
- Website management: You can add, delete, manage websites, and perform operations such as domain name binding and SSL certificate installation.
- Database management: Supports common database types, such as MySQL, Redis, MongoDB, etc., to facilitate database creation, backup and recovery.
- FTP management: You can create an FTP account to facilitate file uploading and downloading.
- File management: Provides an online file manager that can easily upload, download, edit, and delete files.
- Scheduled tasks: Supports setting up scheduled tasks to execute some scripts or commands regularly.
- Security configuration: You can turn on the firewall, ban IP access, set security rules, etc. to improve the security of the server.
- System monitoring: Provides real-time monitoring of server status and performance, including CPU, memory, disk, network and other information.
In addition to the above functions, Pagoda Panel also supports multi-server management, application store, online log viewing and other features. It is suitable for Linux servers and offers free and paid versions for users to choose from.
Initialize the pagoda panel
Obtain the username and password of the Pagoda management interface
Log in to the cloud server and run the command line
sudo cat /credentials/password.txt
Set the administrator password for the Pagoda management interface
Log in to the cloud server and run the command to directly set the administrator password
// passwd 就是要设置的密码
cd /www/server/panel && btpython tools.py panel passwd administrator
After obtaining the username and password, click the [Manage] button.
If the page cannot be opened at this time, we need to go to the security group configuration to expose port 8888 , otherwise it will not be accessible.
After configuring, click [Manage] to enter the pagoda interface.
Enter username and password and click login
Select the agreement to enter the management page
Installation kit
If you don’t have a Baota account, you need to register it yourself. The registration steps are also very simple, so I won’t go into details. Because I had a Baota account before, I directly entered my username and password to log in.
Did you notice? We can install MySQL directly with one click here. Is it more in line with your operating habits than in the console?
We choose Nginx in LNMP (since the memory is only 2G, you only need to install nginx), set all other options to [Uncheck], select [Fast Installation], select [One-click Installation] on LNMP, and wait for the installation. Finish.
Upload code
Find the location in the picture, click to enter the html file, and upload our whack-a-mole game code
Nginx configuration
Return to the upper-level directory and click the [conf] folder
Edit the nginx.conf file and rewrite the code under the server
listen 80;
server_name http;
index index.html index.htm index.php;
root /www/server/nginx/html;
After the configuration is completed, return to the [Software Store] and select [Homepage Display] for nginx, so that we can see the software on the homepage.
Click the menu bar [Home] and click nginx management. We can also modify the configuration here.
Select [Service], first click [Reload Configuration], and then click [Restart]
Show results
Enter in the browser: public network ip:80/gamename.html to access. The effect is as follows:
Summarize
This article mainly explains how to deploy the whack-a-mole game based on Huawei Cloud Yaoyun Server L instance. The whole process is very smooth, which is one of the advantages of modern cloud platforms. The graphical interface and easy-to-use tools they provide allow professionals to manage servers and applications more efficiently.
The cloud platform also takes into account the needs of novice users and provides a friendly user experience in terms of user interface and operation process. For me personally, through this use and experience, the whole process is relatively smooth, and the interface is fully in line with my personal operating habits and aesthetic standards. I can give it a five-star rating.
Ah Q hopes that through the explanation in this article, it can help you make better use of Yunyao Cloud Server L instances to meet your needs and achieve more efficient cloud application deployment and management.