我在网上搜索如何将 NextCloud 连接到 S3,然后找到了它在这里我甚至在论坛上找到一些主题解释了如何做到这一点,这很棒。
但是我的解决方案也依赖于 Amazon RDS,我没有找到太多相关信息,那么如何将 RDS 配置为主要的 NextCloud 数据库?(以与 S3 相同的方式,例如,在创建管理员用户之前就要进行 S3 配置,我在论坛上看到过)如果可能的话,NextCloud 支持哪些数据库?
之后我尝试将 NextCloud 连接到 Amazon RDS,但一开始没有成功,我按照以下方法安装了 NextCloudNextCloud 安装但是我没有安装 mariadb-server,因为我已经有了我的数据库,即 RDS,安装了 PHP 7,还安装了 php7.0-mysql,并且启用了 mysql pdo,如果我运行 sudo php --ini ,我有 /etc/php/7.0/cli/conf.d/20-pdo_mysql.ini,如果我运行命令:sudo php -mi have pdo_mysql,这意味着两者都已启用,并且在我的配置文件中我有以下内容
<?php
'dbtype' => 'mysql',
'dbname' => 'dmname',
'dbhost' => '**********.rds.amazonaws.com:port-number',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => '********',
'dbpassword' => '********',
'installed' => false,
我甚至尝试了配置
<?php
'dbtype' => 'mysql',
'version' => '12.0.4.3',
'dbname' => 'dbname',
'dbhost' => 'http://**********.rds.amazonaws.com',
'dbport' => 'port-number',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => '********',
'dbpassword' => '********',
但我一直收到异常
{"reqId":"jUI5gpnDa3jRzK9N4crh","level":3,"time":"2018-01-29T12:43:01+00:00","remoteAddr":"194.165.136.114","user":"--","app":"PHP","method":"GET","url":"\/nextcloud\/index.php","message":"Doctrine\\DBAL\\DBALException: Failed to connect to the database: An exception occured in driver: could not find driver at \/var\/www\/nextcloud\/lib\/private\/DB\/Connection.php#61","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/63.0.3239.132 Safari\/537.36","version":""}
'installed' => true,
我甚至安装了 mariaDB,mariadb-server
但同样的问题仍然存在。
然后我在服务器的终端上运行命令,并且能够从服务器本身连接到 RDS,这意味着服务器内没有任何东西阻止 RDS,命令是:mysql -u username -h *******.rds.amazonaws.com -p
响应如下:
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is ***
Server version: 10.1.26-MariaDB MariaDB Server
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
任何帮助都很好