LightsailにWordPressをインストールするだけなら、最初からWordPressのインスタンスでセットアップするのが簡単なので、これはちょっと特殊な場合です。
なかなか情報が見つからず、苦戦した自分のためのメモです。
前提として、LightsailでLAMPのインスタンスのセットアップが完了していて、SSHでインスタンスにアクセスしているところから始めます。
bitnami から WordPressのダウンロード
wgetでインストーラーのダウンロード
ダウンロード元のファイルのURLはこちらから最新のものを選択
https://bitnami.com/stack/lamp/modules
ダウンロードファイルのURLは、ダウンロードボタンからリンクをコピーすると良い
wget https://bitnami.com/redirect/to/548719/bitnami-wordpress-5.2.1-0-module-linux-x64-installer.run
ダウンロードしたファイルのアクセス権を変更
sudo chmod +x ./bitnami-wordpress-5.2.1-0-module-linux-x64-installer.run
インストーラーの実行
sudo ./bitnami-wordpress-5.2.1-0-module-linux-x64-installer.run
あとは尋ねられるがままに、設定していきます。
Language Selection
Please select the installation language
[1] English - English
[2] Spanish - Español
[3] Brazilian Portuguese - Português Brasileiro
[4] Simplified Chinese - 简体中文
[5] Korean - 한국어
[6] Hebrew - עברית
[7] German - Deutsch
[8] Romanian - Română
[9] Russian - Русский
Please choose an option [1] :
----------------------------------------------------------------------------
Welcome to the Bitnami WordPress Module Setup Wizard.
----------------------------------------------------------------------------
Installation folder
Please choose a folder that contains an installation of Bitnami.
Select a folder []: /opt/bitnami/
Note: You should select the previous installation of Bitnami. For example:
/opt/bitnami
----------------------------------------------------------------------------
Create Admin account
Login [user]:
Your real name [User Name]:
Email Address [user@example.com]:
Please enter the MySQL password for "root" for the existing Bitnami installation
Password [********] :
----------------------------------------------------------------------------
WordPress
Please configure WordPress installation
Blog name [user's Blog!]: user
Do you want to configure mail support? [y/N]:
----------------------------------------------------------------------------
Installation type
Please select the use of this Stack
[1] Development Settings: Enables changes to file permissions and configuration settings that make it easy to install plugins, themes and updates for certain applications, but that are not optimal from a security standpoint. Recommended if you are using this stack for development purposes or within your company.
[2] Production settings: File permissions and configuration settings will be set with security and performance in mind. Installing certain plugins, themes and updates may require manual changes or installing additional services like FTP. Recommended if this stack will be deployed on a public server.
Please choose an option [2] :
----------------------------------------------------------------------------
Setup is now ready to begin installing Bitnami WordPress Module on your
computer.
Do you want to continue? [Y/n]:
----------------------------------------------------------------------------
Please wait while Setup installs Bitnami WordPress Module on your computer.
Installing
0% ______________ 50% ______________ 100%
#########################################
----------------------------------------------------------------------------
Setup has finished installing Bitnami WordPress Module on your computer.
Launch Bitnami WordPress Module [Y/n]: Y
(補足)
パスワードはアプリケーションパスワード
cat bitnami_application_password
インストール後、URLはipアドレス/wordpress
でアクセス可能
Bitnamiのロゴを非表示にする
sudo /opt/bitnami/apps/wordpress/bnconfig --disable_banner 1
その後、再起動
sudo /opt/bitnami/ctlscript.sh restart
参考:
https://community.bitnami.com/t/install-of-a-module-on-top-of-lamp/45588