# 1번서버 yum install nfs-utils mkdir /mnt/nas mount -t nfs 169.254.3.5:/n2776268_ssss /mnt/nas df -h cd /mnt/nas touch test111 ls # 2번 서버 yum install nfs-utils mkdir /mnt/nas mount -t nfs 169.254.3.5:/n2776268_ssss /mnt/nas df -h cd /mnt/nas ls 3 # 웹서버 #!/bin/bash hostname Server-EC2 yum install httpd lynx tmux tcpdump -y systemctl start httpd && systemctl enable httpd echo "

Naver Web 1

" > /var/www/html/index.html 4 # 이미지 파일 업로드해서 보이는 index.html 만들어줘 # cat으로 한번에 하도록 만들어줘 # NAS 디렉터리 내에 업로드 폴더 생성 mkdir -p /mnt/nas/uploads # 아파치 웹 root 폴더에 NAS 업로드 폴더 심볼릭 링크(연결고리) 생성 ln -s /mnt/nas/uploads /var/www/html/uploads # 웹서버 계정에 권한 부여 chown -R apache:apache /mnt/nas/uploads chmod -R 775 /mnt/nas/uploads yum install php php-cli -y systemctl restart httpd cat << 'EOF' > /var/www/html/index.html NAS Image Gallery

NAS 이미지 공유

EOF http://110.165.19.193/index.php http://223.130.153.150/index.php