OWA also comes with built-in support for tracking websites made with popular content management frameworks such as WordPress and MediaWiki. Follow steps provided here to install and configure Open Web Analytics on your RHEL 8 server.
Open Web Analytics Software requirements
The main software requirements of Open Web Analytics are:
- Nginx/Apache web server
- MariaDB database server
- PHP with PCNTL and mysql extensions.
Step 1: Install Nginx/Apache Web Server
We need either Nginx or Apache web server to host OWA application. We had earlier written an article on how to install Apache web server on RHEL 8 / CentOS 8.
Step 2: Install PHP and required extensions
The Open Web Analytics engine is mainly written in PHP and you’ll need to install it and some extensions prior to OWA setup. Follow our guide below to install PHP on RHEL 8 / CentOS 8.
Ensure PCNTL and mysqlnd PHP extensions are installed.
sudo yum -y install php-mysqlnd php-pcntl
Verify PHP installation.
$ php -v
PHP 7.2.11 (cli) (built: Oct 9 2018 15:09:36) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
Step 3: Install and Configure Database Server
You can choose to use MySQL or MariaDB database server. if you don’t have either installed, below guides should be helpful.
After Database server installation, create database and user for OWA.
$ mysql -u root -p
CREATE DATABASE owa;
GRANT ALL ON owa.* TO 'owa'@'localhost' IDENTIFIED BY 'StrongDBPassword';
Step 4: Install Open Web Analytics (OWA) on RHEL 8 / CentOS 8
Now that we have all the required dependencies installed, we can proceed to download and install Open Web Analytics. Check the Github releases page for the recent version.
sudo yum -y install wget
Uncompress Downloaded archive.
tar xvf $VER.tar.gz
Create owa directory inside
sudo mkdir /var/www/html/owa
Move extracted contents to created directory.
sudo mv * /var/www/html/owa
Set directory permissions to apache user and group.
sudo chown -R apache:apache /var/www/html/owa/
Create and Apply SELinux policy
sudo semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html/owa(/.*)?"
sudo restorecon -Rv /var/www/html/owa
Restart httpd service and
sudo systemctl restart httpd
Step 5: Access Open Web Analytics (OWA) Web UI
Open your server IP and /owa path.
Click on “Let’s Get Started” to start the installation. Provide database details on the next page.
Follow next wizard to set the username and finish Open Web Analytics installation on RHEL 8 / CentOS 8.