WordPress설치

1.워드프레스다운로드

wget https://wordpress.org/latest.tar.gz

압축해제

tar -xzf latest.tar.gz

2.데이터베이스 사용자 및 데이터베이스를 생성

데이베이스 시작

tar -xzf latest.tar.gz

루트용자에 로그인

tar -xzf latest.tar.gz

데이터베이스에 대한 사용자 및 암호생성

CREATE USER ‘wordpress-user’@’localhost’ IDENTIFIED BY ‘your_strong_password’;

데이터베이스 생성

CREATE DATABASE wordpress-db;

데이베이스에 대한 전체권한을 부여

GRANT ALL PRIVILEGES ON wordpress-db.* TO “wordpress-user”@”localhost”;

새로침

FLUSH PRIVILEGES;

exit

3.wp-config.php 파일 생성 및 편집 방법

cp wordpress/wp-config-sample.php wordpress/wp-config.php

nano wordpress/wp-config.php

DB_NAME

DB_USER

DB_PASSWORD

Authentication Unique Keys and Salts

https://api.wordpress.org/secret-key/1.1/salt/

4.WordPress 파일을 Apache 문서 루트 아래에 설치하려면

cp -r wordpress/* /var/www/html/

mkdir /var/www/html/blog
cp -r wordpress/* /var/www/html/blog/

5.WordPress에서 퍼머링크(permalinks)를 사용하는 방법

sudo vim /etc/httpd/conf/httpd.conf

6.Apache 웹 서버에 대한 파일 권한 수정 방법

sudo chown -R apache /var/www

sudo chgrp -R apache /var/www

sudo chmod 2775 /var/www
find /var/www -type d -exec sudo chmod 2775 {} \;

find /var/www -type f -exec sudo chmod 0644 {}\;

sudo systemctl restart httpd

7.Amazon Linux 2로 WordPress 설치 스크립트 실행 방법

sudo systemctl enable httpd && sudo systemctl enable mariadb

sudo systemctl status mariadb

sudo systemctl start mariadb

sudo systemctl status httpd

sudo systemctl start httpd


게시됨

카테고리

작성자

태그:

댓글

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 항목은 *(으)로 표시합니다