Installing latest Tickets CAD on CentOS 7 - openises/tickets GitHub Wiki

Installing Tickets CAD on CentOS 7

  • Download and install the OS

  • Apply the latest updates

yum -y update
  • Open the firewall to permit connections to a web service on the standard ports
firewall-cmd --add-service=http
firewall-cmd --add-service=https
firewall-cmd --runtime-to-permanent
  • Install epel
yum install epel-release
  • Install Remi So that you can install a newer php version
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
#If CentOS8 - yum install http://rpms.remirepo.net/enterprise/remi-release-8.rpm
  • Enable the desired version of PHP to install
yum -y install yum-utils
#Tickets Currently Requires 7.x // yum-config-manager --enable remi-php81
yum-config-manager --enable remi-php74
  • Install needed dependencies
yum --skip-broken install php php-gd php-xcache php-curl php-pear mariadb php-mysqlnd php-mbstring lynx wget unzip php-json lynx wget mariadb-server git httpd nano
  • Start the database
systemctl start mariadb
systemctl enable mariadb
  • Secure your database with a password and remove demo accounts and database
[root@ticketscad ~]# mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
 SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n]
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n]
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n]
 ... Success!

By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n]
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n]
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!
  • Change directory to the root of the web server
cd /var/www/html/
  • Using GIT, download the Tickets CAD software
git clone https://github.com/openises/tickets.git
  • Change file permissions
chown apache:apache -R /var/www/html/tickets
  • Edit the properties of the php.ini file.

    ** Set the timezone

    ** Set XYZ

nano -w /etc/php.ini
  • SELinux is a great tool for protecting CentOS/RedHat/ and similar servers. It requires some additional permissions be set. Run the following commands
chcon -R -t httpd_sys_rw_content_t /var/www/html/tickets/
setsebool -P httpd_can_sendmail 1
setsebool -P httpd_can_network_connect 1
setsebool -P httpd_can_network_connect_db 1
  • Start the web server
systemctl start httpd
systemctl enable httpd
  • Optional: Install the phpMyAdmin Web GUI for managing the MySQL/MariaDB database server
yum -y install phpMyAdmin
systemctl restart httpd
  • From the command line, connect to the SQL server and create a new database, user account and password
mysql -uroot -p


CREATE USER '<YourTix User Name>'@'%' IDENTIFIED BY '<YourTix Password>';
CREATE DATABASE IF NOT EXISTS <YourTix Database> CHARACTER SET utf8;
GRANT ALL ON <YourTix Database>.* TO '<YourTix User Name>'@'%';
FLUSH PRIVILEGES;
  • Identity the IP address of the server, and then point your browser at that IP address /tickets
#This command will print out the IP address for each interface. You might also look at your router or ask an IT person for assistance
ip a
#Now load your favorite browser, Firefox/Chrome/Edge and point at the server's onw IP address: http://10.32.161.113/tickets/install.php
  • Enter the new database username, password and database name into the web interface. Click "Do It".

  • Disable the install.php script

chmod -rwx /var/www/html/tickets/install.php
mv /var/www/html/tickets/install.php /var/www/html/tickets/install.php-RanDoMStri13G