15일차
스냅샷 후 재설치까지 완료
dnf -y update
dnf -y install net-tools
dnf -y install nano
dnf -y install lrzsz
21, 22, 80
100 > 22
21
80
dnf -y install httpd
netstat -ant | grep 80
dnf -y install net-tools
systemctl start httpd
firewall-cmd --add-service=http
firewall-cmd --runtime-to-permanent
You can add content to the directory
/var/www/html/.
dnf -y install vsftpd
netstat -ant | grep 21
systemctl start vsftpd
firewall-cmd --add-service=ftp
firewall-cmd --runtime-to-permanent
ftp는 root로 접속 할 수 없다.
/var/www/html
master 의 계정으로 메인 페이지를 만들자!
설치X, 서비스 X
100
일반 사용자 계정을 활성화 시키기
활성화
/etc/httpd/conf.d/userdir.conf
cd = change directory
pwd => 파일명 위치 확인
nano를 통해 파일을 읽음
디렉토리 위치가 바뀌면 습관처럼 ls 를 하자
하나의 서버에 여러개의 웹페이지 => 호스팅
public_html
/~user/public_html
/home/byzeroh/public_html
계정추가
useradd shopping
useradd ai
cd /etc/skel
mkdir public_html
cd public_html
touch index.html
touch index.php
codeigniter, wordpress 파일 추가
mkdir + 디렉토리명 = 디렉토리 추가
rmdir + 디렉토리명 = 디렉토리 삭제
touch + 파일명 = 파일 추가
cd .. = 상위 디렉토리로 이동
html이 더 우선적임
cms = 완성본
framework = 뼈대
192.168.0.203/~master1
192.168.0.203/~master2
192.168.0.203/~master3
192.168.0.203/~master4
systemctl enable --now httpd
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