In order to run sabre/katana on your CentOS 7 server, you need to have the following requirements installed:
- PHP version 5.5 or newer
- MySQL/MariaDB or SQLite database.
- Web server, Apache or nginx
Log in to your server via SSH as user root
and make sure that all packages are fully up to date by executing the following command
yum -y update
Run the following command to install MariaDB database server
yum install mariadb mariadb-server
Start the MariaDB database server and enable it to start at the boot time
systemctl start mariadb systemctl enable mariadb
Run the ‘mysql_secure_installation’ script to secure the database server and set your MariaDB root password
Log in to the MariaDB server using the ‘root’ user and create new database end user.
mysql -u root -p CREATE DATABASE katana; CREATE USER 'katanauser'@'localhost' IDENTIFIED BY 'PASSWORD'; GRANT ALL PRIVILEGES ON `katana`.* TO 'katanauser'@'localhost'; FLUSH PRIVILEGES;
Replace ‘PASSWORD’ with an actual strong password.
Now, we will install Apache web server
yum install httpd
Same as we did with MariaDB, start the Apache web server and add it to automatically start on the system start-up
systemctl start httpd systemctl enable httpd
Now we need to install PHP among with few PHP modules
yum install php php-gd php-common
Download the latest ZIP archive of sabre/katana from GitHub to your server. At the moment of writing this article it is version 0.3.2
Create a directory for sabre/katana’s files inside the document root directory on your server. Usually it is the ‘/var/www/html/’ directory.
Unpack the downloaded archive to the created directory
unzip katana_v0.3.2.zip -d /var/www/html/katana/
Change the ownership of the ‘katana’ directory
chown -R apache:apache /var/www/html/katana
Next, create Apache virtual host for your domain. Create ‘/etc/httpd/conf.d/vhosts.conf’ directory with the following content
vim /etc/httpd/conf.d/vhosts.conf IncludeOptional vhosts.d/*.conf
and create the virtual host
vim /etc/httpd/vhosts.d/yourdomain.com.conf <VirtualHost YOUR_SERVER_IP:80> ServerAdmin firstname.lastname@example.org DocumentRoot "/var/www/html/katana/" ServerName yourdomain.com ServerAlias www.yourdomain.com ErrorLog "/var/log/httpd/yourdomain.com-error_log" CustomLog "/var/log/httpd/yourdomain.com-access_log" combined <Directory "/var/www/html/katana/"> DirectoryIndex index.html index.php Options FollowSymLinks AllowOverride All Require all granted </Directory> </VirtualHost>
Restart the web server for the changes to take effect.
systemctl restart httpd
Finally, open a web browser and navigate to http://yourdomain.com/public/install.php to run the installer and follow the instructions in the browser to finish the installation.
Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to install sabre/katana for you. They are available 24×7 and will take care of your request immediately.
PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.