Skip to content

Commit 0a343b4

Browse files
authored
fixes nextcloud_latest.sh (stable)
1 parent 59ad1b4 commit 0a343b4

File tree

1 file changed

+22
-6
lines changed

1 file changed

+22
-6
lines changed

nextcloud_latest.sh

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,16 @@ echo '\n'
2626

2727
#Instala los paquetes necesarios
2828
apt-get update
29-
apt-get -y install apache2 mariadb-server libapache2-mod-fcgid php-fpm php-gd php-mysql php-curl php-gmp php-mbstring php-intl php-imagick php-xml php-zip unzip memcached php-memcached redis-server php-redis php-bcmath php-bz2 php-imap php-smbclient php-ldap imagemagick ffmpeg
29+
apt-get -y install apache2 mariadb-server libapache2-mod-fcgid curl zip unzip php-fpm php-gd php-mysql php-curl php-gmp php-mbstring php-intl php-imagick php-xml php-zip unzip memcached php-memcached redis-server php-redis php-bcmath php-bz2 php-imap php-smbclient php-ldap imagemagick ffmpeg
3030

3131
# Descarga y descomprime el archivo zip y mueve la carpeta a /var/www/html/nextcloud
32-
wget https://download.nextcloud.com/server/releases/latest.zip
33-
sudo unzip latest.zip -d /var/www/html/
32+
wget https://download.nextcloud.com/server/releases/latest-27.zip
33+
sudo unzip latest-27.zip -d /var/www/html/
3434

3535
#Obtiene la versión de PHP instalada
3636
PHP_VERSION=$(php -v | head -n 1 | cut -d " " -f 2 | cut -c 1,2,3)
3737

3838
#Configura Apache
39-
a2enmod rewrite
4039
a2enmod headers
4140
a2enmod env
4241
a2enmod dir
@@ -75,7 +74,8 @@ sudo echo "<VirtualHost *:80>
7574

7675

7776
# Habilitamos el archivo de configuración
78-
sudo a2ensite nextcloud.conf
77+
a2ensite nextcloud.conf
78+
a2enmod rewrite
7979

8080
# Configura la base de datos MariaDB
8181

@@ -106,6 +106,22 @@ cat <<EOF | sudo tee /var/www/html/nextcloud/config/autoconfig.php
106106
'overwriteprotocol' => 'https',
107107
'overwrite.cli.url' => 'https://$domain',
108108
'overwritehost' => '$domain',
109+
'enable_previews' => true,
110+
'enabledPreviewProviders' =>
111+
array (
112+
'OC\Preview\Movie',
113+
'OC\Preview\PNG',
114+
'OC\Preview\JPEG',
115+
'OC\Preview\GIF',
116+
'OC\Preview\BMP',
117+
'OC\Preview\XBitmap',
118+
'OC\Preview\MP3',
119+
'OC\Preview\MP4',
120+
'OC\Preview\TXT',
121+
'OC\Preview\MarkDown',
122+
'OC\Preview\PDF'
123+
),
124+
109125
);
110126
EOF
111127

@@ -115,7 +131,7 @@ chown www-data:www-data /var/nextcloud_data
115131
chmod 755 /var/nextcloud_data
116132

117133
# Limpia los archivos innecesarios
118-
rm latest.zip
134+
rm latest-27.zip
119135

120136
# Damos permisos a la carpeta HTML para el usuario www-data
121137
sudo chown -R www-data:www-data /var/www/html/nextcloud/

0 commit comments

Comments
 (0)