简体   繁体   中英

How to transfer zip file to aws ec2 from local machine?

I have written APIs in php, and I want to upload the API to an Amazon EC2 instance.

  • How can I upload it in the form of zip file?
  • How can I extract the zip on the EC2 instance?
  • How to access them?

First is how to upload in the form of zip file,

You can use scp command to transfer files from local machine to your EC2 server

scp -i your.pem yourzip ec2-user@yourEC2IP:/tmp

and then how i can extract zip at ec2.

You can use unzip command on your ec2 instance

unzip yourzip

Finally how to access them

Your API package must be deployed in a web container. Once your web application is deployed and your web container is running, make sure the port is opened for your access form the Security Groups. This is a brief answer because providing all the steps is no practical, maybe do a bit of reading and research.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM