13일차
RL9 서버에 접속한다
sudo dnf -y update (업데이트 확인)
개인 서버(192.168.0.213)를 100번 서버처럼 만들기
su -> 123456
100번 웹서버 http://cocream.kr
192.168.0.213 -> 안 뜸 (포트가 닫혔거나, 서버가 설치가 안된 것)
netstat -ant | grep 80 (명령어가 없다고 뜨면 설치하면 된다. dnf -y install net-tools)
dnf -y install httpd (80번 포트가 안 열려 있어서 웹서버를 깐다.)
systemctl enable httpd
systemctl start httpd(httpd 시작하기)
netstat -ant | grep 80 (80번 포트는 보이지만 웹사이트는 뜨지 않는다.)
방화벽 때문에 안 보일 수도 있다. -> 방화벽을 꺼주거나 포트를 열어주면 된다.
firewall-cmd --add-service=http
firewall-cmd --runtime-to-permanent
네트워크 -> 80 -> 서버 -> 웹서버(80) -> firewall (80)
포트 열고 웹서버 깔고 시작하고 방화벽 풀어주면 접속이 된다.
/var/www/html 에 내가 할 것을 넣으면 된다.
cd /var/www/html -> touch index.html (/var/www/html에 index.html이라는 파일을 만들었다.)
/var/www/html 우선순위 : index.html(1), index.php(2)
systemctl stop httpd (사이트 멈추기)
FTP 깔기 네트워크 -> 21 -> 서버 -> ftp(21) -> 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
짐 싸기
ssh 192.168.0.92
cd public_html
cd study
tar cvzf study.tar.gz ./
sz study.tar.gz (바탕화면에 저장하기)