Get MySQL Default Password in Bitnami

cat ~/bitnami_credentials

Result

Welcome to the Bitnami LAMP Stack
******************************************************************************
The default password is 'XXXXXXXXXXXX'.
******************************************************************************
You can also use this password to access the databases and any other component the stack includes.
Please refer to https://docs.bitnami.com/ for more details.

Setup WordPress in Bitnami

建立目錄

mkdir ~/htdocs/blog
cd ~/htdocs/blog

下載 WordPress 並解壓縮

wget http://wordpress.org/latest.tar.gz
tar -xzvf latest.tar.gz
cd wordpress

目錄權限調整

sudo chown -R bitnami:daemon .
sudo find . -type d -exec chmod 775 {} \;
sudo find . -type f -exec chmod 664 {} \;
sudo chmod 640 ./wp-config.php

WordPress 初始設定

cp wp-config-sample.php wp-config.php
vim wp-config.php

修改 wp-config

define( 'DB_NAME', '資料庫名' );
define( 'DB_USER', '使用者名稱' );
define( 'DB_PASSWORD', '使用者密碼' );
// WordPress 預設更新方式為 FTP, 這裡改為直接更新
define('FS_METHOD','direct');

WordPress 初始化

<YOUR WORDPRESS URL>/wp-admin/setup-config.php