| 내컴퓨터 | 웹 앱 서버 | DB 서버 |
|---|---|---|
| 클라이언트 | DB클라이언트 | DB서버 |
DB서버 준비
yum install -y mariadb-serversetenforce 0
systemctl stop firewalldCREATE USER '[이니셜]'@'%' IDENTIFIED BY 'qwer1234';
CREATE DATABASE [DB 이름];
GRANT ALL PRIVILEGES ON [DB 이름].* TO '[이니셜]'@'%';윈도우 컴퓨터에 DB 클라이언트 준비
웹 서버 준비
yum install -y nginx
php 설치
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
dnf install -y https://rpms.remirepo.net/enterprise/remi-release-8.rpm
dnf module reset php
dnf install -y php php-mysqlnd php-fpm php-opcache php-curl php-json php-gd php-xml php-mbstring php-zip -y
php설정
vi /etc/php-fpm.d/www.conf
24 user = nginx
26 group = nginx
48 ;listen.owner = nginx
49 ;listen.group = nginx
systemctl restart php-fpm
wordpress 설치
yum install -y wget
wget https://ko.wordpress.org/latest-ko_KR.tar.gz
tar zxvf latest-ko_KR.tar.gz
mv wordpress /var/www/html/
nginx 서버 설정
vi /etc/nginx/conf.d/test.conf
server {
listen 80;
server_name test [웹 서버 IP주소];
root /var/www/html/wordpress;
index index.php index.html index.htm;
# set client body size to 100 MB #
client_max_body_size 100M;
location / {
try_files $uri $uri/ /index.php?$args;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php-fpm/www.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
폴더 권한 설정
chown -R nginx:nginx /var/www/html/wordpress
nginx 서버 재실행
접속 확인
워드 프레스 접속 후 설정