centos7 템플릿으로 on-premise에 WP 서버를 하나 만들고 이 WP 서버를 방금 생성한 RDS와 연동해 Wordpress를 구성하라.
[root@rds ~]# yum -y install epel-release yum-utils
[root@rds ~]# yum repolist
[root@rds ~]# yum -y install <https://rpms.remirepo.net/enterprise/remi-release-7.rpm>
[root@rds ~]# yum-config-manager --enable remi-php73
[root@rds ~]# yum -y install httpd php php-mysql
[root@rds ~]# yum -y install wget unzip
[root@rds ~]# cd /var/www/html
[root@rds html]# wget <https://wordpress.org/latest.zip>
[root@rds html]# unzip latest.zip
[root@rds html]# cd wordpress
[root@rds wordpress]# mv * ./
[root@rds wordpress]# cd ..
[root@rds html]# mv wp-config-sample.php wp-config.php
[root@rds html]# vi wp-config.php
...
// ** Database settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'wpDB' );
/** Database username */
define( 'DB_USER', 'root' );
/** Database password */
define( 'DB_PASSWORD', 'test1234' );
/** Database hostname */
define( 'DB_HOST', 'database-1.cb7gp3ktrwhs.ap-northeast-2.rds.amazonaws.com' );
/** Database charset to use in creating database tables. */
define( 'DB_CHARSET', 'utf8' );
/** The database collate type. Don't change this if in doubt. */
define( 'DB_COLLATE', '' );
...
인바운드 규칙 편집


[root@rds html]# mysql -u root -ptest1234 -h database-1.cb7gp3ktrwhs.ap-northeast-2.rds.amazonaws.com
[root@rds html]# mysql -u root -ptest1234 -h database-1.cb7gp3ktrwhs.ap-northeast-2.rds.amazonaws.com
Welcome to the MariaDB monitor. Commands end with ; or \\g.
Your MariaDB connection id is 211
Server version: 10.6.10-MariaDB managed by <https://aws.amazon.com/rds/>
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.
MariaDB [(none)]>
브라우저) 211.183.3.100

캬~오졋따