7. How to use AWS server
For development
-SSH, FTP, MySql-
Minhaeng Lee
AWS
Amazon Web Services
• Free for 1 year
• Virtual Server • Different platform is possible
• We are going to use Ubuntu
• Can be accessed from public with key• SSH
• FTP
Contents
• How to run AWS
• SSH (Secured Shell)• Need to do prompt based execution
• FTP (File Transfer Protocol)• Need to upload file
• Tomcat• Need to web based service
• One of famouse java based webserver
How to run AWS (1)
https://aws.amazon.com/
Click - Sign in to the console
Sign up if your are new user
Click - EC2
Click - Lunch instance
Select – Ubuntu Server 14.04
Click – Review and Lunch
Click – Lunch
How to run AWS (2)
• Create a new key pair
• Put your key name
• Download .pem key file
• We need the file for following connections
How to run AWS (3)
• Done!
Server Information
Your Server IP
Mostly used for connections
Please remember it
Your key name
Your server Domain
Connection port setting
Connection port setting
Connection port setting
Web pageAdditional web pageSSHFTPDatabase
SSH
• Secured Shell• Provide command line prompt
• How to?• Windows : puTTY
• Use GUI for connection
• Mac or Linux : terminal• $ssh @address
SSH - MacOS
Open TerminalType
sudo ssh -i ”your_perm_key.pem" ubuntu@
Windows
Download PuTTYhttp://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
Or just google “putty” and click the top of result
PuTTYhttp://the.earth.li/~sgtatham/putty/latest/x86/putty.exe
PuTTYGenhttp://the.earth.li/~sgtatham/putty/latest/x86/puttygen.exe
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.htmlhttp://the.earth.li/~sgtatham/putty/latest/x86/putty.exehttp://the.earth.li/~sgtatham/putty/latest/x86/puttygen.exe
From .pem to .ppk
• Need to convert .pem to .ppk using PuTTYgen
• Also needed for FTP
From .pem to .ppk
From .pem to .ppk
From .pem to .ppk
From .pem to .ppk
Convert Done!
Now, we use .ppk for putty connection
Putty connection using .ppk
Putty connection using .ppk
Putty connection using .ppk
MySQL - install
• In SSH • $sudo apt-get update
• $sudo apt-get upgrade
• $sudo apt-get install mysql-server• Set your root password
MySQL -setting
• In SSH• $mysql -u root –p
• Enter password
• mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'a12345!' WITH GRANT OPTION;
• mysql>FLUSH PRIVILEGES;
• $sudo vi /etc/mysql/my.cnf
• Change “bind-address = x.x.x.x” (something like that)
• To “bind-address = 0.0.0.0”
• Type “i” for editing mode
• Push “esc” for cursor mode.
• Type “:wq” for save and quit
• $sudo service mysql stop
• $sudo service mysql start
Connection Test
Any name you want
IP address of your aws
Connection Test Success!