Migrate blog to AWS’s ec2

Robin Dong 发表于 2018年08月24日 11:53 | Hits: 1189
Tag: ops | AWS | ec2

My blog had been hosting onLinostsince 2013. But recently support staff from Linost noticed me that my site has led CPU usage of the host machine to 100% so the hosting system automatically ‘limited’ my resource, which actually means my site has totally been shut down.
The first thing I want to do is trying to log in my host machine by using SSH. But unfortunately, Linost doesn’t support SSH login. Without SSH and all the Linux commands, how could I find out the problem of high load and resolve it?
Finally, I chose ec2 ofAWSfor my new hosing machine. In order to reduce the cost, ‘t2.nano’, the cheapest instance type, has been chosen. Although it only has 512MB memory, it’s adequate to run a basic blog on WordPress. Additionally, I boughtreserved instanceby paying upfront for a whole year. That really decrease the cost further (about 50% discount).
Using ec2 has another advantage: I don’t need to install Mysql/Apache/PHP/Wordpress by myself. WithJetware’sAMI (Amazon Machine Image), a basic WordPress blog could be launched with a few clicks of buttons. Jetware’s AMI uses LEMP (Linux/nginx web Engine/MySQL/PHP) as its basic software stack, and also include myPHPAdmin for management of MySQL. This AMI is totally free. The only small defect is the account of MySQL has been set to an empty password with username ‘root’. But we could fix it by simply:

# Login mysql command line
mysql -uroot 
# Set password for root user on 'localhost'
SET PASSWORD FOR root@localhost = PASSWORD('yourpassword');

By typing ‘http://donghao.org/phpmyadmin/’ in the browser, I can manage MySQL so easily:

That’s awesome! Thanks to Jetware.

原文链接: http://donghao.org/2018/08/24/migrate-blog-to-awss-ec2/

0     0


可以不填写评论, 而只是打分. 如果发表评论, 你可以给的分值是-5到+5, 否则, 你只能评-1, +1两种分数. 你的评论可能需要审核.