インストールガイド · 4 min read · Sep 08, 2025

Ubuntu 22.04にCerbコラボレーションおよびメール自動化をインストールする方法

Cerbは、ビジネスコラボレーションと自動化のための無料でオープンソースの迅速かつ柔軟なプラットフォームです。これは、大量のメールを送信するために使用されるウェブベースのツールです。リアルタイムの監視と目標追跡のためのウェブベースのダッシュボードを提供します。通知、共有メールボックス、メール管理、モバイル機能など、多くの機能があります。

このチュートリアルでは、Ubuntu 22.04にCerb自動化ツールをインストールする方法を示します。

前提条件

  • Ubuntu 22.04を実行しているサーバー。
  • 有効なドメイン名がサーバーのIPに向けられていること。
  • サーバーにルートパスワードが設定されていること。

始めに

まず、すべてのシステムパッケージを最新バージョンに更新する必要があります。次のコマンドを実行してシステムを更新できます。

apt update -y  
apt upgrade -y

システムが更新されたら、次のステップに進むことができます。

Apache、MySQL、およびPHPのインストール

次に、Apacheウェブサーバー、MySQLデータベースサーバー、PHP、およびシステムに必要な他のモジュールをインストールする必要があります。次のコマンドを使用してすべてをインストールできます。

apt install apache2 mysql-server php libapache2-mod-php php-mysql php-mbstring php-gd php-imap php-curl php-mailparse php-yaml php-gmp php-dev php-pear git wget unzip -y

次に、サーバーにMailparse PHP拡張をインストールする必要があります。

まず、次のコマンドでMailparseの最新バージョンをダウンロードします。

wget https://pecl.php.net/get/mailparse-3.1.4.tgz

次に、次のコマンドでダウンロードしたファイルを抽出します。

tar -xvzf mailparse-3.1.4.tgz

次に、抽出したディレクトリに移動し、次のコマンドで設定します。

cd mailparse-3.1.4  
phpize  
./configure  
sed -i 's/^\(#error .* the mbstring extension!\)/\/\/\1/' mailparse.c

次に、次のコマンドを使用してMailparse拡張をインストールします。

make   
make install

次に、php.iniファイルを開き、デフォルト設定を変更します:

nano /etc/php/8.1/apache2/php.ini

次の行を変更します:

memory_limit = 256M
upload_max_filesize = 100M
max_execution_time = 360
date.timezone = UTC
extension=mailparse.so

完了したらファイルを保存して閉じ、変更を適用するためにApacheサービスを再起動します:

systemctl restart apache2

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

次に、Cerb用のデータベースとユーザーを作成する必要があります。まず、次のコマンドでMySQLシェルにログインします:

mysql

ログインしたら、次のコマンドを実行してデータベースとユーザーを作成します:

mysql> CREATE DATABASE cerbdb CHARACTER SET utf8;  
mysql> CREATE USER cerbuser@localhost IDENTIFIED BY 'password';

次に、次のコマンドでCerbにすべての権限を付与します:

mysql> GRANT ALL PRIVILEGES ON cerbdb.* TO cerbuser@localhost;

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

mysql> FLUSH PRIVILEGES;  
mysql> EXIT;

この時点で、Cerb用のデータベースとユーザーが作成されました。次のステップに進むことができます。

Cerbのインストール

まず、次のコマンドを使用して、GitリポジトリからApacheウェブルートディレクトリにCerbの最新バージョンをダウンロードします:

cd /var/www/html  
git clone https://github.com/cerb/cerb-release.git cerb

ダウンロードが完了したら、cerbディレクトリに移動し、.htaccess-distファイルの名前を変更します:

cd cerb  
mv .htaccess-dist .htaccess

次に、cerbディレクトリの所有権と権限を変更します:

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

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

Cerb用のApache仮想ホストを作成

次に、Cerbを提供するためのApache仮想ホスト設定ファイルを作成する必要があります。次のコマンドで作成できます:

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

次の行を追加します:


     ServerAdmin [email protected]
     DocumentRoot /var/www/html/cerb
     ServerName cerb.linuxbuz.com

     
          Options FollowSymlinks
          AllowOverride All
          Require all granted
     

     ErrorLog ${APACHE_LOG_DIR}/error.log
     CustomLog ${APACHE_LOG_DIR}/access.log combined

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

a2ensite cerb.conf

次に、次のコマンドで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 Tue 2023-01-10 04:57:10 UTC; 5s ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 59977 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
   Main PID: 59981 (apache2)
      Tasks: 6 (limit: 2237)
     Memory: 13.2M
        CPU: 57ms
     CGroup: /system.slice/apache2.service
             ??59981 /usr/sbin/apache2 -k start
             ??59983 /usr/sbin/apache2 -k start
             ??59984 /usr/sbin/apache2 -k start
             ??59985 /usr/sbin/apache2 -k start
             ??59986 /usr/sbin/apache2 -k start
             ??59987 /usr/sbin/apache2 -k start

Jan 10 04:57:10 vultr systemd[1]: Starting The Apache HTTP Server...
Jan 10 04:57:10 vultr systemd[1]: Started The Apache HTTP Server.

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

CerbにLet’s Encrypt SSLをインストール

次に、CerbのウェブインターフェースをLet’s Encrypt SSLで保護することを強くお勧めします。まず、SSLをインストールおよび管理するために、システムにCertbotクライアントをインストールする必要があります。

まず、次のコマンドでSnapパッケージマネージャーをインストールします:

apt install snapd

次に、Snapパッケージを最新バージョンに更新します:

snap install core  
snap refresh core

次に、次のコマンドを使用してcertbotパッケージをインストールします:

snap install --classic certbot

次に、Certbotバイナリのシンボリックリンクをシステムの場所に作成します:

ln -s /snap/bin/certbot /usr/bin/certbot

次に、次のコマンドを実行してLet’s Encrypt SSL証明書をダウンロードしてインストールします:

certbot --apache

ドメインを選択し、Let’s Encrypt SSLをインストールするために有効なメールアドレスを提供するように求められます。

Saving debug log to /var/log/letsencrypt/letsencrypt.log
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.3-September-21-2022.pdf. You must
agree in order to register with the ACME server. Do you agree?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Yes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing, once your first certificate is successfully issued, 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: Yes
Account registered.

Which names would you like to activate HTTPS for?
We recommend selecting either all domains, or all domains in a VirtualHost/server block.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: cerb.linuxbuz.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): 1
Requesting a certificate for cerb.linuxbuz.com

Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/cerb.linuxbuz.com/fullchain.pem
Key is saved at:         /etc/letsencrypt/live/cerb.linuxbuz.com/privkey.pem
This certificate expires on 2023-04-10.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.

Deploying certificate
Successfully deployed certificate for cerb.linuxbuz.com to /etc/apache2/sites-available/cerb-le-ssl.conf
Congratulations! You have successfully enabled HTTPS on https://cerb.linuxbuz.com

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

この時点で、あなたのウェブサイトはLet’s Encrypt SSLで保護されています。

Cerbウェブインターフェースにアクセス

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

すべてのPHP拡張を確認し、続行ボタンをクリックします。次のページが表示されるはずです:

受け入れるボタンをクリックしてライセンス契約に同意します。次のページが表示されるはずです:

データベースの詳細を提供し、データベース接続を確認をクリックします。次のページが表示されるはずです:

メール設定を選択し、メール設定を確認ボタンをクリックします。次のページが表示されるはずです:

今、あなたの名前、メール、パスワードを提供し、続行ボタンをクリックします。次のページが表示されるはずです:

続行ボタンをクリックします。次のページが表示されるはずです:

デモを選択し、続行ボタンをクリックしてインストールを開始します。インストールが完了すると、次のページが表示されるはずです:

ログインして開始ボタンをクリックします。次のようにcerbのログインページが表示されるはずです:

メール、パスワードを提供し、続行ボタンをクリックします。次のページにCerbダッシュボードが表示されるはずです:

結論

このチュートリアルでは、Ubuntu 22.04にLet’s Encrypt SSLを使用してCerbをインストールする方法を学びました。これで、Cerbの機能を探索し、チームとコラボレーションを開始できます。質問があればお気軽にお尋ねください。

Share: X/Twitter LinkedIn

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

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