Installing the Piwik website Access Analysis System

Source: Internet
Author: User
Tags piwik

CentOS 6.4 Installing Piwik

Yum Install lamp

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

Yum Clean All

Turn off the firewall and turn on the service

/etc/init.d/iptables stop

/ETC/INIT.D/HTTPD start

/etc/init.d/mysqld start

Download Piwik

Wgethttp://builds.piwik.org/piwik.zip

Unzip Piwik.zip

CP-RF piwik/var/www/html/

Chown-r Apache:apache/var/www/html/piwik

Chmod-r 0755/var/www/html/piwik/tmp

Chmod-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/

Mysql> CreateDatabase Piwik;

Mysql> Grant all on piwik.* [email protected] identified by ' 123456 ';

mysql> flush Privileges;

Chown-r Apache:apache/var/www/html/piwik

Chmod-r 0755/var/www/html/piwik/tmp

Chmod-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/

# # #chown-R Nobody/var/www/html/piwik

visit The Piwik page, there is a error, you need to disable mod_security This can be ignored, the following steps according to their own circumstances, the website I wrote is http://127.0.0.1

Http://192.168.2.107/piwik

After landing, click on the visitor information, found no data

Edit the default page

Vi/var/www/error/noindex.html

Add the following fields to the </body> line above:

<!--Piwik--

<scripttype= "Text/javascript" >

Var_paq = _paq | | [];

_paq.push ([' Trackpageview ']);

_paq.push ([' enablelinktracking ']);

(function () {

var u= ("https:" = = Document.location.protocol)? " HTTPS ":" http ") +"://192.168.2.107/piwik/";

_paq.push ([' Settrackerurl ', u+ ' piwik.php ']);

_paq.push ([' Setsiteid ', 1]);

var d=document, g=d.createelement (' script '), S=d.getelementsbytagname (' script ') [0]; G.type= ' Text/javascript ';

G.defer=true; G.async=true; g.src=u+ ' Piwik.js '; S.parentnode.insertbefore (g,s);

})();

</script>

<noscript><p></ P></noscript>

<!--End Piwik Code---

restart httpd service

/ETC/INIT.D/HTTPD restart

visit Piwik again, click on the visitor information and discover a piece of data


This article is from the Linux learners blog, so be sure to keep this source http://haowen.blog.51cto.com/3486731/1633526

Installing the Piwik website Access Analysis System

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.