> ## Content Index
> Fetch the complete content index at: https://www.albert-yu.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# 2020ironman 12th – Modern Web – Day04 – Amazon Lightsail LAMP 建置方案
- URL: https://www.albert-yu.com/blog/2020ironman-12th-modern-web-day04-amazon-lightsail-lamp-setup/
- Published: 2020-09-17T16:00:43.000Z
- Updated: 2026-10-30T03:43:21.000Z
- Author: Albert Yu
- Tags: 2020ironman 12th – Modern Web - PHP on AWS 進化論 - 從單主機一路進化到Serverless，以WordPress與 laravel 為例 (中斷), Ithome鐵人賽

### OS選擇

基本上如果是php + mysql 基本上OS都是以免費的centos與ubuntu為主

當然其他OS也沒不好只是現有資源都是以這兩個OS為大宗

如果是新專案能選新OS就選新OS避免太快就被淘汰

Linux通常我們做完幾年內除了安全性更新都不大會去大量修改架構

### LAMP還是LNMP的選擇

基本上 php跟mysql版本的選擇上都不太會有爭議

都是選擇較新的穩定版本比如現在最新的php是7.4

開發商的選擇我看大部分都是7.2

但是對於apache跟nginx就有很大的爭議了

不過基本上如果是新手我建議是apache配和php是比較簡單的作法

nginx雖說也不難但是相對應的文件上少了許多

常用的 .htaccess 支援程度也是較低的

### 建置文件

新手一定要看鳥哥這已經是必修課了

但是如果有時間壓力可以參考 linode 或 digitalocean 相應的內容都比一堆blog寫的完整

[linode](https://www.linode.com/docs/web-servers/lamp/how-to-install-a-lamp-stack-on-ubuntu-18-04/?ref=albert-yu.com)、[digitalocean](https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-ubuntu-18-04?ref=albert-yu.com)

當然如果是用Lightsail還可以直接選用現成的執行環境

![](https://www.albert-yu.com/content/images/2026/10/2020ironman-12th-modern-web-day04-amazon-lightsail-lamp-jian-zhi-fang-an-01.png)

或許有人眼尖看到cPanel 想說很方便！

但是要注意的是AWS是提供您完整的包含WHM環境

語系都是純英文而且是原始設定

不像台灣的廠商是設定完WHM且做完資源限制後才給cPanel環境