{"id":13458,"date":"2022-01-05T02:16:28","date_gmt":"2022-01-05T02:16:28","guid":{"rendered":"https:\/\/linuxways.net\/?p=13458"},"modified":"2022-01-05T02:17:45","modified_gmt":"2022-01-05T02:17:45","slug":"how-to-install-open-source-osticket-on-ubuntu-20-04","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/ubuntu\/how-to-install-open-source-osticket-on-ubuntu-20-04\/","title":{"rendered":"How to Install Open Source osTicket on Ubuntu 20.04"},"content":{"rendered":"<p>osTicket is a PHP-based open-source ticketing system for the Linux platform. It can interface with LDAP\/Active Directory for central authentication and supports various databases such as MySQL and PostgreSQL. It&#8217;s a straightforward and light-weight web application. You can manage, organize, and archive your support requests with OsTicket. It integrates customer support requests received by email, web forms, and phone calls into a simple, easy-to-use, multi-user web-based platform. In this article, I will show you how to install osTicket on Ubuntu 20.04, using MariaDB as a database server and PHP.<\/p>\n<p>1. Update the system<\/p>\n<p>Update the system with the latest release packages by the given command.<\/p>\n<pre>Sam@linuxways:~$ sudo apt-get update<\/pre>\n<h2>2. Install all PHP and extensions<\/h2>\n<p>osTicket application needs the php extensions in order to run the application. Here, all the extensions needed are given and installed.<\/p>\n<pre>Sam@linuxways:~$ sudo apt install -y php-common php-fpm php-pear php-cgi php-net-socket php-bcmath php-gd php-imap php-intl php-apcu php-cli php-mbstring php-curl php-mysql php-json php-xml<\/pre>\n<p>Here, the version of php is checked after the installation of all the php extensions.<\/p>\n<pre>Sam@linuxways:~$ php -v<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"601\" height=\"315\" class=\"wp-image-13459\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-609.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-609.png 601w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-609-300x157.png 300w\" sizes=\"auto, (max-width: 601px) 100vw, 601px\" \/><\/p>\n<h2>3. Install Apache server<\/h2>\n<p>Apache web server is installed for the official apt repository.<\/p>\n<pre>Sam@linuxways:~$ sudo apt install apache2<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"407\" height=\"61\" class=\"wp-image-13460\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-610.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-610.png 407w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-610-300x45.png 300w\" sizes=\"auto, (max-width: 407px) 100vw, 407px\" \/><\/p>\n<h2>To start and enable the apache server manually here are the commands listed below. (The service is started on boot by default)<\/h2>\n<pre>Sam@linuxways:~$ sudo systemctl start apache2<\/pre>\n<pre>Sam@linuxways:~$ sudo systemctl enable apache2<\/pre>\n<h2>To check the status of the apache server to check whether it is running or stopped.<\/h2>\n<pre>Sam@linuxways:~$ sudo systemctl status apache2<\/pre>\n<h2>4. Install MariaDB database and configure<\/h2>\n<p>MariaDB database server is needed with a valid username, password, and hostname during the installation process. The user should be given full privileges on the database created.<\/p>\n<p>Here, the command is used to install the MariaDB server.<\/p>\n<pre>Sam@linuxways:~$ sudo apt install mariadb-server<\/pre>\n<p>To secure the MariaDB server here are the following steps to be done.<\/p>\n<pre>Sam@linuxways:~$ sudo mysql_secure_insatallation<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"207\" class=\"wp-image-13461\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-611.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-611.png 640w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-611-300x97.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>After entering the password for root some questions are asked before securing the server. We need to apply yes for all the given questions like shown in the figure below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"905\" height=\"860\" class=\"wp-image-13462\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-612.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-612.png 905w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-612-300x285.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-612-768x730.png 768w\" sizes=\"auto, (max-width: 905px) 100vw, 905px\" \/><\/p>\n<p>Here, the authentication plugin is changed to be able to login as the normal user.<\/p>\n<pre>Sam@linuxways:~$ sudo mysql -u root<\/pre>\n<pre>MariaDB [(none)]&gt; UPDATE mysql.user SET plugin = 'mysql_native_password' WHERE User = 'root';<\/pre>\n<pre>MariaDB [(none)]&gt; FLUSH PRIVILEGES;<\/pre>\n<pre>MariaDB [(none)]&gt; QUIT;<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"841\" height=\"347\" class=\"wp-image-13463\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-613.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-613.png 841w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-613-300x124.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-613-768x317.png 768w\" sizes=\"auto, (max-width: 841px) 100vw, 841px\" \/><\/p>\n<p>The confirmation of the database working with the command below.<\/p>\n<pre>Sam@linuxways:~$ mysql -u root -p<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"708\" height=\"200\" class=\"wp-image-13464\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-614.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-614.png 708w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-614-300x85.png 300w\" sizes=\"auto, (max-width: 708px) 100vw, 708px\" \/><\/p>\n<p>Here, a database is created for the osTicket application.<\/p>\n<pre>MariaDB [(none)]&gt; CREATE DATABASE osTicket_database;<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"472\" height=\"81\" class=\"wp-image-13465\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-615.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-615.png 472w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-615-300x51.png 300w\" sizes=\"auto, (max-width: 472px) 100vw, 472px\" \/><\/p>\n<p>After the completion of the creating database, we need to create a user osTicket_user for connecting the database and grant privileges. Following queries are for creating a user and connecting it to the database with full privileges granted.<\/p>\n<pre>MariaDB [(none)]&gt; CREATE USER \u2018osTicket_user\u2019@\u2018localhost\u2019 IDENTIFIED BY \u2018password\u2019;<\/pre>\n<pre>MariaDB [(none)]&gt; GRANT ALL PRIVILEGES ON osTicket_database.* TO osTicket_user@localhost IDENTIFIED BY \u201cpassword\u201d;<\/pre>\n<pre>MariaDB [(none)]&gt; FLUSH PRIVILEGES;<\/pre>\n<pre>MariaDB [(none)]&gt; QUIT;<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"876\" height=\"203\" class=\"wp-image-13466\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-616.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-616.png 876w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-616-300x70.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-616-768x178.png 768w\" sizes=\"auto, (max-width: 876px) 100vw, 876px\" \/><\/p>\n<h2>5. Create Directory for osTicket<\/h2>\n<p>The directory is created for the osTicket application giving the path where the directory is being created.<\/p>\n<pre>Sam@linuxways:~$ sudo mkdir -p \/var\/www\/os_ticket<\/pre>\n<p>The directory ownership is changed to the Linux user for further modifications easily without any permission issues.<\/p>\n<pre>Sam@linuxways:~$ sudo chown -R $USER:$USER \/var\/www\/os_ticket<\/pre>\n<p>Now, path to the os_ticket directory using the <strong>cd<\/strong> command and pull the latest osTicket installation archive from GitHub using <strong>wget<\/strong> command.<\/p>\n<pre>Sam@linuxways:~$ cd \/var\/www\/os_ticket<\/pre>\n<pre>Sam@linuxways:~$ wget https:\/\/github.com\/osTicket\/osTicket\/releases\/download\/<\/pre>\n<p>v1.15.2\/osTicket-v1.15.2.zip<\/p>\n<p>Extract the download file using the <strong>unzip<\/strong> command.<\/p>\n<pre>Sam@linuxways:~$ unzip osTicket-v1.15.2.zip<\/pre>\n<p>(Here, the version must be given according to the file you have downloaded.)<\/p>\n<p>After the archive file is extracted you can delete the zip file.<\/p>\n<pre>Sam@linuxways:~$ rm osTicket-v1.15.2.zip<\/pre>\n<p>osTicket has its own sample configuration file by default. We need to copy the file in the same directories and change its names.<\/p>\n<pre>Sam@linuxways:~$ sudo cp upload\/include\/ost-sampleconfig.php upload\/include\/ost-config.php<\/pre>\n<p><strong>chown <\/strong>command is used to assign the owner to the apache server user &#8211; <strong>www-data <\/strong>and <strong>chmod <\/strong>command is used for the appropriate permissions required.<\/p>\n<pre>Sam@linuxways:~$ sudo chown -R www-data:www-data \/var\/www\/os_ticket<\/pre>\n<pre>Sam@linuxways:~$ sudo chmod -R 755 \/var\/www\/os_ticket<\/pre>\n<h2>6. Create a Virtual Host File<\/h2>\n<p>A configuration file should be created under the path<strong> \/etc\/apache2\/sites-available<\/strong> directory in order to run osTicket with apache server.<\/p>\n<p>Here, <strong>a2dissite<\/strong> command is used to disable the default Apache configuration file.(In my case it is already disabled).<\/p>\n<pre>Sam@linuxways:~$sudo a2dissite 000-default.conf<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"446\" height=\"53\" class=\"wp-image-13467\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-617.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-617.png 446w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-617-300x36.png 300w\" sizes=\"auto, (max-width: 446px) 100vw, 446px\" \/><\/p>\n<p><strong>vim <\/strong>command is used to open the configuration file for editing the information.<\/p>\n<pre>Sam@linuxways:~$ sudo vim \/etc\/apache2\/sites-enabled\/os_ticket.conf<\/pre>\n<p>All the information is given below with the necessary permissions and directories. The server name and server alias must be replaced with your domain name and public IP address.<\/p>\n<pre><strong>&lt;VirtualHost *:80&gt;<\/strong>\r\n\r\n<strong>ServerName 192.168.120.129 #localhost<\/strong>\r\n\r\n<strong> ServerAlias <\/strong><a href=\"http:\/\/www.osticket.com\"><strong>www.osticket.com<\/strong><\/a><strong> #Your domain name<\/strong>\r\n\r\n<strong> DocumentRoot \"\/var\/www\/os_ticket\/upload\"<\/strong>\r\n\r\n<strong>&lt;Directory \"\/var\/www\/os_ticket\/upload\"&gt;<\/strong>\r\n\r\n<strong> Require all granted<\/strong>\r\n\r\n<strong> Options Indexes FollowSymLinks<\/strong>\r\n\r\n<strong> AllowOverride All<\/strong>\r\n\r\n<strong> Order allow, deny<\/strong>\r\n\r\n<strong> Allow from all<\/strong>\r\n\r\n<strong>&lt;\/Directory&gt;<\/strong>\r\n\r\n<strong> ErrorLog ${APACHE_LOG_DIR}\/error.log<\/strong>\r\n\r\n<strong> CustomLog ${APACHE_LOG_DIR}\/access.log combined<\/strong>\r\n\r\n<strong>&lt;\/VirtualHost&gt;<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"473\" height=\"262\" class=\"wp-image-13468\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-618.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-618.png 473w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-618-300x166.png 300w\" sizes=\"auto, (max-width: 473px) 100vw, 473px\" \/><\/p>\n<p>After the configuration file is done and saved, <strong>a2ensite <\/strong>command is used to enable the configuration file.(In my case it is already enabled).<\/p>\n<pre>Sam@linuxways:~$ sudo a2ensite os_ticket.conf<\/pre>\n<p>Finally, restart the apache service to reload the new configuration file.<\/p>\n<pre>Sam@linuxways:~$ sudo systemctl restart apache2<\/pre>\n<p>The firewall is enabled by default so, to get access to the site you can either disable the firewall with the command below or can assign the designated port for the site.<\/p>\n<pre>Sam@linuxways:~$ ufw disable<\/pre>\n<h2>7. Osticket Installation<\/h2>\n<p>After the installation process is done, open the firefox app and visit the site using the servername. Now, the following page is opened. Click continue to proceed to the next page.<\/p>\n<h2><img loading=\"lazy\" decoding=\"async\" width=\"1326\" height=\"973\" class=\"wp-image-13469\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-619.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-619.png 1326w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-619-300x220.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-619-1024x751.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-619-768x564.png 768w\" sizes=\"auto, (max-width: 1326px) 100vw, 1326px\" \/><\/h2>\n<p>Now, enter all the credentials given and complete the form. Here, you should provide all the information as per the requirement. The database created before in the system should be written in the following form.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1029\" height=\"811\" class=\"wp-image-13470\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-620.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-620.png 1029w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-620-300x236.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-620-1024x807.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-620-768x605.png 768w\" sizes=\"auto, (max-width: 1029px) 100vw, 1029px\" \/> <img loading=\"lazy\" decoding=\"async\" width=\"589\" height=\"647\" class=\"wp-image-13471\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-621.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-621.png 589w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-621-273x300.png 273w\" sizes=\"auto, (max-width: 589px) 100vw, 589px\" \/><\/p>\n<p>The confirmation page is opened after the form is filled with the right credentials.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1382\" height=\"884\" class=\"wp-image-13472\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-622.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-622.png 1382w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-622-300x192.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-622-1024x655.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-622-768x491.png 768w\" sizes=\"auto, (max-width: 1382px) 100vw, 1382px\" \/><\/p>\n<p>The dashboard of the admin is given below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"958\" height=\"346\" class=\"wp-image-13473\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-623.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-623.png 958w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-623-300x108.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-623-768x277.png 768w\" sizes=\"auto, (max-width: 958px) 100vw, 958px\" \/><\/p>\n<h2>Conclusion<\/h2>\n<p>The above-given command and its example are for the installation of open-source osTicket on Ubuntu 20.04. Thank you for checking it out!<\/p>","protected":false},"excerpt":{"rendered":"<p>osTicket is a PHP-based open-source ticketing system for the Linux platform. It can interface with LDAP\/Active Directory for central authentication and supports various databases such as MySQL and&hellip;<\/p>","protected":false},"author":1,"featured_media":13647,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[812,100],"class_list":["post-13458","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ubuntu","tag-osticket","tag-ubuntu-20-04"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/13458","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=13458"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/13458\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/13647"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=13458"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=13458"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=13458"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}