Skip to content

Linux

Ubuntu 24.04LTS へ Nginx (OS 標準リポジトリ) + PHP-FPM をインストールする

以前に下記のメモを書きました。

今回は Ubuntu 24.04LTS へ (Nginx 公式リポジトリでは無く) OS 標準リポジトリから Nginx をインストールし、併せて PHP-FPM をインストールする手順をメモしておきます。

apt update 時、Nginx 公式リポジトリの警告を解消する

気がついたら先日から Nginx インストール済みの Ubuntu22 環境で apt update すると以下の警告が表示されるようになっていました。 原因は「GPG 鍵の有効期限が切れている為」でした。 この警告を解消する手順をメモしておきます。

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://nginx.org/packages/ubuntu jammy InRelease: The following signatures were invalid: EXPKEYSIG ABF5BD827BD9BF62 nginx signing key <signing-key@nginx.com>
W: Failed to fetch http://nginx.org/packages/ubuntu/dists/jammy/InRelease  The following signatures were invalid: EXPKEYSIG ABF5BD827BD9BF62 nginx signing key <signing-key@nginx.com>
W: Some index files failed to download. They have been ignored, or old ones used instead.

Ubuntu 24.04LTS へ Nginx をインストールする

以前に以下のメモを書きました。

Ubuntu 24.04LTS でもインストールコマンドは全く同じなのですが、改めてメモしておきます。 正式な手順は Installation instructions に掲載されています。 コマンド自体は全く同じですが、公式ページでは手順が複数ステップに分割して記載されている為、このメモでは「そのまま流し込めるように」コマンドを連結しています。