Upload
hiromichi-koga
View
1.793
Download
2
Tags:
Embed Size (px)
Citation preview
@Amimoto_Ami https://www.facebook.com/AmimotoAMI
Welcome to the “Amimoto Hands-On”
Login to AWS
Start the AMIMOTO EC2 instance
Before the next steps, take note:
A.) Classic AWS accounts: Can “Review and Launch”
the instance right away.
B.) New AWS Accounts: Have to 1. “Configure Instance Details” first before selecting 2. “Review and Launch”.
A.) Classic AWS accounts: can “Review and Launch” the instance right away.
Select
B.) New AWS Accounts: have to 1. “Configure Instance Details” first before selecting
2. “Review and Launch”.
B.) New AWS Accounts:
For both “Classic” or “New” AWS Accounts, after clicking “Review & Launch”, click LAUNCH.
Associate IP Address
After clicking “Allocate New Address”…For Classic AWS Accounts: For New AWS Accounts:
Allocate a New IP Address used in “VPC”. Then click
“Yes, Allocate”.
Just click“Yes, Allocate”.
Select
And paste your EIP to your browser.
You can now enjoy posting!
Scale Up of Instances
• Stop the instance
• Change the instance type
• Instance startup
Stopping the Instance
Changing the Instance Type:
Scale Down of Instances
• Stop the instance
• Change the instance type
• Instance startup
The process of “Scaling Down” is similar to the process of “Scaling Up”
Before you scale down your instance, you must first STOP the current one. Currently, you have a “t2.small” instance.
Route 53 is a Domain Name System (DNS)
web service.
Function: to route end users to Internet apps by translating www.example.com into the
numeric IP addresses like 192.0.2.1 that computers use to connect to each other.
Domain: amimotohandson.info
Obtained from: GoDaddy
At this point you may notice that your region has changed to “GLOBAL”.
No worries. Route 53 does not require you to select a region.
Forgot your IP address? That’s ok.
1.) Click the box, then EC2.
2.) You are now at the EC2 Dashboard.Click “Instances”, or any of the two.
Copy your IP address:
Copy these NS values.
Next steps: Domain: amimotohandson.info
Obtained from: GoDaddy
Login to GoDaddy (or wherever you got the domain from), then paste the NS Values you just copied from AWS Route 53.
Set SFTP
$ chmod 600 /Users/XXXXXXXX/Downloads/XXXXXXXXXX.pem $ ssh -i /Users/XXXXXXXX/Downloads/XXXXXXXXXX.pem [email protected]
Log in with SSH
http://amimoto-ami.com/2013/11/15/how-to-ssh-as-nginx-user/
$ sudo /usr/sbin/usermod -s /bin/bash nginx $ sudo passwd nginx Changing password for user nginx. New password: Retype new password: passwd: all authentication tokens updated successfully. $ sudo /sbin/service monit stop $ sudo /sbin/service nginx stop $ sudo /sbin/service php-fpm stop $ sudo /usr/sbin/usermod -d /var/www/vhosts nginx $ sudo /sbin/service php-fpm start $ sudo /sbin/service nginx start $ sudo /sbin/service monit start $ sudo mkdir /var/www/vhosts/.ssh $ sudo cp /home/ec2-user/.ssh/authorized_keys /var/www/vhosts/.ssh/ $ sudo chown -R nginx:nginx /var/www/vhosts/.ssh/
Set NGINX SFTP Login User
Releasing an Elastic IP (EIP) Address
After releasing the Elastic IP, you may now terminate the instance.
Terminating the Instance
Terminating the instance(s) you no longer usewill also stop you from getting billed.
And that’s it, you’ve terminated the instance!
@Amimoto_Ami https://www.facebook.com/AmimotoAMI
Thank you very much!