Hello again everyone! Back with another FreeBSD / OTRS How-To. OTRS is about to release version 5! I'm looking forward to some of the new features and I know you are too. My previous How-To was written for FreeBSD 10.1 and OTRS4. There have been a few changes since my previous post, so I've decided to create a new one that'll help all you FreeBSD / OTRS users get OTRS up and running on a fresh installation of FreeBSD 10.2.
As root, do the following...
Install required packages in FreeBSD:
Edit /etc/rc.conf to add the following
Create OTRS directory via zfs
Or if not using ZFS, do the following
Create Perl symlink to avoid OTRS installation errors.
Create OTRS user
Download the latest version of OTRS and extract
Copy configs
Set OTRS permissions/access rights:
See which Perl modules are needed to run OTRS on FreeBSD
Install required modules and others you might need:
Example:
Here's a list of the modules I'm using.
Verify Perl has been properly set up:
Start the Apache24 service to verify if the base install is working
Open a browser window to the IP address of your FreeBSD server. In my case, http://192.168.1.20/
If you see "It works!" in the browser, your Apache24 installation was successful
Start MySQL Server
Set the root password for MySQL:
Modify MySQL config file to reflect the following changes.
(Add the 3 lines below to my.cnf)
Copy the OTRS configuration file to the Apache24 directory
Also, verify that the CGI module is loaded. Locate and un-comment this line (remove the #) within httpd.conf
Save and exit.
Restart the Apache24 service:
Rename OTRS cron .dist files
Make sure OTRS cron jobs are running as the OTRS user:
You're ready to go!
Open your web browser and navigate to the URL http://ServerIPAddress/otrs/installer.pl
*** NOTE ***
I've done a full update from FreeBSD 10.1 w/ OTRS 4 to FreeBSD 10.2 w/ OTRS 5
If you need help with this update, feel free to PM me.
~kuan
As root, do the following...
Install required packages in FreeBSD:
# pkg install apache24 mysql56-server
Edit /etc/rc.conf to add the following
Code:
apache24_enable="YES"
mysql_enable="YES"
Create OTRS directory via zfs
# zfs create zroot/opt
# zfs set mountpoint=/opt zroot/opt
Or if not using ZFS, do the following
# mkdir /opt
Create Perl symlink to avoid OTRS installation errors.
ln -s /usr/local/bin/perl /usr/bin/perl
Create OTRS user
adduser
Code:
UserName = otrs
FullName = otrs
Home Directory = /opt/otrs
Password = otrs
Download the latest version of OTRS and extract
# cd /opt
# fetch ftp://ftp.otrs.org/pub/otrs/otrs-5.x.x.tar.gz
# tar -xf otrs-5.x.x.tar.gz
# mv otrs-5.x.x otrs
Copy configs
# cd /opt/otrs/Kernel
# cp Config.pm.dist Config.pm
Set OTRS permissions/access rights:
# perl /opt/otrs/bin/otrs.SetPermissions.pl --otrs-user=otrs --web-group=www --admin-group=otrs
See which Perl modules are needed to run OTRS on FreeBSD
Code:
# perl /opt/otrs/bin/otrs.CheckModules.pl
Install required modules and others you might need:
Example:
Code:
# cpan Archive::Zip
Code:
o Apache::DBI
o Apache2::Reload
o Archive::Tar
o Archive::Zip
o Crypt::SSLeay
o Date::Format
o DBI
o DBD::mysql
o IO::Socket::SSL
o JSON::XS
o List::Util::XS
o LWP::UserAgent
o IO::Socket::SSL
o ModPerl::Util
o Net::DNS
o Template
o Template::Stash::XS
o Text::CSV_XS
o Time::HiRes
o Time::Piece
o YAML::XS
Verify Perl has been properly set up:
# perl -cw /opt/otrs/bin/cgi-bin/index.pl
Code:
/opt/otrs/bin/cgi-bin/installer.pl syntax OK
# perl -cw /opt/otrs/bin/cgi-bin/customer.pl
Code:
/opt/otrs/bin/cgi-bin/customer.pl syntax OK
> perl -cw /opt/otrs/bin/otrs.PostMaster.pl
Code:
/opt/otrs/bin/otrs.PostMaster.pl syntax OK
Start the Apache24 service to verify if the base install is working
# service apache24 start
Open a browser window to the IP address of your FreeBSD server. In my case, http://192.168.1.20/
If you see "It works!" in the browser, your Apache24 installation was successful
Start MySQL Server
Code:
service mysql-server start
Set the root password for MySQL:
# mysql -u root
Code:
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('rootpass');
mysql> quit
Modify MySQL config file to reflect the following changes.
# vi /usr/local/etc/my.cnf
(Add the 3 lines below to my.cnf)
Code:
[mysqld]
max_allowed_packet=4M
innodb_log_file_size=256MB
Copy the OTRS configuration file to the Apache24 directory
# cp /opt/otrs/scripts/apache2-httpd.include.conf /usr/local/etc/apache24/Includes/otrs.conf
Also, verify that the CGI module is loaded. Locate and un-comment this line (remove the #) within httpd.conf
Code:
LoadModule cgi_module"
libexec/apache22/mod_cgi.so
Restart the Apache24 service:
# service apache24 restart
Rename OTRS cron .dist files
# cd /opt/otrs/var/cron
# mv aaa_base.dist aaa_base
# mv otrs_daemon.dist otrs_daemon
Make sure OTRS cron jobs are running as the OTRS user:
# su otrs
# /opt/otrs/bin/Cron.sh start
You're ready to go!
Open your web browser and navigate to the URL http://ServerIPAddress/otrs/installer.pl
*** NOTE ***
I've done a full update from FreeBSD 10.1 w/ OTRS 4 to FreeBSD 10.2 w/ OTRS 5
If you need help with this update, feel free to PM me.
~kuan
Last edited by a moderator: