java piwik_piwik数据量变大后修改为底层运行,首先想到的就是以前依
java piwik_piwik数据量变大后修改为底层运行,首先想到的就是以前依
发表于 2020-08-23 08:52:43 by 月小升
piwik被收购后新名字为matomo,近期数据量过大,网页显示加载失败了。首先想到的就是以前依靠浏览器跑数据的模式,需要改成底层了。
官方给的例子
5 * * * * www-data /usr/bin/php /path/to/matomo/console core:archive --url=http://example.org/matomo/ > /home/example/matomo-archive.log
1. www-data
is the user that the cron job will be executed by, it should generally be your web server user. It is sometimes “apache”.
ls 查看index.php 的归属
daemon
2. /usr/bin/php
/usr/bin/php -v
php 5.6
3. /path/to/matomo/console
/path/to/matomo/console is the path to your Matomo app on your server. For example it may be /var/www/matomo/console.
/backup/www/leo2017/stat/console
4. –url=http://example.org/matomo/
系统的域名,如果是整个域名用来作为系统的url那么用域名,如果用了子目录作为matomo的运行路径那么用子目录
我的https://stat.java-er.com/
5./home/example/matomo-archive.log
日志路径,随便改一个可写入的文件即可。
/backup/www/leo2017/stat/log/matomo-archive.log
5 * * * * daemon /usr/bin/php /backup/www/leo2017/stat/console core:archive –url=https://stat.leoptique.com/ > /backup/www/leo2017/stat/log/matomo-archive.log
vi /etc/crontab
crontab /etc/crontab
超级官员账户设置,System > General settings 修改为停止浏览器计算数据
参考文档
This entry was posted in PHP. Bookmark the permalink.
月小升QQ 2651044202, 技术交流QQ群 178491360
首发地址:月小升博客 – https://java-er.com/blog/piwik-crontab/
无特殊说明,文章均为月小升原创,欢迎转载,转载请注明本文地址,谢谢
评论暂时关闭