In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article focuses on "how to build a WordPress site on Amazon AWS server". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to build a WordPress site on Amazon AWS server.
AWS
AWS (Amazon Web Service) is a cloud service provided by Amazon. It is one of the most powerful cloud platforms today. In recent years, a number of successful websites, such as Pinterest, Foursquare, Airbnb, Spotify, have been set up on this platform. The influence of AWS is evident.
In order to use Amazon Cloud, you need an Amazon account. You can use your existing Amazon shopping account, or you can re-register. Go to the Amazon AWS website:
In the "My Account / Console" menu above, my account (My Account) mainly includes various account and billing information. The management panel (Amazon Management Console) is used to set up cloud services for AWS.
Set up the account according to the prompts. You need to enter your credit card information and have a phone number for verification. AWS has a free plan to choose from and try it out first:
In the "My Account / Console" menu above, my account (My Account) mainly includes various account and billing information. The management panel (Amazon Management Console) is used to set up cloud services for AWS.
Set up the account according to the prompts. You need to enter your credit card information and have a phone number for verification. AWS has a free plan to choose from and try it out first:
After registration, still enter the administrative panel (Amazon Management Console) from the "My Account / Console" menu. Most of AWS's cloud services are listed here, including EC2, which we will use later.
EC2 instance (instance)
EC2 (Amazon Elastic Compute Cloud) is an "elastic cloud" service launched by Amazon. An instance of EC2 (instance) provides a virtual host. You can use this virtual host as if you were using a computer or a server. On the other hand, EC2 will charge you according to your actual consumption, avoiding the idle cost of the host. As the website grows, EC2 can easily expand to support more visitors.
For newly registered users, you can create an EC2 instance free of charge
750 hours of mainframe time per month
30g storage space
2 million IO
1GB flash memory
15GB bandwidth
For details of charges, please refer to AWS pricing.
We will create an instance of EC2 and set up WordPress on the virtual host. Go to the EC2 page from the administration panel:
On this page, there are four marked options:
The Singapore in the upper right corner. You can set the server address according to the main location of the user.
Instances on the left. Lists all instances that have been created. You can set it further.
Security Groups on the left. It is used to control the access rights of different IP addresses to an instance.
Launch Instance button in the middle to create a new instance
Create a new instance and follow the instructions. My choice is:
Operating system is Ubuntu 13.10, 64-bit
T1 is the instance type (instance type) of micro, which can be used for free.
Use the default user group (security group) to allow all IP (0.0.0.0Uniplet0) to access port 22, the SSH port.
Create a new key-value pair (key pair) that encrypts the key for SSH access. Save the generated .pem file as vamei.pem
Start the instance
Select Instances from the menu on the EC2 page to view all the instances that have been created and their related properties. Left-click an instance and you can see relevant information from the following window, such as the domain name and IP address of the instance:
Access permission
The access permission setting of Security Groups is mainly described here. We just created an instance that allows all IP to access the SSH port. Since our aim is to set up a Web site for WordPress, we also need to open ports 80 and 3389.
Select Security Groups on the EC2 page and select the user group to which the instance belongs. In the window below, select the Inbound tab and add rules to open ports 80 and 3389 to everyone.
On the other hand, our SSH port is still accessible to everyone. It's not safe. You can add rules about port 22 (rule) to limit the range of IP that can be accessed.
After Apply Rule Changes, these rules will come into effect.
You can create multiple groups under the Security Groups page. Go back to the Instances page and right-click on the corresponding instance to set up a group so that an instance belongs to multiple groups.
WordPress station construction
Now many aspects are ready. Use the saved vamei.pem key to log in to the virtual host using SSH. Under Linux and Mac, you can use the SSH command directly:
The code is as follows:
Ssh-I vamei.pem ubuntu@ec2-54-254225-107.ap-southeast-1.compute.amazonaws.com
For Ubuntu systems, the user name is ubuntu. For Amazon Linux systems, the user name is ec2-user. For RHEL5, the user name may be root or ec2-user.
Under Windows, you can log in using SSH software, such as PuTTY.
For more information, use SSH to connect to the cloud. After logging in, you can use the Amazon cloud as if you were using a stand-alone Linux.
For the steps of setting up a WordPress blog, refer to my previous article, WordPress, to quickly build a site. After the installation is successful, it can be accessed according to the domain name or IP of the instance. The domain name of my instance is http://ec2-54-254-225-107.ap-southeast-1.compute.amazonaws.com/
* permission for uploading images:
When uploading multimedia pictures, there may be a prompt that you do not have permission to create a folder. At this point, to log in to EC2, modify the permissions of the corresponding parent folder wp-content, so that the user name of apache has write permission. The user name of the apache server can be found using the following command:
The code is as follows:
Apache2ctl-S
The user name of my apache is www-data and the group is www-data. My approach is to group the folder into a www-data group and give the home group write permission.
Domain name Settin
The domain name provided by AWS is a secondary domain name. I want to apply for a normal, easy-to-remember domain name, such as vamei.me. Search on GoDaddy, the domain name has not been registered, apply for an account and register the domain name.
(need a credit card and pay a fee of more than ten dollars a year)
After the domain name is registered, you need to connect the created instance to the domain name. Log in to your GoDaddy account and access your own account. All registered domain names are listed in the "Domain" column.
Click the Launch button on the vamei.me line to go to the details page of the vamei.me domain name. Select modify DNS Zone File. Change the IP address of the initial A Host to the IP address of the instance:
This change may take some time to take effect. After it comes into effect, you can visit my blog through vamei.me.
After the above domain name is set successfully, WordPress can be accessed through two domain names, namely, the original AWS domain name and the GoDaddy registered domain name. If you try to click on different pages of the blog, you will find that these links still use the old domain name. We can modify it in WordPress.
Visit your blog and log in. In Dashboard-> Setting-> General, change the WordPress Address and Site Address columns to a new domain name:
In the process of modification, you may accidentally type it wrong and you may not be able to log in to the blog again. In this case, you can follow WordPress's guidance on modifying the site URL.
At this point, I believe you have a deeper understanding of "how to build a WordPress site on Amazon AWS server". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.