Learning Diary, Amazon AWS EC2, 学习笔记

in #hosting8 years ago (edited)

Screen Shot 2018-03-27 at 10.40.26 AM.png

Hello Steemit friends, for few years Amazon are giving out 1 year cloud hosting for free for anyone who own a credit card, their cloud hosting are called AWS EC2, so I just get my hand on their cloud hosting and see how difficult it is to set it up

这几年Amazon都给任何人免费一年的云服务,只要你有信用卡绑上去,就可以用了,他们的云服务叫AWS EC2,反正我也需要用到服务器就尝试好了

So below is the step I took just to host a website using AWS EC2
以下就是我setup的步骤

  1. Choose region

  2. Under services -> Go EC2 Dashboard -> Launch Instance -> Choose Ubuntu
    -> Choose 1 GB - > Launch

  3. Create a new key pair -> AWS.pem (on the download folder)

  4. Back to EC2 Dashboard-> Security Groups -> Edit inbound rules, add HTTP port 80
    -> set SSH to allow source from anywhere, HTTP also allow source from anywhere

  5. EC2 Dashboard -> Elastic IP
    -> create new Elastic IP
    -> associate IP to your Instance

  6. Right click your instant click connect to get the SSH command, open your terminal and SSH into it

  7. Inside the terminal, type
    sudo apt-get update (to update the software)

  8. download XAMPP
    wget https://www.apachefriends.org/xampp-files/7.2.3/xampp-linux-x64-7.2.3-0-installer.run

  9. Make execute installation
    sudo chmod +x xampp-linux-x64-7.2.3-0-installer.run

  10. Run installation
    sudo ./xampp-linux-x64-7.2.3-0-installer.run

  11. Run XAMPP
    sudo /opt/lampp/lampp start

  12. Your file are now inside
    /opt/lampp/htdocs

  13. open web browser and access the website via IP

  14. Edit XAMPP configurations
    sudo vi /opt/lampp/etc/extra/httpd-xampp.conf

  15. Reboot the server
    sudo /opt/lampp/lampp restart

  16. Set the security
    sudo /opt/lampp/xampp security

  17. Download filezilla
    -> add key to SFTP
    -> connect using the instance public DNS
    -> sudo chown -R ubuntu /opt/lampp/htdocs

So far I have installed PHP, mysql, Apache and can access the server via SSH and FTP, can open the website. But I haven setup the email server, domain name and more...

thanks for reading

目前为止上了apache,php,mysql,可以用ssh和ftp连线,也可以打开网站了,还缺少email,domain和其他

谢谢阅读

Sort:  

haha, Amazon AWS a bit complicated, so many cloud services provided, I learnt a bit then choose to stay away. Too much about infrastructure and dev ops

yeah, there is way more button to click compare to digital ocean, but at least its free for the first year

you can try the tag #cn-programming

You've been upvoted by TeamMalaysia community. Do checkout other posts made by other TeamMalaysia authors at http://steemit.com/created/teammalaysia

To support the growth of TeamMalaysia Follow our upvotes by using steemauto.com and follow trail of @myach

Vote TeamMalaysia witness bitrocker2020 using this link vote for witness

I still owe them some $20, haven't paid for many months already.
And still got some files in S3. Every month AWS will send me reminder email for payment which I just ignored. LOL.
Used to be a certified AWS architect, until few months ago.