OSTicket Automated Script for CentOS


MySQL Root Password

Updating System
yum -y update

Installing Apache
yum install httpd -y
chkconfig –levels 235 httpd on
service httpd start

Installing PHP
yum install php php-{cli,common,gd,mysql,imap,mbstring,xml} -y
echo -e “<?php\n\tphpinfo();\n?>” > /var/www/html/info.php
service httpd restart

Installing MySQL
yum install mysql mysql-server -y
chkconfig –levels 235 mysqld on
service mysqld start

Installing mysql_secure_installation
echo -e “Set root password? [Y/n] Y”
echo -e “Remove anonymous users? [Y/n] Y”
echo -e “Disallow root login remotely? [Y/n] Y”
echo -e “Remove test database and access to it? [Y/n] Y”
echo -e “Reload privilege tables now? [Y/n] Y”

OSTicket Installation
mkdir -p /opt/osticket
wget http://osticket.com/sites/default/files/download/osTicket-v1.9.2.zip -P /tmp
unzip -d /opt/osticket /tmp/osTicket-v1.9.2.zip

ln -s /opt/osticket/upload /var/www/html/support

Creating Apache VHOST
#    sed -i “/^#NameVirtualHost *:80$/ s/#NameVirtualHost *:80/NameVirtualHost *:80/” /etc/httpd/conf/httpd.conf
#    echo -e “VirtualHost *:80>
#    DocumentRoot /var/www/html/support
#    ServerName support.mydomain.com
#    ServerAlias http://www.support.mydomain.com
#    <Directory “/var/www/html/support”>
#    AllowOverride All
#    </Directory>
#    ErrorLog logs/support.mydomain.com-error_log
#    CustomLog logs/support.mydomain.com-access_log common
#    </VirtualHost>” >> /etc/httpd/conf/httpd.conf

Creating Mysql Database
mysql -u root -p$sqlpass -e “create database support;”
mysql -u root -p$sqlpass -e “grant all on support.* to support@localhost identified by ‘support’;”
mysql -u root -p$sqlpass -e “FLUSH PRIVILEGES;”

Finalizing the Installation
cd /var/www/html/support
cp include/ost-sampleconfig.php include/ost-config.php
chown apache: -R /var/www/html/support /opt/osticket

Security Reason Delete install.php
rm -f /var/www/html/support/setup/install.php

Installation is Completed
Please Check OSTicket http://IP-address/support
Please Check OSTicket http://IP-address/support/scp/login.php

Path Details

Output Details
You Will Get there Os-ticket Installer Click Continue

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s