- Edited
Just wanted to drop this here.
If you install a fresh copy of Debian 8, Debian 9 or Ubuntu Server 16.X, you can use this bash script to automate the installation. Gets you all the packages, libraries you need, installs Apache, necessary Apache mods, PHPMyAdmin, Postfix and all necessary PHP 5.6 packages.
The script as is, will install osTicket 1.11, if you wish to install osTicket 1.10, uncomment lines 25/26 and change line 27: "unzip osticket_version_here" to change to your respective version.
#Simple automated script to install osTicket.
#If you wish to choose between 1.10 and 1.11 versions
#simply uncomment their respective lines on 25/26.
#Will setup some useful links to config filese in /root/
#Tested on Debian 8, Debian 9 & Ubuntu Server 16
#!/bin/bash
apt-get upgrade -y
apt-get update -y
apt-get purge `dpkg -l | grep php| awk '{print $2}' |tr "\n" " "`
apt-get install apache2 -y
apt-get install mysql-client mysql-server -y
apt-get mysql restart
apt-get install -y software-properties-common
apt-get install -y dirmngr
apt-get install apt-transport-https lsb-release ca-certificates -y
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list
add-apt-repository ppa:ondrej/php -y
apt-key update
apt-get update
apt-get install php5.6 php5.6-cli php5.6-mysql php-gettext php5.6-mbstring php-xdebug libapache2-mod-php5.6 php5.6-gd php5.6-imap php5.6-xml php5.6-apcu php5.6-intl$
service apache2 restart
echo
echo "Your PHP Version:"
php -v
read -p "Press enter to continue"
echo
apt-get install phpmyadmin -y --allow-unauthenticated
apt-get install git
apt-get install unzip
mkdir /var/www/osticket
cd /var/www/osticket
wget https://github.com/osTicket/osTicket/releases/download/v1.11.0-rc1/osTicket-v1.11.0-rc1.zip
#wget https://github.com/osTicket/osTicket/releases/download/v1.10.1/osTicket-v1.10.1.zip
unzip osTicket-v1.11.0-rc1.zip
cd /var/www/osticket/upload/include/plugins/
git clone https://github.com/osTicket/osTicket-plugins.git
git clone https://github.com/berezuev/osticket-spreader.git
chown -R www-data:www-data /var/www/
cp /var/www/osticket/upload/include/ost-sampleconfig.php /root/
mv /var/www/osticket/upload/include/ost-sampleconfig.php /var/www/osticket/upload/include/ost-config.php
chmod 666 /var/www/osticket/upload/include/ost-config.php
chmod -R g+s /var/www/html
find /var/www/html -type d -exec chmod 0755 {} \;
find /var/www/html -type f -exec chmod 0644 {} \;
cp -a /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/osticket.conf
cd /root/
ln -s /etc/php/5.6/cli/php.ini cli_php.ini
ln -s /etc/php/5.6/apache2/php.ini apache_php.ini
ln -s /etc/apache2/ apache2_conf
ln -s /var/www/osticket osticket_html
a2enmod rewrite
apt-get install sasl2-bin -y
apt-get install postfix -y
postfix -a
echo
touch /etc/postfix/sasl/smtpd.conf
echo pwcheck_method: saslauthd > /etc/postfix/sasl/smtpd.conf
echo mech_list: PLAIN LOGIN >> /etc/postfix/sasl/smtpd.conf
cp /etc/default/saslauthd /etc/default/saslauthd-postfix
dpkg-statoverride --add root sasl 710 /var/spool/postfix/var/run/saslauthd
adduser postfix sasl
postconf -e 'smtpd_sasl_local_domain = $myhostname'
postconf -e 'smtpd_sasl_auth_enable = yes'
postconf -e 'broken_sasl_auth_clients = yes'
postconf -e 'smtpd_sasl_security_options = noanonymous'
postconf -e 'smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination'
echo "#|/var/www/osticket/upload/api/pipe.php" >> /etc/aliases
echo
apt-get install mailutils -y
echo "Please modify the virtual-host in sites-available for Apache2 called osticket.conf"
echo "Once you have modified it to your liking, please restart Apache2; service apache2 restart".
echo "Then navigate to your server's phpmyadmin, http://youraddress/phpmyadmin"
echo "Login and create a user called osticket and a database named the same; grant all privileges to it."
echo "Now navigate to your webserver address and configure the osTicket setup."
echo
echo "DONT FORGET ABOUT POSTFIX"
echo "Edit the following file /etc/default/saslauthd-postfix"
echo "Then RESTART saslauthd"
echo "Then RESTART postfix"
echo "Dont forget to add email users and setup piped aliases".