インストールガイド · 5 min read · Oct 20, 2025
Debian 11にNginxを使ってosTicketをインストールする方法

osTicketは、顧客サービスを拡張し、効率化し、顧客体験を向上させるために使用される無料のオープンソースのサポートチケットシステムです。すべてのサポートチケットを管理、整理、追跡するためのWebベースのインターフェースを提供します。PHPで書かれており、MySQLやPostgreSQLなどのさまざまなデータベースをサポートしています。
特徴
- ダッシュボードレポート
- 設定可能なヘルプトピック
- サービスレベル契約
- チケットフィルター
- 顧客サポートポータル
- 自動応答
このチュートリアルでは、Debian 11にosTicketをインストールする方法を示します。
前提条件
- Debian 11を実行しているサーバー。
- 有効なドメイン名がサーバーIPにポイントされています。
- サーバーにルートパスワードが設定されています。
始めに
まず、次のコマンドを使用して、すべてのシステムパッケージを最新バージョンに更新およびアップグレードします。
apt update -y
apt upgrade -yすべてのパッケージが更新されたら、次のコマンドを使用して他の必要なパッケージをインストールできます。
apt install ca-certificates apt-transport-https software-properties-common wget curlすべての必要なパッケージがインストールされたら、次のステップに進むことができます。
NginxとPHPのインストール
まず、次のコマンドを使用してNginx Webサーバーパッケージをインストールします。
apt install nginx -y次に、次のコマンドを使用してPHPリポジトリを追加します。
curl -sSL https://packages.sury.org/php/README.txt | bash -x次に、次のコマンドを使用して最新バージョンのPHPと他の必要なPHP依存関係をインストールします。
apt install php8.1 php8.1-mysql php8.1-cgi php8.1-fpm php8.1-cli php8.1-curl php8.1-gd php8.1-imap php8.1-mbstring php8.1-intl php8.1-apcu php8.1-common php8.1-gettext php8.1-bcmath php8.1-xml php8.1-dom -yインストール後、PHP設定ファイルを編集します。
nano /etc/php/8.1/fpm/php.ini次の行を変更します。
cgi.fix_pathinfo=0
ファイルを保存して閉じたら、変更を適用するためにPHP-FPMサービスを再起動します。
systemctl restart php8.1-fpmMariaDBのインストールと設定
まず、次のコマンドを使用してMariaDBデータベースサーバーをインストールします。
apt install mariadb-server -y次に、次のコマンドを使用してMariaDBのインストールを保護します。
mysql_secure_installation以下の質問にすべて答えます。
Set root password? [Y/n] Y
New password:
Re-enter new password:
Remove anonymous users? [Y/n] Y
Disallow root login remotely? [Y/n] Y
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n] Y
次に、rootユーザーとしてMariaDBシェルにログインします。
mysql -u root -p次に、osTicket用のデータベースとユーザーを作成します。
MariaDB [(none)]> create database osticketdb;
MariaDB [(none)]> grant all privileges on osticketdb.* to osticketuser identified by 'secure-password';次に、特権をフラッシュし、次のコマンドでMariaDBシェルから退出します。
MariaDB [(none)]> flush privileges;
MariaDB [(none)]> exit;osTicketのインストール
まず、GitHubのダウンロードページからosTicketの最新バージョンをダウンロードします。
wget https://github.com/osTicket/osTicket/releases/download/v1.17.2/osTicket-v1.17.2.zipダウンロードが完了したら、osTicket用のディレクトリを作成し、そのディレクトリ内にダウンロードしたファイルを抽出します。
mkdir /var/www/html/osticket
unzip osTicket-v1.17.2.zip -d /var/www/html/osticket次に、osticketディレクトリの所有権と権限を設定します。
chown -R www-data:www-data /var/www/html/osticket
chmod -R 755 /var/www/html/osticket次に、osTicketのサンプル設定ファイルの名前を変更します。
mv /var/www/html/osticket/upload/include/ost-sampleconfig.php /var/www/html/osticket/upload/include/ost-config.php完了したら、次のステップに進むことができます。
osTicket用のNginxの設定
次に、osTicket用のNginx仮想ホスト設定ファイルを作成する必要があります。次のコマンドで作成できます。
nano /etc/nginx/conf.d/osticket.conf次の設定を追加します。
server {
listen 80;
server_name osticket.example.com;
root /var/www/html/osticket/upload;
index index.php index.html index.htm;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
# Enable gzip
gzip on;
gzip_min_length 1000;
gzip_types text/plain application/x-javascript text/xml text/css application/xml;
set $path_info "";
location ~ /include {
deny all;
return 403;
}
if ($request_uri ~ "^/api(/[^"]+)") {
set $path_info $1;
}
location ~ ^/api/(?:tickets|tasks).*$ {
try_files $uri $uri/ /api/http.php?$query_string;
}
if ($request_uri ~ "^/scp/.*\.php(/[^"]+)") {
set $path_info $1;
}
location ~ ^/scp/ajax.php/.*$ {
try_files $uri $uri/ /scp/ajax.php?$query_string;
}
location / {
try_files $uri $uri/ index.php;
}
location ~ \.php$ {
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.1-fpm.sock;
}
}
ファイルを保存して閉じたら、次のコマンドで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のステータスが表示されるはずです。
? 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 Wed 2022-12-21 08:15:10 UTC; 4s ago
Docs: man:nginx(8)
Process: 24700 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 24701 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Main PID: 24702 (nginx)
Tasks: 2 (limit: 2339)
Memory: 3.1M
CPU: 25ms
CGroup: /system.slice/nginx.service
??24702 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
??24703 nginx: worker process
Dec 21 08:15:10 debian11 systemd[1]: nginx.service: Succeeded.
Dec 21 08:15:10 debian11 systemd[1]: Stopped A high performance web server and a reverse proxy server.
Dec 21 08:15:10 debian11 systemd[1]: Starting A high performance web server and a reverse proxy server...
Dec 21 08:15:10 debian11 systemd[1]: nginx.service: Failed to parse PID from file /run/nginx.pid: Invalid argument
Dec 21 08:15:10 debian11 systemd[1]: Started A high performance web server and a reverse proxy server.
この時点で、NginxはosTicket用にインストールされ、設定されています。osTicketにアクセスする準備が整いました。
osTicket Webインターフェースにアクセス
Webブラウザを開き、URL http://osticket.example.com を使用してosTicketのインストールページにアクセスします。前提条件ページが表示されるはずです。

続行をクリックします。基本インストールページが表示されるはずです。


ヘルプデスクのURL、名前、メールアドレス、データベース名、ユーザー名、パスワードを定義し、今すぐインストールボタンをクリックしてインストールを開始します。osTicketがインストールされると、次のページが表示されます。

osTicketのコントロールパネルにアクセスするには、WebブラウザにURL http://osticket.example.com/scp を入力します。osTicketのログインページが表示されるはずです。

管理者のユーザー名とパスワードを入力し、ログインボタンをクリックします。次の画面にosTicketのダッシュボードが表示されるはずです。

osTicketフォーラムページには、URL https://forum.osticket.com を使用してアクセスすることもできます。

osTicketでのSSLの有効化
osTicketウェブサイトにLet’s Encrypt 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 --nginx -d osticket.example.comメールアドレスを提供し、利用規約に同意するよう求められます。
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: Y
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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: Y
Yと入力し、Enterキーを押してドメインのSSL証明書をダウンロードしてインストールします。
Account registered.
Requesting a certificate for osticket.example.com
Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/osticket.example.com/fullchain.pem
Key is saved at: /etc/letsencrypt/live/osticket.example.com/privkey.pem
This certificate expires on 2023-03-22.
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 osticket.example.com to /etc/nginx/conf.d/osticket.conf
Congratulations! You have successfully enabled HTTPS on https://osticket.example.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
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
結論
おめでとうございます!Debian 11にNginxを使用してosTicketを正常にインストールしました。これで、会社でosTicketを実装し、ヘルプデスク管理システムとして使用できます。質問があればお気軽にお尋ねください。
新しい投稿を受信箱で受け取る
スパムはありません。いつでも購読を解除できます。