13일차

오너런 날씨가 너어어어무 좋았지만 바람이 너무 많이 분날이다 그치만 날씨가 너어어무 좋아서 기부니가 조타

개인서버를 100번 서버처럼 만들기

xshell 에서 자기 자리 IP로 로그인 한 후
su
123456

주소란에 192.168.0.206 을 치면 아무것도 안나오는데 지금부터 나오게 할것이다
안나오는 이유는 웹서버 설치가 안됐거나 포트가 닫혀있어서 이다

xshell 에서
80이 열려있는지 안열려있으면 설치과정 netstat -ant | grep 80 을 쳣을때
command not found 가 뜨면
dnf -y install net-tools
dnf -y install httpd
netstat -ant | grep 80
systemctl start httpd
netstat -ant | grep 80
명령어를 치고 IP를 쳐도 안들어가지면 방화벽 풀어주는 명령어를 친다
firewall-cmd --add-service=http
firewall-cmd --runtime-to-permanent
을치고 다시 IP를 치면 사이트가 나온다
그리고 xsehll에서
cd /var/www/html
touch index.html
index.html 1순위
index.php 2순위로 읽힌다
systemctl stop httpd (웹 멈추는 명령어)
systemctl start httpd (웹 시작 명령어)
21포트 여는법
network > 21 > 서버 > FTP21 > firewall(21)
netstat -ant | grep 21
dnf -y install vsftpd
systemctl start vsftpd
netstat -ant | grep 21
firewall-cmd --add-service=ftp
firewall-cmd --runtime-to-permanent