1. Purchase a cloud server
I bought the server of Alibaba Cloud and used the free trial server of student rights. If I want to buy it, I can buy it on the official website of Alibaba Cloud.
Find the server under the product specification. Which one to buy depends on your individual needs. I use a lightweight application server here.
Here is the place to choose the region, image, and data disk
Region: Choose a region closest to you to improve the access speed of the network
Mirror: There are many kinds of mirrors, it depends on individual needs. I use Alibaba Cloud Linux in the system mirror
Data disk: This refers to the size of the additional data disk, which depends on individual needs
Payment is final.
2. Log in to the cloud server
2.1 Reset password
After purchasing an ECS server, the system will create an ECS instance. Each ECS instance corresponds to a purchased cloud server. You can access the cloud server through the terminal tool that comes with your computer to deploy applications and build environments.
- In the left navigation bar, select Instances and Images > Instances .
- In the upper left corner of the top menu bar, select the region to which the instance belongs.
- On the instance page, find the target instance, click [External link image transfer failed, the source site may have an anti-leech mechanism, it is recommended to save the image and upload it directly > instance properties > reset instance password** in the operation column, follow the interface prompts Set the login password for the ECS instance. After saving the password, click Restart Now on the pop-up page to make the password take effect.
To reset a sample password, click Reset Password Offline
reboot
This process will take about a few minutes
2.2 Configure security group
1. The ID of the stand-alone instance in the instance
2. Configure security group rules
3. Release port
Click Add Manually, and here I allow SSH default port 22 and Apache default port 80 in the security group entry direction.
80 same reason
3. Example of remote connection to ECS
Return to the example page, click the remote connection under the operation column corresponding to the instance .
In the displayed remote connection dialog box, click Login Now corresponding to remote connection via Workbench .
Enter the corresponding account password to log in
3. Install Apache
1. Execute the command to install Apache and its extension packages.
yum -y install httpd httpd-manual mod_ssl mod_perl
If the command output shows Complete!, Apache is installed successfully.
2. Start Apache and set up self-starting
systemctl start httpd
systemctl enable httpd
3. View Apache running status
systemctl status httpd
If the command output shows active (running), it means that Apache has started.
Ctrl+C to exit
3. Check whether the Apache service is installed successfully
Enter http://<ECS server public network IP> in the address bar of the local computer browser to test whether the Apache service is successfully installed. If the test page shown in the figure is displayed, it means that the Apache service has been successfully installed. The EIP of the ECS server can be obtained from the ECS instance page.
Apache installed successfully!