16일차
xshell 205에서 root상태에서 cd /etc/skel 내부에서 진행
사용자 추가
useradd ai(이미 있으니까 이미 있다고 알려줌)
useradd shopping(없으니까 추가됨)
이후 cd /home 여기서 ls를 하면 내가 추가한 사용자인 ai,master,shopping이 보일거임
각 사용자별로 운영하는 홈페이지에 들어갈거임
master.metaedunet.kr
ai.metaedunet.kr
shopping.metaedunet.kr
위의 3개는 본인의 도메인이라고 생각하면 됨
http://192.168.0.205/~master
http://192.168.0.205/~ai
http://192.168.0.205/~shopping
chmod711 /home/master
chmod711 /home/master/public_html
포비든이 뜨는걸 없애기 위해서
일단 루트에서
setsebool -P httpd_enable_homedirs on
restorecon -R /home
루트가 아닌 상태에서
mkdir public_html
chmod 755 /home/master/public_html
cd public_html/
여기서
touch index.html
cd ..
ls를 하여 public_html이 생겼는지 확인
다시 마스터에서 rm -rf pbulic_html(삭제하는거)
mkdir public_html
pwd
chmod 711 /home/master
chmod 755 /home/master/public_html
cd public_html/
public_html에서
ls(아무것도 안떠야함)
touch index.html
마스터의 설정은 끝났고 ai와 shopping은 똑같이 해줄 필요
없이 권한만 부여해주면 됨
xshell에서 205창을 하나 더 띄우고 master로 로그인하고
passwd ai
123456입력 후 뭐라 뜨면 한번 더 입력
passwd shopping도 123456
205창을 하나 더 띄워서 ai로 로그인하고
chmod 711 /home/ai
chmod 755 /home/ai/public_html 입력
shopping도 똑같이 창 하나 더 키고
chmod 711 /home/shopping
chmod 755 /home/shopping/public_html
DNS 추가
192.168.0.205/~master에서 master.bat7.kr로 바꿀거임
1.nano /etc/resolv.conf 여기서
네임서버를 10.0.2.15로 바꾸기
2.nslookup.bat7.kr
루트에서
dnf -y install bind bind-utils
systemctl start named
netstat -ant|grep 53
nslookup bak.kr (server can't find 떠야함)
이제 이 못찾는걸 도메인을 입력했을때 100서버가 아닌 205번이
나오게 할거임
cd /etc
ls -al | grep named.conf
cat named.conf
nano /etc/named.rfc1912.zones
nano /etc/named.conf
cd /var/named
cp named.localhost bat7.kr.zone
nano bat7.kr.zone
nslookup metaedunet.kr
bat7을 찾으라고 명령어를 입력:
1.hosts를 찾음 >(없으면) named.conf를 찾음