インストールガイド · 4 min read · Nov 17, 2025

Ubuntu 22.04にosTicketをインストールする方法

osTicketはオープンソースで、中小企業によって最も広く使用されているチケットシステムの1つです。これは、すべてのチケットを管理および追跡するのに役立つシンプルで使いやすいウェブベースのカスタマーサポートポータルです。osTicketでは、チケットを正しい担当者に送信するためのチケットルーティングルールを定義できます。チケットにロゴ、画像、動画をカスタマイズして追加することができます。osTicketは、MySQLやPostgreSQLなどの多くのデータベースタイプをサポートし、中央認証のためにLDAP/Active Directoryと統合できます。

この記事では、Ubuntu 22.04でApacheを使用してosTicketをインストールする方法を説明します。

前提条件

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

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

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

apt install apache2 mariadb-server php libapache2-mod-php php-mysql php-cgi php-fpm php-cli php-curl php-gd php-imap php-mbstring php-pear php-intl php-apcu php-common php-bcmath -y

すべてのパッケージがインストールされたら、次のコマンドを使用してApacheおよびMariaDBサービスを開始し、有効にします。

systemctl start apache2  
systemctl enable apache2  
systemctl start mariadb  
systemctl enable mariadb

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

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

mysql_secure_installation

MariaDBのrootパスワードを設定し、インストールを保護するためのすべての質問に回答します:

Enter current password for root (enter for none):
OK, successfully used password, moving on...

Set root password? [Y/n] Y
New password:
Re-enter new password:
Password updated successfully!

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

次に、次のコマンドを使用してMariaDBシェルにログインします。

mysql -u root -p

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

MariaDB [(none)]> CREATE DATABASE osticket;  
MariaDB [(none)]> CREATE USER 'osticket'@'localhost' IDENTIFIED BY 'securepassword';

次に、次のコマンドを使用してosTicketデータベースにすべての権限を付与します。

MariaDB [(none)]> GRANT ALL PRIVILEGES ON osticket.* TO osticket@localhost IDENTIFIED BY "securepassword";

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

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

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

osTicketをダウンロード

まず、次のコマンドを使用してosTicketの最新バージョンをダウンロードします。

wget https://github.com/osTicket/osTicket/releases/download/v1.17.2/osTicket-v1.17.2.zip

osTicketがダウンロードされたら、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

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

Apache仮想ホストの作成

次に、osTicket用のApache仮想ホスト設定ファイルを作成する必要があります。次のコマンドを使用して作成できます。

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

次の行を追加します:


        ServerName osticket.example.com
        ServerAdmin admin@localhost
        DocumentRoot /var/www/html/osticket/upload

        
                Require all granted
                Options FollowSymlinks
                AllowOverride All
        

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

完了したら、ファイルを保存して閉じます。その後、次のコマンドを使用してosTicket仮想ホストを有効にし、Apacheのリライトモジュールを有効にします。

a2ensite osticket.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 Wed 2022-12-21 07:20:15 UTC; 3s ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 62019 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
   Main PID: 62023 (apache2)
      Tasks: 6 (limit: 2238)
     Memory: 15.4M
        CPU: 42ms
     CGroup: /system.slice/apache2.service
             ??62023 /usr/sbin/apache2 -k start
             ??62024 /usr/sbin/apache2 -k start
             ??62025 /usr/sbin/apache2 -k start
             ??62026 /usr/sbin/apache2 -k start
             ??62027 /usr/sbin/apache2 -k start
             ??62028 /usr/sbin/apache2 -k start

Dec 21 07:20:15 ubuntu2204 systemd[1]: apache2.service: Deactivated successfully.
Dec 21 07:20:15 ubuntu2204 systemd[1]: Stopped The Apache HTTP Server.
Dec 21 07:20:15 ubuntu2204 systemd[1]: Starting The Apache HTTP Server...

osTicketインストールウィザードの起動

次に、URL http://osticket.example.comを使用してosTicketインストールウィザードを起動できます。次のページが表示されるはずです。

osTicket Installer

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

System settings

admin user

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

Installation successful

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

support center

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

System preferences page

また、URL http://osticket.example.comを使用してosTicketのデフォルトページにアクセスすることもできます。

Client GUI

Let’s Encrypt 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 --apache -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/apache2/sites-enable/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
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

結論

この記事では、Ubuntu 22.04サーバーでApacheを使用してosTicketをインストールする方法を示しました。これで、組織内でosTicketを展開し、カスタマーサービスをスケールおよび合理化し、顧客体験を大幅に改善できます。

Share: X/Twitter LinkedIn

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

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