Create Container
Create and Mount Data Directory
mkdir /tank/nextcloud
pct set 107 -mp0 /tank/nextcloud,mp=/data
Install Prerequisites
apt install apache2 mariadb-server libapache2-mod-php7.4
apt install php7.4-gd php7.4-mysql php7.4-curl php7.4-mbstring php7.4-intl
apt install php7.4-gmp php7.4-bcmath php-imagick php7.4-xml php7.4-zip
Move System Dirs to Data Directory
systemctl stop mariadb
mv /var/lib/mysql /data/
ln -s /data/mysql /var/lib/mysql
systemctl start mariadb
systemctl stop apache2
mv /etc/apache2 /data/
ln -s /data/apache2 /etc/apache2
mv /var/www /data/
ln -s /data/www /var/www
systemctl start apache2
Continue with Nextcloud Installation
Note: Because the install is done as root, there may be some directory permissions that need to change.
chown www-data:www-data /var/www/nextcloud/ -R
Apache Config File
<VirtualHost *:80>
DocumentRoot "/var/www/nextcloud"
ErrorLog ${APACHE_LOG_DIR}/nextcloud.error
CustomLog ${APACHE_LOG_DIR}/nextcloud.access combined
<Directory /var/www/nextcloud/>
Require all granted
Options FollowSymlinks MultiViews
AllowOverride All
<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /var/www/nextcloud
SetEnv HTTP_HOME /var/www/nextcloud
Satisfy Any
</Directory>
</VirtualHost>
No comments:
Post a Comment