OS/centOS
centOS7_http apache 설치 및 웹사이트 접속
icf_
2022. 9. 5. 10:31
centOS7에 httpd 설치 후 웹서버로 사용 실습.
1. httpd 패키지가 설치되어 있는지 확인합니다.
# rpm -qa | grep http
2. httpd가 동작중인지 확인을 합니다.
# systemctl status httpd
3. httpd를 설치합니다.
# yum install -y httpd
4. httpd 서비스를 실행 및 재부팅시 자동 실행되게 설정합니다.
# systemctl enable --now httpd
5. 방화벽에 서비스를 영구추가합니다.
# firewall-cmd --permanent -add-service=http
6. 방화벽 재실행
# firewall-cmd --reload
7. 방화벽 서비스리스트 확인해서 http추가되었는지확인합니다.
# firewall-cmd --list-service
8. html페이지를 하나 만들어 테스트합니다.
# vim /var/www/html/index.html
<!DOCTYPE html>
<html lang="kr">
<head>
<title>test</title>
</head>
<body>
<p>test</p>
</body>
</html>
9. 다른 pc에서 ip로 접속을 시도해봅니다.
728x90