๋กœ์ผ“๐Ÿพ
article thumbnail

 

๋กœ์ปฌ์ด ์•„๋‹Œ ํ…Œ์ŠคํŠธ ์„œ๋ฒ„๋‚ด tomcat8 ์„ค์น˜ํ•˜๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•ด ์•Œ์•„๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.

 

์„œ๋ฒ„๋Š” CentOS ๊ธฐ์ค€์ž…๋‹ˆ๋‹ค. ์•„์ฃผ ๊ธฐ์ดˆ์ ์ธ ๋ฆฌ๋ˆ…์Šค ๋ช…๋ น์–ด๋Š” ์•ˆ๋‹ค๊ณ  ๊ฐ€์ •ํ•˜์—ฌ ์ง„ํ–‰ํ•ฉ๋‹ˆ๋‹ค.

 


[STEP1] Apach Tomcat ์‚ฌ์ดํŠธ ์ ‘์†

 

https://tomcat.apache.org/

Apach Tomcat ์— ๋“ค์–ด๊ฐ‘๋‹ˆ๋‹ค. ์ €๋Š” 8๋ฒ„์ „์„ ์‚ฌ์šฉํ•  ๊ฒƒ์ด๊ธฐ์— Tomcat8์„ ๋ˆŒ๋Ÿฌ์ค๋‹ˆ๋‹ค.

 

์˜ค๋ฅธ์ชฝ ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ "๋งํฌ ์ฃผ์†Œ ๋ณต์‚ฌ"๋ฅผ ๋ˆŒ๋Ÿฌ์ค๋‹ˆ๋‹ค.

 


[STEP2] wget ์„ค์น˜ํ•˜๊ธฐ

 

์„œ๋ฒ„์— ์ ‘์† ํ›„ ์•„๋ž˜ ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅํ•ด์ค๋‹ˆ๋‹ค.

 

yum install -y wget

 

* ์ฐธ๊ณ  : yum์€ ๋ ˆ๋“œํ–‡ ๊ณ„์—ด์—์„œ ์‚ฌ์šฉํ•˜๋Š” ํŒจํ‚ค์ง€ ๋งค๋‹ˆ์ €, wget๋Š” ์›น ์„œ๋ฒ„๋กœ๋ถ€ํ„ฐ ์ปจํ…์ธ ๋ฅผ ๊ฐ€์ ธ์˜ค๋Š” ํ”„๋กœ๊ทธ๋žจ


[STEP3] ์•Œ๋งž์€ ์œ„์น˜์— ํ†ฐ์บฃ ์„ค์น˜ ๋ฐ ์••์ถ• ํ’€๊ธฐ

 

์ €๋Š” /var/lib/tomcat-feadmin ์œ„์น˜์— ํ†ฐ์บฃ์„ ์„ค์น˜ํ•  ํด๋”๋ฅผ ์ƒ์„ฑํ•˜์˜€์Šต๋‹ˆ๋‹ค. 

ํ†ฐ์บฃ ์„ค์น˜ํ•œ ํด๋” ๊ฒฝ๋กœ

์ƒ์„ฑํ•œ ํด๋”๋กœ ์ด๋™ ํ›„ ์•„๋ž˜ ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅํ•ด์ค๋‹ˆ๋‹ค. wget ๋’ค์— ์žˆ๋Š” ์ฃผ์†Œ๋Š” STEP1์—์„œ ๋ณต์‚ฌํ•œ ํ†ฐ์บฃ ์ฃผ์†Œ์ž…๋‹ˆ๋‹ค.

wget https://mirror.navercorp.com/apache/tomcat/tomcat-8/v8.5.69/bin/apache-tomcat-8.5.69.tar.gz

*์ฐธ๊ณ  : tar๋Š” ํŒŒ์ผ์„ ํ•˜๋‚˜๋กœ ํ•ฉ์ณ์คŒ, tar.gz๋Š” tarํŒŒ์ผ์„ gzip์œผ๋กœ ์••์ถ•ํ•ด์คŒ

 

ํ†ฐ์บฃ ํŒŒ์ผ์ด ์„ค์น˜๋œ ๊ฒƒ์„ ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

 

์•„๋ž˜ ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅํ•˜์—ฌ gzip ์••์ถ•์„ ํ’€์–ด์ค๋‹ˆ๋‹ค. ๋ฒ„์ „์ด ๋‹ค๋ฅผ ์ˆ˜๋„ ์žˆ์œผ๋‹ˆ ์ฃผ์˜ํ•˜์‹œ๊ธธ ๋ฐ”๋ž๋‹ˆ๋‹ค.

tar xvzf apache-tomcat-8.5.69.tar.gz

 

ํ†ฐ์บฃ ํด๋”๊ฐ€ ์ƒ์„ฑ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

ํŒŒ๋ž‘์ƒ‰์ด ์••์ถ• ํ‘ผ ํ†ฐ์บฃ ํŒŒ์ผ


[STEP4] catalina.sh ์„ค์ •

 

/var/lib/tomcat-feadmin/apache-tomcat-8.5.69/bin ๋กœ ์ด๋™ํ•œ ํ›„ catalina.sh ์•„๋ž˜ ์ด๋ฏธ์ง€์ฒ˜๋Ÿผ 3๊ฐœ์˜ export๋ฅผ ์ง€์ •ํ•ด์ค๋‹ˆ๋‹ค. ๊ฒฝ๋กœ๋Š” ๋ณธ์ธ์—๊ฒŒ ๋งž๊ฒŒ ์ˆ˜์ •ํ•˜์‹œ๊ธธ ๋ฐ”๋ž๋‹ˆ๋‹ค.


[STEP5] server.xml ์„ค์ •

 

/var/lib/tomcat-feadmin/apache-tomcat-8.5.69/conf๋กœ ์ด๋™ ํ›„ ๋ณธ์ธ์—๊ฒŒ ๋งž๋Š” ํฌํŠธ๋ฅผ ์ง€์ •ํ•ด์ค๋‹ˆ๋‹ค. ๋ชจ๋“  ํฌํŠธ ๋ฒˆํ˜ธ๋Š” ์ค‘๋ณต๋˜์–ด์„  ์•ˆ๋ฉ๋‹ˆ๋‹ค.

 

shutdown ํฌํŠธ
startup ํฌํŠธ(์‹ค์ œ๋กœ ์‹คํ–‰๋˜๋Š” ํ†ฐ์บฃ ํฌํŠธ)
AJP ํฌํŠธ

* ์ฐธ๊ณ  : AJP ํ”„๋กœํ† ์ฝœ์€ ์›น์„œ๋ฒ„์—์„œ ๋ฐ›์€ ์š”์ฒญ์„ WAS๋กœ ์ „๋‹ฌํ•ด์ฃผ๋Š” ํ”„๋กœํ† ์ฝœ


[FINAL STEP] ํ†ฐ์บฃ ์‹คํ–‰

 

/var/lib/tomcat-feadmin/apache-tomcat-8.5.69/bin๋กœ ์ด๋™ ํ›„ ์•„๋ž˜ ๋ช…๋ น์–ด๋ฅผ ์ˆ˜ํ–‰ํ•ด์ค๋‹ˆ๋‹ค.

./startup.sh

* ์ฐธ๊ณ  : ./shutdown.sh ์ž…๋ ฅํ•˜๋ฉด ํ†ฐ์บฃ ์„œ๋ฒ„ ์ค‘์ง€

 

http://ip์ฃผ์†Œ:8090 ์œผ๋กœ ์ด๋™ํ•œ ํ›„ ์•„๋ž˜์™€ ๊ฐ™์€ ํ™”๋ฉด์ด ๋‚˜์˜ค๋ฉด ์„ฑ๊ณต์ ์œผ๋กœ ํ†ฐ์บฃ์„ ์‹คํ–‰ํ•œ ๊ฒƒ์ž…๋‹ˆ๋‹ค. ๋ณธ์ธ์ด ์ง€์ •ํ•œ ํฌํŠธ๋กœ ์ฃผ์†Œ ์ด๋™์„ ํ•˜์‹œ๊ธฐ ๋ฐ”๋ž๋‹ˆ๋‹ค.

 

profile on loading

Loading...