Joomlaインストール · 4 min read · Nov 02, 2025

Debian 10にApacheとLet's Encrypt SSLでJoomlaをインストールする方法

Joomlaは、ウェブサイトのコンテンツを作成、変更、管理するために使用される無料でオープンソースのコンテンツ管理システムです。使いやすく、HTMLやCSSの知識がなくてもウェブサイトを構築できます。PHPで書かれており、データベースとしてMySQLを使用しています。ボックスから出してすぐに柔軟なコンテンツ管理システムとなる幅広い機能を提供しています。機能をカスタマイズおよび拡張するための数百の無料拡張機能が付属しています。

このチュートリアルでは、Debian 10にApacheとLet’s Encryptを使用してJoomla CMSをインストールする方法を示します。

前提条件

  • Debian 10を実行しているサーバー。
  • サーバーIPにポイントされた有効なドメイン名。
  • サーバーに設定されたルートパスワード。

始めに

まず、次のコマンドを実行してシステムパッケージを最新バージョンに更新します:

apt-get update -y

すべてのパッケージが更新されたら、次のステップに進むことができます。

LAMPサーバーのインストール

次に、Apacheウェブサーバー、MariaDBデータベース、PHP、およびその他のPHP拡張機能をシステムにインストールする必要があります。次のコマンドでそれらすべてをインストールできます:

apt-get install apache2 mariadb-server php openssl php-imagick php-common php-curl php-gd php-imap php-intl php-json php-ldap php-mbstring php-mysql php-pgsql php-smbclient php-ssh2 php-sqlite3 php-xml php-zip -y

すべてのパッケージがインストールされたら、次のステップに進むことができます。

Joomla用のデータベースを作成

Joomlaは、コンテンツを保存するためにMySQLまたはMariaDBを使用します。したがって、Joomla用のデータベースとユーザーを作成する必要があります。

まず、次のコマンドでMariaDBに接続します:

mysql

接続したら、次のコマンドでデータベースとユーザーを作成します:

MariaDB [(none)]> CREATE DATABASE joomladb;  
MariaDB [(none)]> GRANT ALL ON joomladb.* TO 'joomlauser'@'localhost' IDENTIFIED BY 'password';

次に、特権をフラッシュし、次のコマンドでMariaDBから退出します:

MariaDB [(none)]> FLUSH PRIVILEGES;  
MariaDB [(none)]> EXIT;

終了したら、次のステップに進むことができます。

Joomlaのインストール

次に、次のコマンドでJoomlaの最新バージョンをダウンロードします:

wget https://downloads.joomla.org/cms/joomla3/3-9-25/Joomla_3-9-25-Stable-Full_Package.tar.bz2

ダウンロードが完了したら、Apacheのウェブルート内にJoomla用のディレクトリを作成します:

mkdir /var/www/html/joomla

次に、次のコマンドを実行してダウンロードしたファイルをJoomlaディレクトリに抽出します:

bunzip2 Joomla_3-9-25-Stable-Full_Package.tar.bz2  
tar -xvf Joomla_3-9-25-Stable-Full_Package.tar -C /var/www/html/joomla/

次に、次のコマンドでJoomlaディレクトリに適切な権限と所有権を設定します:

chown -R www-data:www-data /var/www/html/joomla  
chmod -R 755 /var/www/html/joomla

終了したら、次のステップに進むことができます。

Apacheウェブサーバーの設定

次に、JoomlaをホストするためのApache仮想ホスト設定ファイルを作成する必要があります。

次のコマンドで作成できます:

nano /etc/apache2/sites-available/joomla.conf

次の行を追加します:


   ServerName joomla.example.com 
   ServerAdmin [email protected]
   DocumentRoot /var/www/html/joomla
   
        Allowoverride all
   

ファイルを保存して閉じたら、次のコマンドでApacheの仮想ホストを有効にします:

a2ensite joomla

次に、次のコマンドでApacheサービスを再起動して変更を適用します:

systemctl restart apache2

次に、次のコマンドでApacheのステータスを確認します:

systemctl status apache2

次の出力が得られるはずです:

? apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2021-03-22 09:26:20 UTC; 4s ago
     Docs: https://httpd.apache.org/docs/2.4/
  Process: 14495 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
 Main PID: 14499 (apache2)
    Tasks: 6 (limit: 4701)
   Memory: 18.8M
   CGroup: /system.slice/apache2.service
           ??14499 /usr/sbin/apache2 -k start
           ??14500 /usr/sbin/apache2 -k start
           ??14501 /usr/sbin/apache2 -k start
           ??14502 /usr/sbin/apache2 -k start
           ??14503 /usr/sbin/apache2 -k start
           ??14504 /usr/sbin/apache2 -k start

Mar 22 09:26:20 debian10 systemd[1]: Starting The Apache HTTP Server...

Joomlaにアクセス

今、ウェブブラウザを開いて、URL http://joomla.example.comを使用してJoomlaのウェブインターフェースにアクセスします。次のページにリダイレクトされます:

Joomlaインストーラー

サイト名、メールアドレス、管理者ユーザー名、パスワードを入力し、次へボタンをクリックします。次のページが表示されるはずです:

データベース構成

データベース名、データベースユーザー名、パスワードを入力し、次へボタンをクリックします。次のページが表示されるはずです:

インストールの最終確認

インストール前のチェック

すべての設定を確認し、インストールボタンをクリックしてインストールを開始します。インストールが完了すると、次のページが表示されるはずです:

Joomlaが正常にインストールされました

インストールフォルダーを削除をクリックします。次のページが表示されるはずです:

インストールフォルダーを削除

次に、管理者ボタンをクリックすると、Joomlaのログインページが表示されます:

Joomlaログイン

管理者の資格情報を入力し、ログインボタンをクリックすると、次の画像のJoomlaコントロールパネルが表示されます:

Joomla管理ダッシュボード

Let’s Encrypt SSLでJoomlaを保護

ウェブサイトをLet’s Encrypt SSLで保護することは常に良いアイデアです。SSLをインストールおよび管理するためにCertbotクライアントをインストールする必要があります。次のコマンドでインストールできます:

apt-get install python3-certbot-apache -y

Certbotがインストールされたら、次のコマンドを実行してウェブサイトをLet’s Encrypt SSLで保護します:

certbot --apache -d joomla.example.com

メールアドレスを提供し、以下のようにサービス利用規約に同意するよう求められます:

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator standalone, Installer None
Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel): [email protected]

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server at
https://acme-v02.api.letsencrypt.org/directory
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(A)gree/(C)ancel: A

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about our work
encrypting the web, EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y
Plugins selected: Authenticator apache, Installer apache
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for joomla.example.com
Enabled Apache rewrite module
Waiting for verification...
Cleaning up challenges
Created an SSL vhost at /etc/apache2/sites-available/joomla-le-ssl.conf
Enabled Apache socache_shmcb module
Enabled Apache ssl module
Deploying Certificate to VirtualHost /etc/apache2/sites-available/joomla-le-ssl.conf
Enabling available site: /etc/apache2/sites-available/joomla-le-ssl.conf

次に、HTTPトラフィックをHTTPSにリダイレクトするかどうかを選択します:

Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2

2を入力してEnterを押すと、ウェブサイトのLet’s Encrypt SSLがインストールされます:

Enabled Apache rewrite module
Redirecting vhost in /etc/apache2/sites-enabled/joomla.conf to ssl vhost in /etc/apache2/sites-available/joomla-le-ssl.conf

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://joomla.example.com

You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=joomla.example.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/joomla.example.com/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/joomla.example.com/privkey.pem
   Your cert will expire on 2020-10-23. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot again
   with the "certonly" option. To non-interactively renew *all*
   of your certificates, run "certbot renew"
 - If you like Certbot, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le

結論

おめでとうございます!Debian 10サーバーにJoomla CMSを正常にインストールしました。これで、Joomlaを使用して簡単に自分のウェブサイトを構築できます。質問があればお気軽にお尋ねください。

Share: X/Twitter LinkedIn

新しい投稿を受信箱で受け取る

スパムはありません。いつでも購読を解除できます。