This is the 14th day of my participation in the November Gwen Challenge. Check out the event details: The last Gwen Challenge 2021

Learn cloud server development together

Pilot: Have a server, I unexpectedly so cool?

Alternative project: write a resume page in 10 lines of code!

How to apply for a free SSL certificate for a domain name

Original is not easy, ask you to browse to the end of the article, point a like, look, leave a message, casually say, thank you for the support of readers, friends, then start the body.

First, why to install pagoda panel

Pagoda Linux panel is the server management software to improve the efficiency of operation and maintenance. It supports more than 100 server management functions, such as one-click LAMP/LNMP/ cluster/monitoring/website /FTP/ database /JAVA.

Simple to understand, we only depend on the command line in a Linux environment to carry out various operations, for beginners is very not friendly, especially to install some environment, such as mysql, nginx, pagoda panel is a visual (with what point what, without input instruction) interface, we can be very convenient for the above operations.

In addition, we can also use the pagoda for nginx reverse proxy Settings, more convenient upload/download/modify/delete files, fast set up scheduled tasks, etc., really super fun, let’s experience it together ~

Two, the installation of pagoda panel, basic Settings

First, we need to go to the server security group and add8888Port access permission, pagoda panel default boot port 8888, do not know how to add the first article in this series: XXXXX.

Then we copy the following installation instructions to the server to run the installation can be installed pagoda ~ (I here is ali Cloud research and development of Linux, if you install other systems can see the official website installation method ha, if you encounter problems, you can also leave a message about your system and problems encountered ~)

Yum install wget - y && wget - O the sh http://download.bt.cn/install/install_6.0.sh && sh the shCopy the code

The whole installation process on my side takes about 2 minutes. After the installation is successful, the access address and the initial user name and password will be prompted.

The browser opens the page, and then enters the user name and password to log in. The user agreement slides down to the bottom and then agrees.

Install nignx and mysql. If you want to install mysql8.0, you will need 6GB of memory, so you will choose myslq5.7.

The next version of 5.7 will be 8.0. I found a reasonable explanation on v2ex.

Click “Install” and you will enter the download and installation page, which may take a while. At this point, you can close the installation screen.

After software installation, you will find that you need to register a pagoda account and log in to use it. You can directly register a pagoda account on your mobile phone, or try to remove the pagoda panel login restriction method later (direct browser search is ok, it is suggested that direct registration is convenient, and mobile phone binding, operation security is also higher).

If you choose to register a pagoda account, you can register and log in through my link, so that you can receive the pagoda 3188 yuan gift package, I can also have a certain income (thank you), the registration link: www.bt.cn/?invite_cod…

After entering the pagoda, you can see the basic situation of the machine, as well as some related functions of the pagoda interface.

Installing mysql and Nginx took a total of 13 minutes.

If you forget the default login account and password of pagoda later, you can directly enter BT default in the server to view (the display is only the initial password and account, other cases forget the password later).

If you forget your account/password after you change it, enter BT to enter the function options on the panel and select the corresponding function to change the account/password.

Three, pagoda panel advanced use

3.1 Creating a Configuration Website

After logging in the pagoda panel, we click the website TAB on the left of the navigation bar to enter the page of adding a website, and then click Add site to enter the domain name of the website to be added, remarks information, relevant configuration file storage root directory and other information.

After basic setup, you also need to deploy certificates,How to configure a free certificate for a domain name. Click on theNot to deployIs automatically redirected to the deployment page.

On the deployment pageOther certificates, copy the downloaded certificate key and pem into the corresponding box, and click the save button.

After the deployment is successful, the certificate information and expiration time are displayed. After the expiration, apply for the certificate from Aliyun or Tencent Cloud, and select Forced HTTPS.

If you go to the default nignx page below, the configuration is successful. A simple reverse proxy is done, and here we areThe clientaccessOwn domain nameThe actual return is zeroServer 80The content of the port ~

Next, we can further set up the site, we click the set button, you can enter the site Settings page, in addition to the front configuration SSL certificate, there are domain name management, traffic limit, redirection and reverse proxy and other functions set, the following simple and we introduce the redirection and reverse proxy.

Redirection is to visit the website domain name, it will jump to the redirection domain name we set, such as the following visit to our own domain name, it will jump to Baidu Translation.

Reverse proxy means that when you visit our domain name, the domain name will not change, but the display content will change to the content of our specified page. For example, if you visit the domain name, the actual display content will change from the original nginx default page to baidu translation page.

3.2 Convenient file operation

The pagoda also makes it super easy to process files in the server and transfer files between local and server.

Click the file button on the left of the pagoda page, we can enter the file management page, we can freely choose which directory to enter; Upload files/folders from local to server; Download files/folders from remote servers to servers; You can also set up shared folders/files for others to download; Directly open the terminal in the current directory for operations.

3.2.1 Uploading Files or Folders from the Local PC to the Server

Let’s click New directory to store the demo file.

1) Go to the newly created folder (/root/project/temp) and click the upload button to jump to the file upload page. 2) Select the file/folder to upload. After selecting the upload type, click the button to select the local file to upload. We confirm that there is no problem, and then click “Start uploading”. After uploading, the page of uploading files will not be automatically quit. If you need to upload other files, just follow the above method.

In addition, remote download is also supported. Click the remote download button, enter the remote file address, and then specify which directory to download to the server and the corresponding file name to save; Then click OK.

Very convenient, much more convenient than using SCP command locally

3.2.2 Downloading Files or Folders from the server to the LOCAL PC

This is also very simple, for a single file, we can directly right-click, choose to download directly to the local.

Or choose share, the system will help us generate a share link, we can also set the verification code password, increase the security of file sharing, after setting, we will share the link and password to the download person.

The folder cannot be directly downloaded. You can share the file content or compress the folder into a compressed file and download it.

3.2.3 Directly Open the terminal in the current directory

I also like this very much. I directly open the terminal in the corresponding folder, which is the same as when I install EasyNewFile on MAC and create a new terminal. When I open the terminal, it will automatically enter the corresponding directory.

There are two methods: Directly click the terminal button in the corresponding directory, or right-click in the blank area of the directory and choose Terminal.

3.2.4 My favorite: File modification related operations

This is my favorite function, in the pagoda file management, we can be very convenient to modify the file content, while like Linux simple, cool, but also disliking the file operation (especially modify) trouble is me…

Double click the corresponding file to modify the content of the file, modify the interface as follows, it is too love, super complete functions, basic functions such as: save, all save, refresh, advanced point of search, replace, jump line, font does not fall, more advanced themes, Settings, shortcuts are simply treasure.

The theme is set in white and black. Personally, I prefer black. Note that this theme only changes the color of the file modification area, while the directory and toolbar remain unchanged

The treasure of Settings is code completion, also known as auto-complete.

It’s not that easy to use, but it’s better than nothing

Most of the shortcuts are the same as our local files, so it’s very silky to use.

Sublime Text is a mini version of sublime Text, which uses the same functionality as local changes to modify file contents

3.3 So simple to set a scheduled task

The next thing I want to introduce to you is the scheduled task function, where you can easily set a scheduled task, that is, every time the system automatically execute a program or script.

Pagodas provide a lot of job types, such as Shell script, backup website, backup database, log cutting, free memory, access URL… For the general cloud server users, I think Shell script type is the most used, I don’t understand the other.

A Shell script is a Linux command (other tasks are Linux commands, complex commands), such as running Python code periodically.

Take the timed task I recently used as an example. In the activity of giving Ali Cloud server, there is a step to verify whether everyone meets the qualification of receiving the gift. How to verify?

After everyone clicks my link to associate with me, ali Cloud background will have corresponding association information (but they did not make user verification page), I need to climb ali Cloud to get the basic information of the user associated with me, and then everyone can query through the Web page I wrote to see if the information matches.

In this process, there is one item: update data. Only after the data is updated on my side, the associated users can be queried whether they meet the qualification in the page query.

If I had to update the data all day long, I would have lost my day

Every half a day or a day to update the data to everyone, seems to be ok, but if you misoperate, buy something 0 yuan goods, you are not a new user, may lose the gift qualification ~

Write a Python script to update the data periodically.

At this time, we directly use the pagoda’s scheduled task function, set a timed Shell script, set the name (write casually, express your intention), execution period, script content (ensure that your terminal execution is ok), you can click the Add Task button to add a timed task. It takes less than 10 seconds to write a timed task script.

When we’re done, we need to clickperformRun the test once, then viewThe logTo make sure the script runs properly.

In the software store, you can download some applications or service environments, such as mysql and PHP. In the panel Settings, you can set and modify some basic contents of the panel, such as login port, password, user name, etc. I will not introduce other functions, you can directly install to experience, absolutely beyond imagination ~

Iv. Notice of the next period

Through the study of this article, we found a good helper to learn the use of cloud server – pagoda, I hope you can master the use of some excellent functions of the pagoda, really let the tool to help us learn, of course, standing in the perspective of learners, we can not rely too much on the tool, to “know what it is”.

In the next section, we’ll explore more about using cloud servers. What do you want to hear about cloud servers? Welcome to say your thoughts in the comment area, I will choose to like or put forward more direction output in advance.

Learn cloud server development together

Pilot: Have a server, I unexpectedly so cool?

Alternative project: write a resume page in 10 lines of code!

How to apply for a free SSL certificate for a domain name

Original is not easy, click a like, look, leave a message, casually say, thank you readers for your support.