Statistics on piwik and centospiwik installed in centos 7

Source: Internet
Author: User
Tags piwik

Statistics on piwik and centospiwik installed in centos 7

The original connection of this article is: http://blog.csdn.net/freewebsys/article/details/47146525 is not allowed by the blogger can not be reproduced.

1. About piwik

Piwik is an open source Website access Statistics System Based on PHP5 + MySQL technology. Its predecessor is phpMyVisites. Piwik can provide you with detailed statistics, such as the number of browser users, the most visited pages, and search engine keywords. In addition, it uses plug-in extension and open API architecture, allowing users to create more functions based on their actual needs.
The goal is to build a Google Analytics system.

In general, it is enough to use statistics such as Baidu statistics, google Analystic, and website statistics analysis.
However, customization is not required. Because data is stored in other systems.
In general, piwik puts statistics on its own machine, providing the possibility of processing data by itself in the future, but the cost will certainly be relatively high.

2. Install

It is easy to use. First, an nginx + fastcgi environment is required.
Create the tmp directory and assign permissions. Assume that piwik is placed under the/data/piwik directory.

mkdir -p /data/piwik/tmp/cache/tracker/chmod 777 /data/piwik/tmp/ -Rtouch /data/piwik/config/config.ini.phpchmod 777 /data/piwik/config/config.ini.php

Create a mysql database. You need to install the database:

Yum install-y mariadb-serversystemctl start mariadb. servicesystemctl enable mariadb. service # then configure the mariadb admin password. /Usr/bin/mysql_secure_installation

You must install a mysql server. Whether you use a local database or not, you also need to install a remote database.
Otherwise, an error will be reported: (maybe php depends on the mysql Development Kit, not familiar with it)

SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

Then create a user

mysql> CREATE DATABASE piwik DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; Query OK, 1 row affected (0.00 sec)mysql> GRANT ALL PRIVILEGES ON piwik.* TO piwik@"%" IDENTIFIED BY "piwik";Query OK, 0 rows affected (0.24 sec)mysql> FLUSH PRIVILEGES;Query OK, 0 rows affected (0.04 sec)

Configure the nginx module and go to the installation page:



Set the database, either local or remote. You can add a prefix.

Database Created

Set admin account

Create your own site.

Official statistics demo
Http://demo.piwik.org/

3. Summary

The original connection of this article is: http://blog.csdn.net/freewebsys/article/details/47146525 is not allowed by the blogger can not be reproduced.

A database error is reported when a bug occurs.
Https://github.com/piwik/piwik/issues/8304
Just add it yourself.

Unknown column 'Log _ visit. config_ OS 'in 'field list' "solution: mysql> alter table piwik_log_visit add column config_ OS VARCHAR (20); Query OK, 1 row affected (0.02 sec) Records: 1 Duplicates: 0 Warnings: 0 mysql> alter table piwik_log_visit add column config_browser_name VARCHAR (20); Query OK, 1 row affected (0.02 sec) Records: 1 Duplicates: 0 Warnings: 0

It is quite good to quickly build a website page analysis system.
Powerful functions. The required functions are basically available.

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.