配置要求:
安装前环境检查
- Matomo要求PHP版本高于PHP5.5(选用PHP7.2)
- Matomo需要pdo和pdo_mysql或mysqli支持(选用mysqli)
- Matomo要求Mysql版本高于MySQL5.5或者使用MariaDB(选用MySQL5.7)
- Matomo要求Nginx或Apache或IIS做服务器 (选用Nginx)
一:OS 准备, 这里我安装的centos 7.5 ,不带GUI。
1 [root@orc2 ~]# cat /etc/*release 2 CentOS Linux release 7.5.1804 (Core) 3 NAME="CentOS Linux" 4 VERSION="7 (Core)" 5 ID="centos"
二:工具准备
1 [root@orc2 ~]# sudo yum install -y wget curl vim zip unzip bash-completion #安装相关工具 2 [root@orc2 ~]# setenforce 0 #禁用SELinux 3 setenforce: SELinux is disabled 4 [root@orc2 ~]# systemctl stop firewalld #停止防火墙 5 [root@orc2 ~]# systemctl disable firewalld #禁用防火墙开机自启
三:安装mysql 数据库
安装配置过程参见:https://www.cnblogs.com/vmsky/p/13754762.html
因安装php需要,安装过程需要补充安装:mysql-community-libs-compat-5.7.30-1.el7.x86_64.rpm
1 [root@orc2 mysql]# rpm -Uvh mysql-community-libs-compat-5.7.30-1.el7.x86_64.rpm
四:开始安装PHP7.2
linux的yum源不存在php7.x,所以要更改yum源
1 rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm 2 rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm 3 yum -y install php72w-cli php72w-common php72w-devel php-mysqli php72w-fpm php72w php72w-cli php72w-fpm php72w-curl php72w-gd php72w-mysql php72w-xml php72w-mbstring 4 yum install yum-utils –y
检查 PHP version.
1 [root@orc2 mysql]# php --version 2 PHP 7.2.32 (cli) (built: Aug 23 2020 18:46:58) ( NTS ) 3 Copyright (c) 1997-2018 The PHP Group 4 Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies 5 [root@orc2 mysql]#
参考文档:
1、https://www.vultr.com/docs/how-to-install-matomo-analytics-on-centos-7
2、mysql 安装配置:https://www.cnblogs.com/qjoanven/p/7699382.html
3、nginx 安装配置:https://www.runoob.com/linux/nginx-install-setup.html