18일차
#처음 부터
#네트워크 설정
53 UDP
dnf -y update
dnf -y upgrade
ip addr > 10.0.2.15
ping 168.126.63.1
su
dnf -y install net-tools
dnf -y install unzip
dnf -y install nano
dnf -y install lrzsz
netstat -ant | grep 21
netstat -ant | grep 22
*웹서버 설치
dnf -y install httpd
systemctl start httpd
netstat -an | grep 80
*ftp 설치
dnf -y install vsftpd
systemctl start vsftpd
netstat -an | grep 21
*네임서버 설치
dnf -y install bind bind-utils
dnf -y install bind bind-chroot
systemctl start named
netstat -an | grep 53
*방화벽
firewall-cmd --add-service=http
firewall-cmd --runtime-to-permanent
firewall-cmd --add-service=mysql
firewall-cmd --runtime-to-permanent
firewall-cmd --add-service=ftp
http:192.168.0.201
cmd > ftp 192.168.0.201
#사용자 추가하기
각각의 사용자에 홈페이지를 적용하기 위한 설정
http://192.168.1.5/~master > http://ysh.kr
cd /etc/skel
mkdir public_html
cd public_html
ls
mkdir includes
mkdir auth
mkdir logs
cd includes
touch header.php
touch footer.php
touch db.php
cd ..
cd auth
touch login.php
touch signup.php
touch logout.php
touch mypage.php
cd ..
cd logs
touch access.log
touch error.log
cd ..
pwd
https://www.codeigniter.com/download
4 다운로드
#파일 찾기
cd /etc/
ls -al |grep named.conf
nano /etc/named.conf
listen-on port 53 { any; };
listen-on-v6 port 53 { none; };
allow-query { any; };
dnssec-validation no;
zone "ysh16.kr" IN {
type master;
file "yhs16.kr.zone";
allow-update { none; };
};
zone "timetomove.kr" IN {
type master;
file "timetomove.kr.zone";
allow-update { none; };
};
cd /var/named
ls
cp named.localhost ysh16.kr.zone
cp named.localhost timetomove.zone
ls -al
chown root.named ysh16.kr.zone
chown root.named timetomove.zone
nano ysh16.kr.zone
NS ns.ysh16.kr.
A 192.168.0.201
ns IN A 192.168.0.201
www IN A 192.168.0.201
* IN A 192.168.0.201
nano /etc/resolv.conf
10.0.2.15
named-checkzone ysh16.kr ysh16.kr.zone
systemctl start named
nslookup ysh16.kr
systemctl enable httpd
systemctl enable vsftpd
systemctl enable named
#리녹스 보안 설정 해제
nano /etc/selinux/config
SELINUX=enforcing > disabled
systemctl stop firewalld
systemctl start httpd
systemctl start named
reboot
nslookup ysh16.kr
expected near