15일차

xshell자기IP서버에서
su root로 만든뒤 진행

dnf -y install httpd
netstat -ant | grep 80
dnf -y install net-tools
systemctl start httpd
systemctl enable --now httpd

/var/www/html/.
dnf-y install vsftpd
netstat -ant | grep 21
systamctl start vsftpd
firewall-cmd --add-service=ftp
firewall-cmd --runtime-to-permanent
ftp는 root로 접속할수없다
master의 계정으로 메인 페이지 만들자!
php와 mysql를 설치
dnf module list php
dnf module -y reset php
dnf module -y enable php:7.4
dnf module -y install php:7.4/common
php -v
systemctl restart httpd
systemctl status php-fpm
dnf module -y install mariadb:10.3
nano /etc/my.cnf.d/charset.cnf
[mysqld]
character-set-server = utf8mb4
[client]
default-character-set = utf8mb4
systemctl enable --now mariadb
#방화벽
firewall-cmd --add-service=http
firewall-cmd --runtime-to-permanent

firewall-cmd --add-service=mysql
firewall-cmd --runtime-to-permanent

systemctl stop mariadb
rm -rf /var/lib/mysql/*
mysql_install_db --datadir=/var/lib/mysql --user=mysql
systemctl start mariadb

ftp 열려있는지 확인법 cmd창에서 ftp 본인 번호 쳐보면
연결되었습니다 만 뜨면 방화벽을 내려준다

일반 사용자 계정을 활성화 시키기
활성화 위치
/etc/httpd/conf.d/userdir.conf
xshell 에서 cd는 체인지 디렉토리이다
cd /etc/httpd/conf.d
pwd(현제 위치 알려줌)
ls
nano userdir.conf
dnf -y install nano
nano userdir.conf
/home/dulgi/public_html
/home/khorani/public_html
/home/spiXXXX/public
계정추가
useradd shopping
useradd ai

cd /etc/skel
pwd
ls
mdkdir public_html
ls

cd public_html/
ls
touch index.html
touch index.php
다운로드 했던 새로운 워드프레스를 xshell 화면으로 드레그 해온다

codeigniter 를 검색해서 코드이그나이터 4를 다운받는다
그리고 다운한 코드이그나이터를 xshell에 드레그
mkdir auth
mkdir includes
mkdir log
이후 ls
cd auth
touch login.php
touch login_ok.php
touch mypage.php
touch logout.php
touch signup_ok.php

cd ..
cd includes/
touch header.php
touch footer.php
touch db.php

cd ..
log
touch access.log
touch error.log

cd hom useradd ai 하면
위 작업을 통해 유저 ai를 추가하면 ai에 파일이 다 복사가 됨

하나의 서버에서 여러개의 웹페이지 가동하는법
하나의 도메인에 여러 사이트 운영하는법

192.168.0.206/~master1
192.168.0.206/~master2
192.168.0.206/~master3
192.168.0.206/~master4