os_software:os:linux:opensuse:install_nexcloud_script

Install nextcloud script

#!/bin/bash
#====================================================================================
#
# install nextcloud
#
#====================================================================================
 
zypper -n in apache2 mariadb apache2-mod_php7 php7-gd php7-json php7-fpm php7-mysql php7-curl php7-intl php7-zip php7-mbstring php7-zlib php7-openssl php7-fileinfo php7-pcntl php7-posix phpMyAdmin

systemctl start mysql.service
systemctl enable mysql.service

mysqladmin -u root password 'autopass'
mysql -u root -p'autopass' -e 'CREATE DATABASE nextcloud;'
mysql -u root -p'autopass' -e 'GRANT ALL ON nextcloud.* TO ncadmin@localhost IDENTIFIED BY "autopass";'

sed -i -e 's/post_max_size = 8M/post_max_size = 50G/g' /etc/php7/apache2/php.ini
sed -i -e 's/upload_max_filesize = 2M/upload_max_filesize = 25G/g' /etc/php7/apache2/php.ini
sed -i -e 's/max_file_uploads = 20/max_file_uploads = 200/g' /etc/php7/apache2/php.ini
sed -i -e 's/max_input_time = 60/max_input_time = 3600/g' /etc/php7/apache2/php.ini
sed -i -e 's/max_execution_time = 30/max_execution_time = 3600/g' /etc/php7/apache2/php.ini
sed -i -e 's/session.gc_maxlifetime = 1440/session.gc_maxlifetime = 3600/g' /etc/php7/apache2/php.ini
sed -i -e 's/memory_limit = 128M/memory_limit = 512M/g' /etc/php7/apache2/php.ini

a2enmod php7
a2enmod rewrite
a2enmod headers
a2enmod env
a2enmod dir
a2enmod mime
a2enmod ssl

systemctl start apache2.service
systemctl enable apache2.service

mkdir /srv/www/htdocs/nextcloud_data
chmod -R 0770 /srv/www/htdocs/nextcloud-data
chown wwwrun /srv/www/htdocs/nextcloud-data

zypper -n in nextcloud
chown -R wwwrun /srv/www/htdocs/nextcloud/
systemctl restart apache2
  • os_software/os/linux/opensuse/install_nexcloud_script.txt
  • Zuletzt geändert: 2018/10/05 15:03
  • von 127.0.0.1