Back-end/Server

[Linux] Apache Web Server μ„€μΉ˜ν•˜λŠ” 방법 *였라클 연동 2탄*

one2ye 2022. 5. 13. 20:23
728x90
λ°˜μ‘ν˜•

🟑 Linux에 Apache Web Server μ„€μΉ˜ν•˜κΈ°

βœ… Apache Web Server λž€?

μ•„νŒŒμΉ˜ μ†Œν”„νŠΈμ›¨μ–΄ μž¬λ‹¨μ—μ„œ κ΄€λ¦¬ν•˜λŠ” μ˜€ν”ˆμ†ŒμŠ€ μ›Ή μ„œλ²„λ‘œμ„œ, λ¦¬λˆ…μŠ€λ₯Ό OS둜 ν•˜μ—¬ κ°€μž₯ 많이 μ‚¬μš©λ˜κ³  μžˆλ‹€. μ›Ή μ„œλ²„ ꡬ동을 μœ„ν•œ APM 쀑 A 뢀뢄에 ν•΄λ‹Ήν•˜λŠ” 것이닀.

 

APM ꡬ동 원리

 

 

 

βœ… Apache Web Server μ„€μΉ˜ν•˜κΈ°

μ•„λž˜ λͺ…λ Ήμ–΄λ‘œ λ‹€μš΄λ‘œλ“œ
yum install -y httpd

 

μ„€μΉ˜ μ™„λ£Œ

 

=> μœ„ λ°©λ²•μœΌλ‘œ 잘 λ˜μ§€ μ•ŠλŠ”λ‹€λ©΄,

https://ansan-survivor.tistory.com/120

μ°Έκ³ ν•˜κΈ°!!!

 

 

νŒ¨ν‚€μ§€ μ„€μΉ˜ 확인
rpm -qa | grep httpd

httpd -v

 

=> μ œλŒ€λ‘œ μ„€μΉ˜κ°€ λ˜μ–΄μžˆλŠ”μ§€ 확인 μ™„λ£Œ

 

 

μ„œλΉ„μŠ€ μž¬μ‹œμž‘
systemctl start httpd	# μ„œλΉ„μŠ€ μ‹œμž‘
systemctl enable httpd	# μ„œλΉ„μŠ€ λΆ€νŒ…λ  λ•Œλ§ˆλ‹€ μ‹€ν–‰

 

 

λ°©ν™”λ²½ μ„€μ •
# μ„œλΉ„μŠ€ μΆ”κ°€
firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
firewall-cmd --permanent --add-port=80/tcp	# 80번 포트 μΆ”κ°€(httpκ°€ 주둜 μ‚¬μš©ν•˜λŠ” 포트)
firewall-cmd --reload	# 적용

μ„±κ³΅μ μœΌλ‘œ 적용

 

 

μ„œλΉ„μŠ€μ™€ 포트 μƒνƒœ 확인
netstat -ntlp | grep httpd

정상!

 

 

httpd.conf 파일 μ„€μ • λ³€κ²½
cd /etc/httpd/conf

=> μœ„ 경둜둜 μ΄λ™ν•˜κΈ°

vi httpd.conf

=> μœ„ 파일 쀑 ServerName 뢀뢄을 주석 ν•΄μ œν•˜κΈ° or 직접 μž…λ ₯

 

localhost 및 μžμ‹ μ˜ IP μ£Όμ†Œλ₯Ό μž…λ ₯ν•΄μ£ΌκΈ°

 

↓↓↓ νŠΈλŸ¬λΈ” μŠˆνŒ…πŸ’¨πŸ’¨πŸ’¨

더보기

https://ye5ni.tistory.com/162

=> μœ„ 과정을 μ§„ν–‰ν•˜κ²Œ 된 이유! Trouble Shooting πŸ™Œ

 

 

localhost λ˜λŠ” 본인 호슀트 IPλ₯Ό μ‚¬μš©ν•΄μ„œ 확인

μœ„μ™€ 같은 화면이 λœ¬λ‹€λ©΄ μ •μƒμ μœΌλ‘œ 좜λ ₯된 것!

 

 

↓↓↓ νŠΈλŸ¬λΈ” μŠˆνŒ…πŸ’¨πŸ’¨πŸ’¨

더보기

λͺ¨λ“  섀정이 λ‹€ μ™„λ²½ν•˜κ²Œ λ˜μ–΄μžˆμŒμ—λ„ λΆˆκ΅¬ν•˜κ³  localhost 및 호슀트 IP μ£Όμ†Œλ‘œ 접속이 λ˜μ§€ μ•Šμ•˜λ‹€...

ν•œμ°Έμ„ μ‚½μ§ˆν•œ 끝에 NATλ₯Ό μ΄μš©ν•œ 가상 μ„œλ²„λ₯Ό μ‚¬μš©ν•˜κ³  μžˆλŠ” μƒν™©μ—μ„œ λ†“μΉœ 뢀뢄이 μžˆλ‹€λŠ” 것을 κΉ¨λ‹¬μ•˜λ‹€...! πŸ˜‚

https://ye5ni.tistory.com/163

=> μ—λŸ¬ ν•΄κ²° κ³Όμ •!!! Trouble Shooting πŸ™Œ

 

 

ν•˜μ§€λ§Œ, μœ„ 화면은 default νŽ˜μ΄μ§€μΌ λ•Œ μ΄λ ‡κ²Œ λ‚˜μ˜¨λ‹€. λ‚˜μ˜ μ›Ή μ‚¬μ΄νŠΈλ₯Ό λ§Œλ“€μ—ˆμœΌλ‹ˆ 아무 κΈ€μžλΌλ„ λ„μ›Œλ³΄μž.

 

 

 

 

λ‚˜λ§Œμ˜ μ›Ή νŽ˜μ΄μ§€ λ§Œλ“€μ–΄λ³΄κΈ°
/var/www/html

=> μœ„ 경둜둜 이동

vi index.html

=> μœ„ λͺ…λ Ήμ–΄λ₯Ό 톡해 index.html νŒŒμΌμ„ 생성

<html>
<body>

TestPage
Success!!!

</body>
</html>

=> κ·Έ μ•ˆμ— λ‹€μŒκ³Ό 같은 λ‚΄μš©μ„ μž…λ ₯ (κ°„λ‹¨ν•œ μ›Ή νŽ˜μ΄μ§€λ₯Ό λ§Œλ“€ 수 μžˆλŠ” html μ½”λ“œμ΄λ‹€)

 

 

μœ„μ™€ 같은 νŽ˜μ΄μ§€κ°€ λ‚˜μ˜€λ©΄ 성곡!!!

 

 

 

 

 

πŸ“– Oracle 연동 μ‹œλ¦¬μ¦ˆ πŸ“–

1. https://ye5ni.tistory.com/154
2. https://ye5ni.tistory.com/164
3. https://ye5ni.tistory.com/165
4. https://ye5ni.tistory.com/174

 

 

 

 

 

 

728x90
λ°˜μ‘ν˜•