웹사이트 검색

Ubuntu 22.04에 osTicket을 설치하는 방법


이 페이지에서

  1. 전제 조건
  2. Apache, MariaDB 및 PHP 설치
  3. osTicket용 데이터베이스 생성
  4. osTicket 다운로드
  5. Apache 가상 호스트 만들기\n
  6. osTicket 설치 마법사 실행\n
  7. Lets Encrypt SSL로 보안 osTicket
  8. 결론

osTicket은 오픈 소스이며 중소기업에서 가장 널리 사용되는 발권 시스템 중 하나입니다. 모든 티켓을 관리하고 추적하는 데 도움이 되는 간단하고 사용하기 쉬운 웹 기반 고객 지원 포털입니다. osTicket을 사용하면 올바른 사람에게 티켓을 보내는 티켓 라우팅 규칙을 정의할 수 있습니다. 로고, 이미지, 비디오를 사용자 정의하고 티켓에 추가할 수 있습니다. osTicket은 MySQL 및 PostgreSQL과 같은 많은 데이터베이스 유형을 지원하며 중앙 인증을 위해 LDAP/Active 디렉토리와 통합될 수 있습니다.

이 게시물은 Ubuntu 22.04에서 Apache와 함께 osTicket을 설치하는 방법을 설명합니다.

전제 조건

  • Ubuntu 22.04를 실행하는 서버.\n
  • 유효한 도메인 이름은 서버 IP를 가리킵니다.\n
  • 루트 암호는 서버에서 구성됩니다.\n

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 루트 암호를 설정하고 설치를 보호하십시오.

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  IDENTIFIED BY "securepassword";

그런 다음 권한을 플러시하고 다음 명령을 사용하여 MariaDB 셸을 종료합니다.

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

완료되면 다음 단계로 진행할 수 있습니다.

os티켓 다운로드

먼저 다음 명령을 사용하여 최신 버전의 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

다음 줄을 추가합니다.

<VirtualHost *:80>
        ServerName osticket.example.com
        ServerAdmin 
        DocumentRoot /var/www/html/osticket/upload

        <Directory /var/www/html/osticket/upload>
                Require all granted
                Options FollowSymlinks
                AllowOverride All
        </Directory>

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

완료되면 파일을 저장하고 닫습니다. 그런 다음 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 설치 마법사를 시작할 수 있습니다. 다음 페이지가 표시됩니다.

계속을 클릭합니다. 기본 설치 페이지가 표시되어야 합니다.

헬프데스크 URL, 이름, 이메일, 데이터베이스 이름, 사용자 이름, 암호를 정의한 다음 지금 설치 버튼을 클릭하여 설치를 시작합니다. osTicket이 설치되면 다음 페이지가 표시됩니다.

osTicket 제어판에 액세스하려면 웹 브라우저에 URL http://osticket.example.com/scp를 입력하십시오. osTicket 로그인 페이지가 표시되어야 합니다.

관리자 사용자 이름, 암호를 제공하고 로그인 버튼을 클릭합니다. 다음 화면에 osTicket 대시보드가 표시되어야 합니다.

URL http://osticket.example.com을 사용하여 osTicket 기본 페이지에 액세스할 수도 있습니다.

Lets Encrypt SSL로 보안 osTicket

Lets 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

그런 다음 다음 명령을 실행하여 Lets 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): 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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을 배포하여 고객 서비스를 확장 및 간소화하고 고객 경험을 크게 개선할 수 있습니다.