下載安裝包
https://download.owncloud.org/download/repositories/production/Debian_10/all/
# 安裝相關套件
apt install apache2 mariadb-server libapache2-mod-php7.3 \
openssl php-imagick php7.3-common php7.3-curl php7.3-gd \
php7.3-imap php7.3-intl php7.3-json php7.3-ldap php7.3-mbstring \
php7.3-mysql php7.3-pgsql php-smbclient php-ssh2 \
php7.3-sqlite3 php7.3-xml php7.3-zip php-redis php-apcu -y
dpkg -i owncloud-files_10.4.1-1+1.1_all.deb
mysql -u root -p
MariaDB [(none)]> CREATE DATABASE owncloud CHARACTER SET utf8;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud'@'localhost' IDENTIFIED BY 'owncloud_passwd';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> \q
vi /etc/apache2/sites-available/owncloud.conf
Alias /owncloud "/var/www/owncloud/"
<Directory /var/www/owncloud/>
Options +FollowSymlinks
AllowOverride All
<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /var/www/owncloud
SetEnv HTTP_HOME /var/www/owncloud
</Directory>
a2ensite owncloud
systemctl restart apache2
chown -R www-data: /var/www/owncloud/
http://your_server_ip_address/owncloud/
備註:
新使用者預設的目錄跟檔案放在 /var/www/owncloud/core/skeleton
由於我是使用raid, 所以要修改/var/www/owncloud/config/config.php
裡面的datadirectory的設定, 另外要把.ocdata跟.htaccess也一併複制過去<br />最後...nextcloud比較好用.