Piwik monitoring the site's access volume

Source: Internet
Author: User
Tags piwik

1 Yum Install lamp

    1. Yum-y Install httpd php php-mysqlhttpd-manual mod_ssl mod_perl mod_auth_mysql mysql-connector-odbc Mysql-devellibdbi-dbd-mysql php-gd php-xml php-mbstring php-ldap php-xmlrpc php-pearmysql-server





2 shut down the firewall, open the service

/etc/init.d/iptables stop/etc/init.d/httpd start/etc/init.d/mysqld Start


3 Downloads Piwik

    1. wget http://piwik.org/latest.zipunzip LATEST.ZIPCP-RF piwik/var/www/html/




4 Changing directory Permissions


    1. Cd/var/www/htmlchown-r apache:apache/var/www/html/piwikchmod-r 0755/var/www/html/piwik/tmpchmod-r 0755/var/www/ Html/piwik/tmp/assets/chmod-r 0755/var/www/html/piwik/tmp/cache/chmod-r 0755/var/www/html/piwik/tmp/logs/chmod-r 0755/var/www/html/piwik/tmp/tcpdf/chmod-r 0755/var/www/html/piwik/tmp/templates_c/chmod a+w/var/www/html/piwik/ Config




4 Setting up the database
Creating the Piwik database: Create databases Piwik;
Create user Piwik, which can connect to the database only from localhost and connect to the Piwik database:
Grant all on piwik.* to [e-mail protected] identified by ' 123456 '.

5 Installing Piwik
To access the Http://localhost/piwik, the installation wizard steps through the JavaScript step, you need to put this code on the site you want to monitor on each page inside


Add a site I'm adding here is the above website of my native http://192.168.127.134
then paste the following code into the
The following code is automatically generated

  1. <!-- piwik --><script type= "Text/javascript" >  var _paq = _paq | |  [];  _paq.push ([' Trackpageview ']),   _paq.push ([' enablelinktracking ']);   ( function ()  {    var u= "//192.168.127.134/piwik/";     _ Paq.push ([' Settrackerurl ',  u+ ' piwik.php ']);     _paq.push ([' Setsiteid ',  3]);     var d=document, g=d.createelement (' script '),  s=d.getelementsbytagname (' Script ') [0];    g.type= ' Text/javascript ';  g.async=true; g.defer=true; g.src =u+ ' Piwik.js ';  s.parentnode.insertbefore (g,s);   }) ();</script><noscript><p> </p></noscript><!-- end piwik code --> 




6 finally restart the HTTPD service, you will see the data

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/80/ED/wKiom1dE_hjRfvkhAAKPyNyna98606.png "title=" hu.png "alt=" Wkiom1de_hjrfvkhaakpynyna98606.png "/>

This article is from the "Drifting Away" blog, make sure to keep this source http://825536458.blog.51cto.com/4417836/1782845

Piwik monitoring the site's access volume

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.