공부합시다!/LInux

CenTOS7 : WordPress + MySQL5.7 + PHP7.3 Install

간서치 2022. 4. 5. 06:00
728x90

음!

이전 DB자료가 조금 오래되서 설치가 안되는 부분들이 있습니다.

해서 오늘은 자료 보강차원에서 

WordPress 5.9.2

MySQL 5.7

PHP 7.3 

을 설치해서 연동해 보도록 하겠습니다.

 

1. 구성도

 

 

2. WordPress 다운로드 및 설정

# yum install -y httpd
# yum install -y wget
# wget https://ko.wordpress.org/latest-ko_KR.tar.gz
# tar xvfj latest-ko_KR.tar.gz
# cp -r wordpress/ /var/www/html/
# cp /var/www/html/wordpress/wp-config-sample.php /var/www/html/wordpress/wp-config.php
# vi /var/www/html/wordpress/wp-config.php 


# vi /etc/httpd/conf/httpd.conf


# systemctl start httpd
# yum install epel-release yum-utils
# yum install https://rpms.remirepo.net/enterprise/remi-release-7.rpm
# yum-config-manager --enable remi-php74
# yum install php php-opcache php-mcrypt php-gd php-curl php-mysqlnd

 

3. MySQL 다운로드 및 설정

# yum -y install http://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm
# vi /etc/yum.repos.d/mysql-community.repo


# yum install -y mysql-community-server
# firewall-cmd --permanent --add-port=3306/tcp
# firewall-cmd --reload
# systemctl start mysqld
# cat /var/log/mysqld.log | grep password
# mysql_secure_installation
SQL 설정
# mysql -uroot -pIt12345!
mysql> CREATE DATABASE wordpress CHARACTER SET utf8 COLLATE utf8_bin;
mysql> grant all privileges on wordpress .* to 'sdkim'@'localhost' IDENTIFIED BY 'It12345!';
mysql> grant all privileges on wordpress .* to 'sdkim'@'%' IDENTIFIED BY 'It12345!';
mysql> flush privileges;
mysql> exit;
# systemctl restart mysqld

Have a nice day!

728x90