Learn how to – Install Open Web Analytics on RHEL 8 / CentOS 8.
Welcome to our guide on how to install Open Web Analytics on RHEL 8 / CentOS 8. Open Web Analytics(OWA) is an open source web analytics software used to track and analyze websites and applications usage by end users. It enables developers and website owners to add analytics to web pages using simple PHP, Javascript, or REST based APIs.
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.
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.
Ensure httpd service is started and active
sudo systemctl enable --now httpd
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. Install PHP and extensions using the commands below:
sudo dnf install -y @php curl wget curl
sudo dnf -y install php-{pear,cgi,common,curl,mbstring,gd,mysqlnd,gettext,bcmath,json,xml,fpm,intl,zip}
Verify PHP installation.
$ php -v
PHP 7.2.24 (cli) (built: Oct 22 2019 08:28:36) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
Start and enable php-fpm.service
sudo systemctl enable --now php-fpm.service
Step 3: Install and Configure Database Server
You can choose to use MySQL or MariaDB database server. if you don’t have either installed, run the commands below:
sudo dnf -y install @mariadb
Start and secure database server:
sudo systemctl enable --now mariadb
sudo mysql_secure_installation
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';
FLUSH PRIVILEGES;
EXIT
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.
export VER=$(curl -s https://api.github.com/repos/Open-Web-Analytics/Open-Web-Analytics/releases/latest|grep tag_name|cut -d '"' -f 4)
wget https://github.com/padams/Open-Web-Analytics/archive/$VER.tar.gz
Uncompress Downloaded archive.
tar xvf $VER.tar.gz
Move owa directory inside /var/www
directory.
sudo mv Open-Web-Analytics*/ /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 rm /etc/httpd/conf.d/welcome.conf
sudo systemctl restart httpd
Confirm the service is in running
status:
$ systemctl status httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Drop-In: /usr/lib/systemd/system/httpd.service.d
└─php-fpm.conf
Active: active (running) since Sat 2022-05-28 20:07:10 UTC; 9s ago
Docs: man:httpd.service(8)
Main PID: 8280
Status: "Started, listening on: port 80"
Tasks: 213 (limit: 23654)
Memory: 37.4M
CGroup: /system.slice/httpd.service
├─8280 /usr/sbin/httpd -DFOREGROUND
├─8281 /usr/sbin/httpd -DFOREGROUND
├─8282 /usr/sbin/httpd -DFOREGROUND
├─8283 /usr/sbin/httpd -DFOREGROUND
└─8284 /usr/sbin/httpd -DFOREGROUND
[rocky@rocky-linux-02 ~]$
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.
Similar Articles:
- Install Matomo (Piwik) Web Analytics Tool on Ubuntu
- Install Fathom website analytics tool on Ubuntu / CentOS /Debian
Leave a Reply
You must be logged in to post a comment.