1 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
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
wget http://piwik.org/latest.zipunzip LATEST.ZIPCP-RF piwik/var/www/html/
4 Changing directory Permissions
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
-
<!-- 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