In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to install OTRS on Ubuntu 16.04. the editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.
OTRS, the open source ticket application system, is an open source issue order software for customer service, help desk, and IT service management. The software is written in Perl and javascript. This is a problem sheet solution for companies and organizations that need to manage bills, complaints, support requests, or other types of reports. OTRS supports multiple database systems, including MySQL, PostgreSQL, Oracle, and SQL Server. It is a multi-platform software that can be installed on Windows and Linux.
In this tutorial, I will show you how to install and configure OTRS on Ubuntu 16.04. I will use PostgreSQL as the database for OTRS and the Apache Web server as the Web server.
precondition
Ubuntu 16.04 .
The memory of the minimum 2GB.
Root permission
Step 1-install Apache and PostgreSQL
In the * * step, we will install the Apache Web server and PostgreSQL. We will use the * version from the ubuntu repository.
Log in to your Ubuntu server using SSH:
Ssh root@192.168.33.14
Update the Ubuntu warehouse.
Sudo apt-get update
Install Apache2 and PostgreSQL using apt:
Sudo apt-get install-y apache2 libapache2-mod-perl2 postgresql
Make sure that Apache and PostgreSQL are running by checking the server port.
Netstat-plntu
Install Apache and PostgreSQL
You can see that port 80 is used by apache and port 5432 is used by postgresql database.
Step 2-install the Perl module
OTRS is based on Perl, so we need to install some Perl modules that OTRS requires.
Use this apt command to install the perl module:
Sudo apt-get install-y libapache2-mod-perl2 libdbd-pg-perl libnet-dns-perl libnet-ldap-perl libio-socket-ssl-perl libpdf-api2-perl libsoap-lite-perl libgd-text-perl libgd-graph-perl libapache-dbi-perl libarchive-zip-perl libcrypt-eksblowfish-perl libcrypt-ssleay-perl libencode-hanextra-perl libjson-xs-perl libmail-imapclient-perl libtemplate-perl libtemplate-perl libtext-csv-xs-perl libxml-libxml-perl libxml-libxslt-perl libpdf-api2-simple-perl libyaml-libyaml-perl
After the installation is complete, we need to activate the Perl module for apache and then restart the apache service.
A2enmod perl systemctl restart apache2
Next, check to see if the module has been loaded using the following command:
Apachectl-M | sort
Enable Apache Perl Module
You can see perl_module under the "Loaded Modules" section.
Step 3-create a new user for OTRS
OTRS is a web-based program and runs under the apache web server. For security, we need to run it as a normal user, not a root user.
Use the useradd command to create a new otrs user:
Useradd-r-d / opt/otrs-c 'OTRS User' otrs
-r: use the user as the system user.
-d / opt/otrs: place the home directory of the new user under / opt/otrs.
-C: remarks.
Next, add the otrs user to the www-data user group because apache runs on the www-data user and user group.
Usermod-a-G www-data otrs
There are already otrs users in the / etc/passwd file.
Grep-rin otrs / etc/passwd
Create new user for OTRS
New users of OTRS have been created.
Step 4-create and configure the database
In this section, we will create a new PostgreSQL database for the OTRS system and make some minor changes to the configuration of the PostgreSQL database.
Log in to the postgres user and access PostgreSQL shell.
Su-postgrespsql
Create a new role otrs with a password of myotrspw and an unprivileged user.
Create user otrs password 'myotrspw' nosuperuser
Then create a new otrs database with otrs user rights:
Create database otrs owner otrs;\ Q
Next, edit the PostgreSQL configuration file for otrs role authentication.
Vim / etc/postgresql/9.5/main/pg_hba.conf
Paste the following configuration after line 84:
Local otrs otrs password host otrs otrs 127.0.0.1/32 password
Save the file and exit vim
Database Authentication OTRS
Use exit to return to root permissions and restart PostgreSQL:
Exit systemctl restart postgresql
PostgreSQL is ready for the installation of OTRS.
Configure PostgreSQL for OTRS
Step 5-download and configure OTRS
In this tutorial, we will use the version of the OTRS website.
Enter the / opt directory and use the wget command to download OTRS 5.0:
Cd / opt/ wget http://ftp.otrs.org/pub/otrs/otrs-5.0.16.tar.gz
Expand the otrs file, rename the directory, and change the ownership of all otrs files and directories to otrs.
Tar-xzvf otrs-5.0.16.tar.gz mv otrs-5.0.16 otrs chown-R otrs:otrs otrs
Next, we need to check the system and make sure that OTRS can be installed.
Use the following otrs script command to check the system packages required for the OTRS installation:
/ opt/otrs/bin/otrs.CheckModules.pl
Make sure all the results are correct, which means that our server is ready to install OTRS.
OTRS Chek Module needed for Installation
OTRS has been downloaded and our server is ready to install OTRS.
Next, go to the otrs directory and copy the configuration file.
Cd / opt/otrs/ cp Kernel/Config.pm.dist Kernel/Config.pm
Use vim to edit the Config.pm file:
Vim Kernel/Config.pm
Change the database password for line 42:
$Self- > {DatabasePw} = 'myotrspw'
MySQL database support for comment 45 lines:
# $Self- > {DatabaseDSN} = "DBI:mysql:database=$Self- > {Database}; host=$Self- > {DatabaseHost};"
Uncomment line 49 PostgreSQL database support:
$Self- > {DatabaseDSN} = "DBI:Pg:dbname=$Self- > {Database};"
Save the file and exit vim.
Then edit the apache startup file to enable PostgreSQL support.
Vim scripts/apache2-perl-startup.pl
Uncomment lines 60 and 61:
# enable this if you use postgresql use DBD::Pg (); use Kernel::System::DB::postgresql
Save the file and exit the editor.
* check for missing dependencies and modules.
Perl-cw / opt/otrs/bin/cgi-bin/index.pl perl-cw / opt/otrs/bin/cgi-bin/customer.pl perl-cw / opt/otrs/bin/otrs.Console.pl
You can see that the result is "OK" in the screenshot below:
Check all modules again
Step 6-Import the sample database
In this tutorial, we will use the sample database, which can be found in the script directory. So we just need to import all the sample databases and table structures into the database created in step 4.
Log in to the postgres user and enter the otrs directory.
Su-postgrescd / opt/otrs/
As an otrs user, use the psql command to insert the database and table structure.
Psql-U otrs- W-f scripts/database/otrs-schema.postgresql.sql otrs psql-U otrs- W-f scripts/database/otrs-initial_insert.postgresql.sql otrs psql-U otrs- W-f scripts/database/otrs-schema-post.postgresql.sql otrs
Enter the database password myotrspw when needed.
Import OTRS Sample Database
Step 7-start OTRS
The database and OTRS are configured, and now we can start OTRS.
Set the file and directory permissions for otrs to www-data users and user groups.
/ opt/otrs/bin/otrs.SetPermissions.pl-otrs-user=www-data-web-group=www-data
Enable the otrs apache configuration by creating a new link file to the apache virtual host directory.
Ln-s / opt/otrs/scripts/apache2-httpd.include.conf / etc/apache2/sites-available/otrs.conf
Enable the otrs virtual host and restart apache.
A2ensite otrs systemctl restart apache2
Make sure there are no errors when apache starts.
Enable OTRS Apache Virtual Host
Step 8-configure OTRS scheduled tasks
OTRS is already installed and running on the Apache Web server, but we still need to configure the OTRS scheduling task.
Log in to the otrs user and then enter the var/cron directory as the otrs user.
Su-otrs cd var/cron/pwd
Copy all .dist scheduled task scripts using the following command:
For foo in * .dist; do cp $foo `basename $foo .dist`; done
Use exit to go back to root permissions and use the otrs user to start the scheduled task script.
Exit / opt/otrs/bin/Cron.sh start otrs
Enable OTRS Cron
Next, the PostMaster that manually receives the email creates a new scheduled task. I will configure to receive email every 2 minutes.
Su-otrs crontab-e
Paste the following configuration:
* / 2 * $HOME/bin/otrs.PostMasterMailbox.pl > > / dev/null
Save and exit.
Now stop the otrs daemon and start it again.
Bin/otrs.Daemon.pl stop bin/otrs.Daemon.pl start
Enable OTRS Fetching Email
OTRS installation and configuration are complete.
Step 9-Test OTRS
Open your web browser and enter your server IP address: http://192.168.33.14/otrs/
Log in with the default user root@localhost and password root.
Installation Successfully OTRS Home Page
Use the default root account and you will see a warning. Click the warning message to create a new admin root user.
The following is the admin page that appears after logging in with another admin root user, and there is no error message.
OTRS Admin Dashboard Without Error Messages
If you want to log in as a customer, you can use customer.pl: http://192.168.33.14/otrs/customer.pl
You will see the customer login screen and enter the customer's user name and password.
OTRS Customer Login Page
The following is a customer page that creates a new document.
Customer Open Ticket
Step 10-troubleshoot
If you still see the "OTRS Daemon is not running" error, you can debug the OTRS daemon like this.
Su-otrs cd / opt/otrs/
Stop the OTRS daemon:
Bin/otrs.Daemon.pl stop
Start the OTRS daemon with the-- debug option.
Bin/otrs.Daemon.pl start-debug on "how to install OTRS on Ubuntu 16.04" this article is shared here, I hope the above content can be of some help to you, so that you can learn more knowledge, if you think the article is good, please share it out for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.