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