Create a .pem key from aws

ssh-add ~/downloads/ssh_taewon/MyKeyPair.pem

chmod 400 mykeypair.pem

 

Create a .ppk to connect to filezilla

on mac use this command : 

puttygen mykeypair.pem -o mykepair.ppk

 

filezilla -> 

select sftp protocol and select key file, and then browse to your created .ppk file.

 

To run a project on ec2 server, you need to do the following:

1. connect to ec2 instance

sudo ssh -i /users/taewon/downloads/ssh_taewon/mykeypair.pem ec2-user@ec2-13-125-250-142.ap-northeast-2.compute.amazonaws.com

 

2. download tomcat

sudo yum list tomcat*

sudo yum install tomcat7-webapps.noarch

sudo service tomcat7 start

 

3. put a war project into accessible folder and by command, move it to /var/lib/tomcat7/webapps+

4. start a server

service tomcat7 start

 

5. check the log

tail -f catalina.out

 

6. when starting the server, if project placed right, it should automatically unzip.

7. allow access for your ip

8. when trying to access the site, type your ec2 ip address + port +/warprojectname/ + desinated start path

 

 

result : 

 

 

 

 

 

'ETC' 카테고리의 다른 글

Applied Visual Design  (0) 2020.02.02
Basic CSS  (0) 2020.02.01
Writing Shell script 1  (0) 2020.01.30
Linux commands 1  (0) 2020.01.30
Setting aws ec2 and rds, install java jdk8 on ec2(1/30/20 cudo notes1)  (0) 2020.01.30

+ Recent posts