โ๏ธ 0. ๊ฐ์๋จธ์ - ๋ง๋ค๊ธฐ - ๋ฆฌ์์ค๊ทธ๋ฃน ์๋ก๋ง๋ค๊ธฐ - ์ด๋ฆ : rg-test
โ๏ธ 1. ๊ฐ์๋จธ์ ์ด๋ฆ : webserver - ๊ฐ์ฉ์ฑ ์์ญ : Zone 1 - ์ด๋ฏธ์ง : [smalldisk]window server 2012
R2 Datacenter-Gen2
โ๏ธ 2. ์ฌ์ฉ์ ์ด๋ฆ : azureusr - ์ํธ ์
๋ ฅ
โ๏ธ 3. ์ธ๋ฐ์ด๋ ํฌํธ ์ ํ : RDP, HTTP - ๋ค์ : ๋์คํฌ
โ๏ธ 4. ์ ๋์คํฌ ๋ง๋ค๊ธฐ ๋ฐ ์ฐ๊ฒฐ - ์ด๋ฆ ๊ทธ๋๋ก, ์๋ณธ์ ํ ๊ทธ๋๋ก(์์(๋น ๋์คํฌ))- ํฌ๊ธฐ : ํฌ๊ธฐ๋ณ๊ฒฝ - 8GiB - ํ์ธ - ๋ค์ : ๋คํธ์ํฌ - ๋ค์ : ๊ด๋ฆฌ - ๋ค์ : ํ๊ทธ - ๋ค์ : ๊ฒํ + ๋ง๋ค๊ธฐ -๋ง๋ค๊ธฐ
โ๏ธ0. ๊ฒ์์ฐฝ - maria db- ๋ฆฌ์์ค ๊ทธ๋ฃน : rg-test
โ๏ธ 1. ์๋ฒ์ด๋ฆ : kosa14 - ์ปดํจํ
+ ์คํ ๋ฆฌ์ง -์๋ฒ๊ตฌ์ฑ -์ปดํจํฐ ๊ณ์ธต : ๊ธฐ๋ณธ , vCore: 2, ์คํ ๋ฆฌ์ง ํฌ๊ธฐ : 5GB
โ๏ธ 2. ์ฌ์ฉ์ ์ด๋ฆ : azureuser - ์ํธ ์
๋ ฅ - ๋ค์ : ํ๊ทธ - ๋ค์ : ๊ฒํ + ๋ง๋ค๊ธฐ - ๋ง๋ค๊ธฐ
์์ฑํ ์น์๋ฒ(๊ฐ์๋จธ์ ) ๊ณต์ฉ Ip๋ณต์ฌ ํ ์๊ฒฉ ๋ฐ์คํฌํฑ ์คํํ์ฌ ์ ์ํ์ฌ ์งํ
โ๏ธ 1. (attatch)
servermanager - tool - computer management - disk management - OK
โ๏ธ 2. (format , mount)
disk2 ๊ณต๊ฐ์ ๋ง์ฐ์ค์ค๋ฅธ์ชฝ๋ฒํผ - New simple volume wizard - next - next - f drive, next - next - finish
โ๏ธ 3. ํ์์ฐฝ์์ Fํด๋ ํ์ธ ๊ฐ๋ฅ
โ๏ธ 3-1. ์ด ํด๋์ mariadb key, webplatfrom, ์๋ํ๋ ์ค ํ์ผ(zipํ์ผ ํด์ ) ๋ฃ์ด๋๊ธฐ
โ๏ธ 1. servermanager - manage - add roles and features
โ๏ธ 2. next - role-based , next- ๊ทธ๋๋ก, next - IIS ์ฒดํฌ , Add Features ,next - ๊ทธ๋๋ก, next - next - next - ์ฒดํฌ์ํ๊ณ , install
โ๏ธ 3. F:์ ๋ฃ์ด๋ webplatfrominstaller msi์คํํด์ IIS ์ค์น ์งํ
โ๏ธ 4. servermanager - tools - IIS manager - ์ผ์ชฝ๋ฉ๋ด , webserver - ์ฐฝ ๋ด๋ถ : webplatform intaller ์คํ
โ๏ธ 4-1. products - php ๊ฒ์ -php7.4.13 ADD - install - i accept - finish
โ๏ธ 5. C:\inetpub\wwwroot์ F:์ ์์ถ ํ์ด๋ wordpress ๋ด๋ถํ์ผ, Baltmore key ๋ณต์ฌ-๋ถ์ฌ๋ฃ๊ธฐ.
โ๏ธ 6. wwwroot ํด๋ ์ ์ ๊ถํ ์์ . Users, IIS modift, write ๊ถํ์ฃผ๊ธฐ.
์๋ฒ ์ด๋ฆ
: kosa14.mariadb.database.azure.com
์๋ฒ ๊ด๋ฆฌ์ ๋ก๊ทธ์ธ ์ด๋ฆ
: azureuser@kosa14
home๋๋ ํ ๋ฆฌ์ baltimore ํค ์๋ ์ํฉ
โ๏ธ mobaxterm - start local terminal์์ ์๋ ๋ช ๋ น์ด ์ ๋ ฅ
๎จ 07/06/2022 ๎ฐ ๎ฉ 16:12.32 ๎ฐ ๎ช /home/mobaxterm ๎ฐ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/mobaxterm/.ssh/id_rsa):
Created directory '/home/mobaxterm/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/mobaxterm/.ssh/id_rsa.
Your public key has been saved in /home/mobaxterm/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:hNxfhwSwL+JzaIh0AitaO2YKyMxW03S/yxQb1mRDFug r2com@DESKTOP-DD3FU43
The key's randomart image is:
+---[RSA 2048]----+
| ..o=o |
| . o oo. . |
|. .o.= +o . |
| o o ...E+... |
|o +o... S=o. |
|Bo.=.o o..= |
|+=* . = .+ |
|o+ . . oo . |
|. o |
+----[SHA256]-----+
07/06/2022 ๎ฐ ๎ฉ 16:13.08 ๎ฐ ๎ช /home/mobaxterm ๎ฐ cd .ssh
โ
๎จ 07/06/2022 ๎ฐ ๎ฉ 16:14.27 ๎ฐ ๎ช /home/mobaxterm/.ssh ๎ฐ ls
id_rsa id_rsa.pub
โ
๎จ 07/06/2022 ๎ฐ ๎ฉ 16:14.27 ๎ฐ ๎ช /home/mobaxterm/.ssh ๎ฐ mv id_rsa id_rsa.pem
โ
๎จ 07/06/2022 ๎ฐ ๎ฉ 16:15.26 ๎ฐ ๎ช /home/mobaxterm/.ssh ๎ฐ ls
id_rsa.pem id_rsa.pub
โ๏ธ ์ธ๋ถ IP ํ์ธ ๋ช ๋ น์ด
๎จ 07/06/2022 ๎ฐ ๎ฉ 16:15.27 ๎ฐ ๎ช /home/mobaxterm/.ssh ๎ฐ curl ipconfig.io
123.142.252.25
โ๏ธ mysql ์ค์น์ฌ๋ถ ํ์ธ ( access denied ๋จ๋ฉด ์ค์น๋ ๊ฒ)
๎จ 07/06/2022 ๎ฐ ๎ฉ 16:21.43 ๎ฐ ๎ช /home/mobaxterm/.ssh ๎ฐ mysql
ERROR 1045 (28000): Access denied for user 'r2com'@'localhost' (using password: NO)
โ๏ธ ์์ฑํ db์๋ฒ ๋ฆฌ์์ค ๋ณด๊ธฐ - SSL ์ ์ฉ์ํ '์ฌ์ฉ๋จ'ํด๋ฆญ - ํ์ฌํด๋ผ์ด์ธํธ IP ์ฃผ์ ์ถ๊ฐ ํด๋ฆญ - webserver ip๋ฅผ ์์, ์ข
๋ฃIP์ ๋ฃ์ด์ฃผ๊ณ ์ ์ฅ
โ๏ธ mobaxterm์์ ์๋์ ๊ฐ์ด ์งํ
07/06/2022 ๎ฐ ๎ฉ 16:34.27 ๎ฐ ๎ช /home/mobaxterm ๎ฐ mysql -h kosa14.mariadb.database.azure.com -u azureuser@kosa14 -p --ssl-ca=BaltimoreCyberTrustRoot.crt.pem
Enter password: *********
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MySQL connection id is 64346
Server version: 5.6.47.0 MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MySQL [(none)]> CREATE USER 'wpuser'@'%' IDENTIFIED BY 'wppass';
Query OK, 0 rows affected (0.024 sec)
MySQL [(none)]> CREATE DATABASE IF NOT EXISTS wordpress;
Query OK, 1 row affected (0.056 sec)
MySQL [(none)]> GRANT ALL PRIVILEGES ON wordpress.* TO 'wpuser'@'%';
Query OK, 0 rows affected (0.029 sec)
MySQL [(none)]> quit
Bye
โ๏ธ ๋ค์ ์น์๋ฒ ์๊ฒฉ์ ์ํ์ฌ wp-config-sample.phpํ์ผ ๋ณต๋ถํด์ copyํ์ผ ์์ฑ - copy ํ์ผ์ wp-config.php๋ก ์ด๋ฆ๋ณ๊ฒฝ ํ ๋ฉ๋ชจ์ฅ์ผ๋ก ์ด์ด์ ํด๋น ๋ถ๋ถ ์๋์ ๊ฐ์ด ๋ฐ๊ฟ์ฃผ๊ธฐ ๋ฐ ์ถ๊ฐ.
* @package WordPress
*/
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'wordpress');
/** MySQL database username */
define('DB_USER', 'wpuser@kosa14');
/** MySQL database password */
define('DB_PASSWORD', 'wppass');
/** MySQL hostname */
define('DB_HOST', 'kosa14.mariadb.database.azure.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', '');
//** Connect with SSL** //
define('MYSQL_CLIENT_FLAGS', MYSQLI_CLIENT_SSL);
//** SSL CERT **//
define('MYSQL_SSL_CERT','BaltimoreCyberTrustRoot.crt.pem');
โ๏ธIIS manager ์ ์, ์ผ์ชฝ ์๋ฒ์ด๋ฆ ํด๋ฆญ - sites - default web site - ์ค๋ฅธ์ชฝ restart ํด๋ฆญ
(Linux Apache MariaDB php)
(Window IIS MariaDB php)