CMSインストール · 5 min read · Dec 21, 2025
Ubuntu 20.04にApacheと無料のLet's Encrypt SSLを使用してConcrete5 CMSをインストールする方法

Concrete5は、インターネット上でコンテンツを公開するために使用されるオープンソースのコンテンツ管理システムです。PHPで書かれており、データベースバックエンドとしてMariaDBを使用しています。ウェブブラウザを通じてページやコンテンツを作成するのに役立つ使いやすいビルダーを提供します。柔軟で、安全で、モバイル対応で、モデル・ビュー・コントローラーアーキテクチャに基づいています。WYSIWYGコンテンツエディタ、メディアマネージャ、ドラッグアンドドロップコンテンツ、インコンテキスト編集など、豊富な機能セットを提供しています。
この記事では、Ubuntu 20.04サーバーにApacheとLet’s Encrypt SSLを使用してConcrete5 CMSをインストールする方法を示します。
要件
- Ubuntu 20.04を実行しているサーバー。
- サーバーIPにポイントされた有効なドメイン名。
- サーバーに設定されたルートパスワード。
始めに
まず、APTパッケージインデックスを最新バージョンに更新する必要があります。次のコマンドで更新できます:
apt-get update -yAPTインデックスが更新されたら、次のステップに進むことができます。
Apache、MariaDB、PHPのインストール
次に、Apacheウェブサーバー、MariaDBデータベースサーバー、PHP、および他のPHP拡張機能をサーバーにインストールする必要があります。次のコマンドを使用してすべてをインストールできます:
apt-get install apache2 mariadb-server php libapache2-mod-php libapache2-mod-php php-common php-mbstring php-xmlrpc php-soap php-gd php-xml php-intl php-mysql php-cli php-ldap php-zip php-curl -yすべてのパッケージがインストールされたら、php.iniファイルを編集して希望の値を設定します:
nano /etc/php/7.4/apache2/php.ini次の行を変更します:
file_uploads = On
allow_url_fopen = On
memory_limit = 256M
upload_max_filesize = 64M
date.timezone = Asia/Kolkata完了したらファイルを保存して閉じ、変更を適用するためにApacheサービスを再起動します:
systemctl restart apache2完了したら、次のステップに進むことができます。
Concrete5データベースの作成
次に、Concrete5用のデータベースとユーザーを作成する必要があります。まず、次のコマンドでMariaDBにログインします:
mysqlログインしたら、次のコマンドでデータベースとユーザーを作成します:
MariaDB [(none)]> CREATE DATABASE concrete5;
MariaDB [(none)]> CREATE USER 'concrete5user'@'localhost' IDENTIFIED BY 'password';次に、次のコマンドでConcrete5データベースにすべての特権を付与します:
MariaDB [(none)]> GRANT ALL ON concrete5.* TO 'concrete5user'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;次に、特権をフラッシュし、次のコマンドでMariaDBコンソールから退出します:
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;完了したら、次のステップに進むことができます。
Concrete5 CMSのダウンロード
まず、Concrete5 CMSのウェブサイトに移動し、最新バージョンのConcrete5のURLをコピーして、次のコマンドでダウンロードします:
wget --trust-server-names https://www.concrete5.org/download_file/-/view/115589/ -O concrete5.zipダウンロードが完了したら、次のコマンドでダウンロードしたファイルを抽出します:
unzip concrete5.zip次に、次のコマンドを使用して抽出したディレクトリをApacheのウェブルートディレクトリに移動します:
mv concrete5-* /var/www/html/concrete5次に、次のコマンドでconcrete5ディレクトリに適切な権限と所有権を設定します:
chown -R www-data:www-data /var/www/html/concrete5/
chmod -R 755 /var/www/html/concrete5/完了したら、次のステップに進むことができます。
Concrete5 CMS用のApacheの設定
次に、Concrete5 CMS用のApache仮想ホスト設定ファイルを作成する必要があります。次のコマンドで作成できます:
nano /etc/apache2/sites-available/concrete5.conf次の行を追加します:
ServerAdmin [email protected]
DocumentRoot /var/www/html/concrete5/
ServerName concrete5.example.com
Options +FollowSymlinks
AllowOverride All
Require all granted
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
ファイルを保存して閉じたら、次のコマンドでApache仮想ホストとリライトモジュールを有効にします:
a2ensite concrete5.conf
a2enmod rewrite次に、変更を適用するために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 Sat 2021-05-15 15:00:03 UTC; 4s ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 15566 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
Main PID: 15585 (apache2)
Tasks: 6 (limit: 2353)
Memory: 13.5M
CGroup: /system.slice/apache2.service
??15585 /usr/sbin/apache2 -k start
??15586 /usr/sbin/apache2 -k start
??15587 /usr/sbin/apache2 -k start
??15588 /usr/sbin/apache2 -k start
??15589 /usr/sbin/apache2 -k start
??15590 /usr/sbin/apache2 -k start
May 15 15:00:03 ubuntu2004 systemd[1]: Starting The Apache HTTP Server...この時点で、ApacheウェブサーバーはConcrete5 CMSをホストするように設定されています。次のステップに進むことができます。
Concrete5 CMSウェブインターフェースにアクセス
今、ウェブブラウザを開き、URL http://concrete5.example.comを使用してConcrete5 CMSウェブインターフェースにアクセスします。次のページにリダイレクトされます:

言語を選択し、矢印ボタンをクリックします。次のページが表示されるはずです:

必要なすべてのライブラリがインストールされていることを確認し、インストールを続行ボタンをクリックします。次のページが表示されるはずです:

ここで、管理者のユーザー名、パスワード、データベースのユーザー名、パスワード、データベース名を入力し、Concrete5をインストールボタンをクリックしてインストールを開始します。インストールが完了すると、次のページが表示されるはずです:


今、サイトを編集ボタンをクリックすると、次のページにConcrete5ダッシュボードが表示されるはずです:

Let’s Encrypt SSLでConcrete5を保護
次に、Let’s Encrypt SSLでウェブサイトを保護することをお勧めします。まず、次のコマンドを使用してCertbotクライアントをインストールします:
apt-get install python3-certbot-apache -yインストールが完了したら、次のコマンドを実行してLet’s Encrypt SSLでウェブサイトを保護します:
certbot --apache -d concrete5.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 concrete5.example.com
Enabled Apache rewrite module
Waiting for verification...
Cleaning up challenges
Created an SSL vhost at /etc/apache2/sites-available/concrete5-le-ssl.conf
Enabled Apache socache_shmcb module
Enabled Apache ssl module
Deploying Certificate to VirtualHost /etc/apache2/sites-available/concrete5-le-ssl.conf
Enabling available site: /etc/apache2/sites-available/concrete5-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): 22を入力してEnterを押すと、ウェブサイトのLet’s Encrypt SSLがインストールされます:
Enabled Apache rewrite module
Redirecting vhost in /etc/apache2/sites-enabled/concrete5.conf to ssl vhost in /etc/apache2/sites-available/concrete5-le-ssl.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://concrete5.example.com
You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=concrete5.example.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/concrete5.example.com/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/concrete5.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今、URL https://concrete5.example.comを使用してConcrete 5に安全にアクセスできます。
結論
上記のガイドでは、Ubuntu 20.04にApacheとLet’s Encrypt SSLを使用してConcrete5 CMSをインストールする方法を学びました。これで、Concrete5 CMSを使用してインターネット上でコンテンツを簡単に公開できます。質問があればお気軽にお尋ねください。
新しい投稿を受信箱で受け取る
スパムはありません。いつでも購読を解除できます。