Come installare osTicket su Ubuntu 22.04
Su questa pagina
- Prerequisiti
- Installa Apache, MariaDB e PHP
- Crea un database per osTicket
- Scarica osTicket
- Crea host virtuale Apache
- Avvia l'installazione guidata di osTicket
- Proteggi osTicket con Lets Encrypt SSL
- Conclusione
osTicket è un sistema di biglietteria open-source e uno dei più utilizzati dalle piccole e medie imprese. È un portale di assistenza clienti basato sul Web semplice e facile da usare che ti aiuta a gestire e tenere traccia di tutti i ticket. osTicket ti consente di definire le regole di instradamento dei ticket per inviare i ticket alla persona corretta. Puoi personalizzare e aggiungere il tuo logo, immagini e video ai biglietti. osTicket supporta molti tipi di database, come MySQL e PostgreSQL, e può essere integrato con LDAP/Active directory per l'autenticazione centrale.
Questo post spiegherà come installare osTicket con Apache su Ubuntu 22.04.
Prerequisiti
- Un server che esegue Ubuntu 22.04.
- Un nome di dominio valido viene indirizzato all'IP del tuo server.
- Sul server è configurata una password di root.
Installa Apache, MariaDB e PHP
Innanzitutto, dovrai installare il server Web Apache, MariaDB, PHP e altre estensioni PHP sul tuo server. Puoi installare tutti i pacchetti usando il seguente comando.
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
Una volta installati tutti i pacchetti, avvia e abilita il servizio Apache e MariaDB utilizzando il seguente comando.
systemctl start apache2
systemctl enable apache2
systemctl start mariadb
systemctl enable mariadb
Crea un database per osTicket
Innanzitutto, proteggi l'installazione di MariaDB con il seguente comando.
mysql_secure_installation
Rispondi a tutte le domande per impostare una password di root MariaDB e proteggere l'installazione:
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
Successivamente, accedi alla shell MariaDB con il seguente comando.
mysql -u root -p
Una volta effettuato l'accesso, crea un database e un utente per osTicket con il seguente comando.
MariaDB [(none)]> CREATE DATABASE osticket;
MariaDB [(none)]> CREATE USER 'osticket'@'localhost' IDENTIFIED BY 'securepassword';
Successivamente, concedi tutti i privilegi al database osTicket con il seguente comando.
MariaDB [(none)]> GRANT ALL PRIVILEGES ON osticket.* TO IDENTIFIED BY "securepassword";
Successivamente, svuota i privilegi ed esci dalla shell MariaDB con il seguente comando.
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;
Al termine, puoi procedere al passaggio successivo.
Scarica osTicket
Innanzitutto, scarica l'ultima versione di osTicket con il seguente comando.
wget https://github.com/osTicket/osTicket/releases/download/v1.17.2/osTicket-v1.17.2.zip
Una volta scaricato osTicket, crea una directory di osTicket ed estrai il file scaricato all'interno di quella directory.
mkdir /var/www/html/osticket
unzip osTicket-v1.17.2.zip -d /var/www/html/osticket
Successivamente, modifica la proprietà e l'autorizzazione della directory osTicket con il seguente comando:
chown -R www-data:www-data /var/www/html/osticket
chmod -R 755 /var/www/html/osticket
Ora, rinomina il file di configurazione di esempio osTicket utilizzando il comando indicato di seguito:
mv /var/www/html/osticket/upload/include/ost-sampleconfig.php /var/www/html/osticket/upload/include/ost-config.php
Una volta terminato, puoi procedere al passaggio successivo.
Crea un host virtuale Apache
Successivamente, dovrai creare un file di configurazione dell'host virtuale Apache per osTicket. Puoi crearlo con il seguente comando.
nano /etc/apache2/sites-available/osticket.conf
Aggiungi le seguenti righe:
<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>
Salva e chiudi il file quando hai finito. Quindi, attiva l'host virtuale osTicket e abilita il modulo di riscrittura Apache con il seguente comando:
a2ensite osticket.conf
a2enmod rewrite
Successivamente, riavvia il servizio Apache per applicare le modifiche alla configurazione:
systemctl restart apache2
Puoi controllare lo stato di Apache con il seguente comando.
systemctl status apache2
Dovresti ottenere il seguente output.
? 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...
Avvia l'installazione guidata di osTicket
Ora puoi avviare la procedura guidata di installazione di osTicket utilizzando l'URL http://osticket.example.com. Dovresti vedere la pagina seguente.
Fare clic su Continua. Dovresti vedere la pagina di installazione di base.
Definisci l'URL, il nome, l'e-mail, il nome del database, il nome utente e la password del tuo helpdesk, quindi fai clic sul pulsante Installa ora per avviare l'installazione. Una volta installato osTicket, dovresti vedere la seguente pagina.
Per accedere al pannello di controllo di osTicket, digita l'URL http://osticket.example.com/scp nel tuo browser web. Dovresti vedere la pagina di login di osTicket.
Fornisci il nome utente e la password dell'amministratore e fai clic sul pulsante Accedi. Dovresti vedere la dashboard di osTicket nella schermata seguente.
Puoi anche accedere alla pagina predefinita di osTicket utilizzando l'URL http://osticket.example.com.
Proteggi osTicket con Lets Encrypt SSL
Per proteggere il tuo sito web con Lets Encrypt SSL, dovrai installare il pacchetto certbot sul tuo server.
Innanzitutto, installa il gestore di pacchetti Snap con il seguente comando:
apt install snapd
Successivamente, aggiorna il pacchetto Snap all'ultima versione:
snap install core
snap refresh core
Successivamente, installa il pacchetto certbot usando il seguente comando:
snap install --classic certbot
Successivamente, crea un collegamento simbolico per Certbot binario alla posizione di sistema:
ln -s /snap/bin/certbot /usr/bin/certbot
Successivamente, esegui il comando seguente per scaricare e installare i certificati SSL di Lets Encrypt:
certbot --apache -d osticket.example.com
Ti verrà chiesto di fornire il tuo indirizzo email e di accettare i termini di servizio:
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
Digita Y e premi il tasto Invio per scaricare e installare i certificati SSL per il tuo dominio:
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 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Conclusione
In questo post, ti abbiamo mostrato come installare osTicket con Apache sul server Ubuntu 22.04. Ora puoi implementare osTicket nella tua organizzazione per ridimensionare e semplificare il tuo servizio clienti e migliorare drasticamente la tua esperienza cliente.