首页 > 编程知识 正文

jdk安装配置详细步骤,前端埋点怎么做

时间:2023-05-04 02:13:36 阅读:203801 作者:1676

安装Matomo 安装环境准备 PHP环境(高于PHP5.5),PHP安装参考安装MySQL,并创建数据库 MySQL安装参考Nginx,Nginx安装参考 开始安装 选择内部安装,下载matomo
下载地址:https://matomo.org/download/
将下载的安装包解压 app@matomo:~/matomo$unzip matomo-latest.zipapp@matomo:~/matomo$cd matomoapp@matomo:~/matomo$pwd/home/app/matomoapp@matomo:~/matomo$lltotal 372-rw-r--r-- 1 app app 91629 Feb 22 12:31 CHANGELOG.mddrwxr-xr-x 3 app app 122 Mar 1 15:57 config-rwxr-xr-x 1 app app 753 Feb 22 12:31 console-rw-r--r-- 1 app app 929 Feb 22 12:31 CONTRIBUTING.mddrwxr-xr-x 51 app app 4096 Mar 1 15:51 core-rw-r--r-- 1 app app 578 Feb 22 12:31 DIObject.php-rw-r--r-- 1 app app 0 Mar 1 15:49 favicon.ico-rw-r--r-- 1 app app 712 Feb 22 12:31 index.phpdrwxr-xr-x 2 app app 124 Mar 1 15:51 jsdrwxr-xr-x 2 app app 4096 Mar 1 15:51 lang-rw-r--r-- 1 app app 828 Feb 22 12:31 LegacyAutoloader.php-rw-r--r-- 1 app app 8620 Feb 22 12:31 LEGALNOTICEdrwxr-xr-x 9 app app 148 Mar 1 15:51 libs-rw-r--r-- 1 app app 35146 Feb 22 12:31 LICENSE-rw-r--r-- 1 app app 61889 Feb 22 12:31 matomo.js-rw-r--r-- 1 app app 328 Feb 22 12:31 matomo.phpdrwxr-xr-x 8 app app 4096 Mar 5 10:43 miscdrwxr-xr-x 21 app app 4096 Mar 1 15:51 node_modules-rw-r--r-- 1 app app 6381 Feb 22 12:31 offline-service-worker.js-rw-r--r-- 1 app app 4601 Feb 22 12:31 package-lock.json-rw-r--r-- 1 app app 1365 Feb 22 12:31 phpcs.xml-rw-r--r-- 1 app app 61889 Feb 22 12:31 piwik.js-rw-r--r-- 1 app app 2685 Feb 22 12:31 piwik.phpdrwxr-xr-x 69 app app 4096 Mar 1 15:51 plugins-rw-r--r-- 1 app app 4617 Feb 22 12:31 PRIVACY.md-rw-r--r-- 1 app app 5688 Feb 22 12:31 README.md-rw-r--r-- 1 app app 744 Feb 22 12:31 robots.txt-rw-r--r-- 1 app app 1870 Feb 22 12:31 SECURITY.mddrwxr-xr-x 2 app app 22 Feb 22 12:32 testsdrwxr-xr-x 10 app app 4096 Mar 1 15:51 tmpdrwxr-xr-x 22 app app 4096 Mar 1 15:51 vendor 如果服务器能连外网也可以直接使用 wget https://builds.matomo.org/matomo.zip && unzip matomo.zip Nginx 配置matomo 1、进入Nginx conf 目录 app@matomo:~/nginx-1.9.9/conf$pwd/home/app/nginx-1.9.9/confapp@matomo:~/nginx-1.9.9/conf$lltotal 44-rw-r--r-- 1 app app 1077 Dec 9 2015 fastcgi.conf-rw-r--r-- 1 app app 1007 Dec 9 2015 fastcgi_params-rw-r--r-- 1 app app 2837 Dec 9 2015 koi-utf-rw-r--r-- 1 app app 2223 Dec 9 2015 koi-win-rw-r--r-- 1 app app 3957 Dec 9 2015 mime.types-rw-r--r-- 1 app app 728 Mar 2 11:28 nginx.conf-rw-r--r-- 1 app app 4501 Mar 1 15:03 nginx.conf.back-rw-r--r-- 1 app app 636 Dec 9 2015 scgi_params-rw-r--r-- 1 app app 664 Dec 9 2015 uwsgi_paramsdrwxrwxr-x 2 app app 123 Mar 4 10:13 vhost-rw-r--r-- 1 app app 3610 Dec 9 2015 win-utf 2、ngin.conf 配置,配置如下: #user nobody;worker_processes 10;#error_log logs/error.log;#error_log logs/error.log notice;#error_log logs/error.log info;#pid logs/nginx.pid;events { worker_connections 1024;}http { include mime.types; underscores_in_headers on; default_type application/octet-stream; #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' # '$status $body_bytes_sent "$http_referer" ' # '"$http_user_agent" "$http_x_forwarded_for"'; #access_log logs/access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; #gzip on; include vhost/*.conf;} 3、在conf 下创建 vhost目录 app@matomo:~/nginx-1.9.9/conf$mkdir vhost 4、Nginx 下配置matomo app@matomo:~/nginx-1.9.9/conf/vhost$vim 9530.confserver { listen 9530 default_server; server_name _; root /home/app/matomo; include /home/app/nginx-1.9.9/conf/fastcgi.conf; location / { try_files $uri /index.php$is_args$args; } location ~ .php$ { # try_files $uri =404; include fastcgi_params; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } } 5、测试配置
successful 表示配置没问题 app@matomo:~/nginx-1.9.9/conf/vhost$../../sbin/nginx -tnginx: the configuration file /home/app/nginx-1.9.9/conf/nginx.conf syntax is oknginx: configuration file /home/app/nginx-1.9.9/conf/nginx.conf test is successful 6、生效配置 app@matomo:~/nginx-1.9.9/conf/vhost$../../sbin/nginx -s reload 7、测试matomo
host:prot 访问matomo

注意:
若不生效则重启Nginx,命令如下: nginx -s stopnginx -s start 初始化配置matomo 选择语言
系统检查下一步到数据库设置
配置提前创建好的MySQL数据库

设置超级用户
设置网站设置 JavaScript 跟踪代码
完成设置使用matomo
异常

如果不是使用80 端口需要在piwik/config/config.ini.php 设置trusted_hosts[] = “ip:prot” app@matomo:~/matomo$cd config/app@matomo:~/matomo/config$lsconfig.ini.php environment global.ini.php global.php manifest.inc.phpapp@matomo:~/matomo/config$pwd/home/app//matomo/configapp@matomo:~/matomo-test/matomo/config$vim config.ini.php


刷新页面即可

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。