インストールガイド · 5 min read · Oct 20, 2025

Ubuntu 20.04にSuiteCRMをインストールする方法

SuiteCRMは、SalesAgilityによって開発された無料のオープンソースのエンタープライズクラスのCRMシステムです。これはSugarCRMコミュニティエディションのフォークです。CRMおよびERPのニーズを持つビジネスを運営するために必要なすべての機能を備えています。メールマーケティング、ソーシャルメディア統合、マーケティングオートメーション、内部チャット統合、ドキュメントストレージ、リマインダー、タスク管理など、幅広い機能を提供します。この投稿では、Ubuntu 20.04にNginxとLet’s Encrypt SSLを使用してSuiteCRMをインストールする方法を示します。

前提条件

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

始めに

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

apt-get update -y

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

Nginx、MariaDB、およびPHPのインストール

まず、Nginxウェブサーバー、MariaDB、PHP、およびその他のPHP拡張機能をサーバーにインストールする必要があります。次のコマンドを使用してすべてをインストールできます。

apt-get install nginx mariadb-server php7.4 php7.4-fpm php7.4-gd php7.4-opcache php7.4-mbstring php7.4-xml php7.4-json php7.4-zip php7.4-curl php7.4-imap php-mysql unzip -y

すべてのパッケージをインストールした後、php.iniファイルを編集し、推奨設定を変更します。

nano /etc/php/7.4/fpm/php.ini

次の設定を変更します。

post_max_size = 60M
upload_max_filesize = 60M
memory_limit = 256M
max_input_time = 60
max_execution_time = 5000
date.timezone = Asia/Kolkata

ファイルを保存して閉じたら、変更を適用するためにPHP-FPMサービスを再起動します。

systemctl restart php7.4-fpm

この時点で、LEMPサーバーがサーバーにインストールされました。次のステップに進むことができます。

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

SuiteCRMは、そのコンテンツを保存するためのデータベースを必要とします。まず、次のコマンドを使用してMariaDBシェルにログインします。

mysql

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

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

次に、変更を適用するために特権をフラッシュする必要があります。

MariaDB [(none)]> FLUSH PRIVILEGES;

次に、次のコマンドを使用してMariaDBコンソールから退出します。

MariaDB [(none)]> EXIT;

これで、SuiteCRM用のデータベースとユーザーが準備できました。次のステップに進むことができます。

SuiteCRMのインストール

まず、SuiteCRMの公式ウェブサイトにアクセスし、次のコマンドを使用してSuiteCRMの最新バージョンをダウンロードします。

wget https://sourceforge.net/projects/suitecrm/files/SuiteCRM-7.11.19.zip

ダウンロードが完了したら、次のコマンドを使用してダウンロードしたファイルを解凍します。

unzip SuiteCRM-7.11.19.zip

次に、抽出したディレクトリをNginxのルートディレクトリに移動します。

mv SuiteCRM-7.11.19 /var/www/html/suitecrm

次に、suitecrmディレクトリに適切な権限と所有権を設定します。

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

完了したら、Nginxの設定に進むことができます。

SuiteCRMをホストするためのNginxの設定

次に、SuiteCRMをインターネットでホストするためのNginx仮想ホスト設定ファイルを作成する必要があります。次のコマンドを使用して作成できます。

nano /etc/nginx/conf.d/suitecrm.conf

次の行を追加します。

server {
   listen 80;
   server_name suitecrm.example.com;

   root /var/www/html/suitecrm;
   error_log /var/log/nginx/suitecrm.error;
   access_log /var/log/nginx/suitecrm.access;
   client_max_body_size 20M;

   index index.php index.html index.htm index.nginx-debian.html;

   location / {
     # try to serve file directly, fallback to app.php
     try_files $uri /index.php$is_args$args;
   }

   location ~ \.php$ {
     include snippets/fastcgi-php.conf;
     fastcgi_pass unix:/run/php/php7.4-fpm.sock;
   }

   location ~* ^/index.php {
     # try_files $uri =404;
     fastcgi_split_path_info ^(.+\.php)(/.+)$;
     # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini

     fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
     fastcgi_index index.php;
     fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
     include fastcgi_params;

     fastcgi_buffer_size 128k;
     fastcgi_buffers 256 16k;
     fastcgi_busy_buffers_size 256k;
     fastcgi_temp_file_write_size 256k;
   }

    # faviconをログに記録しない
    location = /favicon.ico {
        log_not_found off;
        access_log off;
    }

    # robotsをログに記録しない
    location = /robots.txt  {
        access_log off;
        log_not_found off;
    }

    # .htaccess、.htpasswd、.DS_Store (Mac)などの隠しファイル/フォルダーへのアクセスをすべて拒否
    location ~ \. {
        deny all;
        access_log off;
        log_not_found off;
    }

     # 長いブラウザキャッシュの寿命は、ページへの再訪問を高速化できます
  location ~* \.(jpg|jpeg|gif|png|webp|svg|woff|woff2|ttf|css|js|ico|xml)$ {
       access_log        off;
       log_not_found     off;
       expires           360d;
  }
}

完了したらファイルを保存して閉じ、次のコマンドを使用してNginxの構文エラーを確認します。

ginx -t

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

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

次に、変更を適用するためにNginxサービスを再起動します。

systemctl restart nginx

Nginxサービスのステータスを確認するには、次のコマンドを実行します。

systemctl status nginx

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

? nginx.service - A high performance web server and a reverse proxy server
     Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2021-05-22 10:16:45 UTC; 4s ago
       Docs: man:nginx(8)
    Process: 18988 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
    Process: 19000 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
   Main PID: 19001 (nginx)
      Tasks: 2 (limit: 2353)
     Memory: 2.7M
     CGroup: /system.slice/nginx.service
             ??19001 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
             ??19002 nginx: worker process

May 22 10:16:45 ubuntu2004 systemd[1]: Starting A high performance web server and a reverse proxy server...
May 22 10:16:45 ubuntu2004 systemd[1]: Started A high performance web server and a reverse proxy server.

この時点で、NginxはSuiteCRMを提供するように設定されています。次にSuiteCRMにアクセスできます。

SuiteCRMにアクセス

今、ウェブブラウザを開いて、URL http://suitecrm.example.comを使用してSuiteCRMにアクセスします。次のページが表示されるはずです。

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

すべての前提条件がインストールされていることを確認し、次へボタンをクリックします。次のページが表示されるはずです。

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

次へボタンをクリックします。SuiteCRMのログインページが表示されるはずです。

管理者ユーザー名とパスワードを入力し、LOG INボタンをクリックします。次のページにSuiteCRMのダッシュボードが表示されるはずです。

Let’s EncryptでSuiteCRMを保護

次に、Let’s Encrypt SSLをインストールおよび管理するためにCertbotクライアントパッケージをインストールする必要があります。

まず、次のコマンドを使用してCertbotをインストールします。

apt-get install certbot python3-certbot-nginx -y

インストールが完了したら、次のコマンドを実行してウェブサイトにLet’s Encrypt SSLをインストールします。

certbot --nginx -d suitecrm.example.com

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

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator nginx, Installer nginx
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
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for suitecrm.example.com
Waiting for verification...
Cleaning up challenges
Deploying Certificate to VirtualHost /etc/nginx/conf.d/suitecrm.conf

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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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を押してインストールを完了します。次の出力が表示されるはずです。

Redirecting all traffic on port 80 to ssl in /etc/nginx/conf.d/suitecrm.conf

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

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

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/suitecrm.example.com/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/suitecrm.example.com/privkey.pem
   Your cert will expire on 2021-10-30. 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"
 - Your account credentials have been saved in your Certbot
   configuration directory at /etc/letsencrypt. You should make a
   secure backup of this folder now. This configuration directory will
   also contain certificates and private keys obtained by Certbot so
   making regular backups of this folder is ideal.
 - 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

 - We were unable to subscribe you the EFF mailing list because your
   e-mail address appears to be invalid. You can try again later by
   visiting https://act.eff.org.

これで、SuiteCRMはLet’s Encrypt SSLで保護されました。URL https://suitecrm.example.comを使用して安全にアクセスできます。

結論

これで終了です。Ubuntu 20.04にNginxとLet’s Encrypt SSLを使用してSuiteCRMを正常にインストールしました。これで、組織にSuiteCRMを実装できます。詳細については、SuiteCRMユーザーマニュアルを訪れてください。

Share: X/Twitter LinkedIn

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

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