15일차
nameserver 168.126.63.1
이름해석
dnf -y update 작동불가
ctrl+c ctrl+z (일시정지)
ps
dnf
kill -9 PID
dnf -y update
168.126.63.1은 KT
8.8.8.8은 구글
xxx.xxx.xxx.xxx은 LG
스냅샵 후 재설치까지 완료
dnf -y install lrzsz
21,22,80
100 > 22
dnf -y install httpd
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
21 : Editpuls, 알드라이브, cmd
80 : http://로 접속 가능
ftp는 root로 접속할 수 없다
/var/www/html
master 의 계정으로 메인 페이지 만들기
일반 사용자 계정을 활성화 시켜야한다 hosting이라고 불린다
하나의 서버에 여러개의 웹페이지를 만들 수 있다
useradd shopping
useradd ai
shopping.dulgi.kr
ai.dulgi.kr
public_html
/~user/public_html
/home/dulgi/public_html
192.168.0.210/~master1
192.168.0.210/~master2
192.168.0.210/~master3
192.168.0.210/~master4
일반 사용자 계정을 활성화 시켜야한다
/etc/httpd/conf.d/userdir.conf
pwd 위치 확인
위치가 바뀌면 습관적 ls
nano로 파일 읽기
dnf -y install nano로 다운로드
nano userdir.conf
AllowOverride All
Options None
Require method GET POST OPTIONS
ctrl X로 나가고 shift Y > Enter
계정추가
useradd shopping
useradd ai
자동으로 하기위해 skel 사용
cd /etc/skel
pwd
ls
mkdir public_html
ls
cd public_html
ls
touch index.html
touch index.php
파일 복붙 wordpress
codeignite
mkdir auth
mkdir includes
mkdir log
ls
touch login.php
touch login_ok.php
touch logout.php
touch mypage.php
touch signup.php
cd includes/
ls
touch header.php
touch footer.php
touch db.php
touch access.log
touch error.log
cd /home
ls
useradd ai
ls
cd ai
ls
cd public_html/
ls