운영체제/리눅스 linux
[Ubuntu] 우분투에 apache2 설치하고 실행해보자
박경태
2023. 7. 28. 22:28
#1 기존에 설치 됐는지 확인해보자
apt list --installed | grep apache2
#2 apache2 설치
apt install apache2 -y
#3 apache2 실행상태 확인
systemctl status apache2
#4 apache2 실행을 종료해보고 다시 실행해보자
systemctl stop apache2
systemctl status apache2
systemctl start apache2
systemctl status apache2
#5 아파치를 실행한 서버의 IP를 확인하고 로컬에서 접속해보자
ifconfig
#6 가상환경에서 방화벽을 실행하고 다시 접속해보자 - 접속 안됨
ufw status
ufw enable
ufw status
#7 방화벽을 끄고 다시 접속해보자 - 접속됨
ufw status
ufw disable
ufw status
#1 기존에 설치 됐는지 확인해보자
apt list --installed | grep apache2
#2 apache2 설치
apt install apache2 -y
#3 apache2 실행상태 확인
systemctl status apache2
#4 apache2 실행을 종료해보고 다시 실행해보자
systemctl stop apache2
systemctl status apache2
systemctl start apache2
systemctl status apache2
#5 아파치를 실행한 서버의 IP를 확인하고 로컬에서 접속해보자
ifconfig
#6 가상환경에서 방화벽을 실행하고 다시 접속해보자 - 접속 안됨
ufw status
ufw enable
ufw status
#7 방화벽을 끄고 다시 접속해보자 - 접속됨
ufw status
ufw disable
ufw status