Commit fee2ac76 authored by Daniel's avatar Daniel

Update overlay/root/scripts/nc_config.sh, overlay/root/scripts/nc_tuning.sh,...

Update overlay/root/scripts/nc_config.sh, overlay/root/scripts/nc_tuning.sh, overlay/root/scripts/php_setup.sh, overlay/root/scripts/redis_config.sh, overlay/root/pkg_install_notes/redis files
parent 2de02c7f
[nc-build] [1/2] Fetching redis-5.0.9.txz: 100% 529 KiB 541.6kB/s 00:01
[nc-build] [2/2] Fetching php74-pecl-redis-5.3.1.txz: 100% 151 KiB 154.1kB/s 00:01
Checking integrity... done (0 conflicting)
[nc-build] [1/2] Installing redis-5.0.9...
===> Creating groups.
Creating group 'redis' with gid '535'.
===> Creating users
Creating user 'redis' with uid '535'.
[nc-build] [1/2] Extracting redis-5.0.9: 100%
[nc-build] [2/2] Installing php74-pecl-redis-5.3.1...
[nc-build] [2/2] Extracting php74-pecl-redis-5.3.1: 100%
=====
Message from redis-5.0.9:
--
To setup "redis" you need to edit the configuration file:
/usr/local/etc/redis.conf
To run redis from startup, add redis_enable="YES"
in your /etc/rc.conf.
=====
Message from php74-pecl-redis-5.3.1:
--
This file has been added to automatically load the installed extension:
/usr/local/etc/php/ext-30-redis.ini
......@@ -6,9 +6,10 @@ echo; echo "nextcloud: setup php-fpm config"
# change /usr/local/etc/php-fpm.d/nextcloud.conf
# create a backup
cp ${file_php_fpm_nc_conf} "${file_php_fpm_nc_conf}.bkp"
conf_update ${file_php_fpm_nc_conf} "env[PATH][[:SPACE:]]=" "$PATH"
conf_update ${file_php_fpm_nc_conf} "php_admin_value[session.save_path].*=" "$dir_nextcloud_sessions"
conf_update ${file_php_fpm_nc_conf} "env[PATH].*=" "$PATH"
# update some options
conf_update -c ${file_php_fpm_nc_conf} -o "env[PATH][[:SPACE:]]" -v "$PATH"
conf_update -c ${file_php_fpm_nc_conf} -o "php_admin_value[session.save_path]" -v "$dir_nextcloud_sessions"
conf_update -c ${file_php_fpm_nc_conf} -o "env[PATH]" -v "$PATH"
change_config_value_by_vars ${file_php_fpm_nc_conf}
php_admin_value[session.save_path]
......
......@@ -17,13 +17,13 @@ occ config:system:set opcache.revalidate_freq --value=1
# setup op cache
# https://docs.nextcloud.com/server/15/admin_manual/configuration_server/server_tuning.html#enable-php-opcache
conf_update_enable ${file_php_conf} "opcache.enable.*=" "1"
conf_update_enable ${file_php_conf} "opcache.enable_cli.*=" "1"
conf_update_enable ${file_php_conf} "opcache.interned_strings_buffer.*=" "8"
conf_update_enable ${file_php_conf} "opcache.max_accelerated_files.*=" "10000"
conf_update_enable ${file_php_conf} "opcache.memory_consumption.*=" "128"
conf_update_enable ${file_php_conf} "opcache.save_comments.*=" "1"
conf_update_enable ${file_php_conf} "opcache.revalidate_freq.*=" "1"
conf_update_enable -c ${file_php_conf} -o "opcache.enable" -v "1"
conf_update_enable -c ${file_php_conf} -o "opcache.enable_cli" -v "1"
conf_update_enable -c ${file_php_conf} -o "opcache.interned_strings_buffer" -v "8"
conf_update_enable -c ${file_php_conf} -o "opcache.max_accelerated_files" -v "10000"
conf_update_enable -c ${file_php_conf} -o "opcache.memory_consumption" -v "128"
conf_update_enable -c ${file_php_conf} -o "opcache.save_comments" -v "1"
conf_update_enable -c ${file_php_conf} -o "opcache.revalidate_freq" -v "1"
service php-fpm restart 1>/dev/null
service nginx restart 1>/dev/null
......@@ -32,11 +32,11 @@ echo "tuning: fpm"
# php-fpm
# https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html#tune-php-fpm
file_php_fpm_d_www="${dir_php_fpm_d}/www.conf"
conf_update $file_php_fpm_d_www "pm.*=" "dynamic"
conf_update $file_php_fpm_d_www "pm.max_children.*=" 120
conf_update $file_php_fpm_d_www "pm.start_servers.*=" 12
conf_update $file_php_fpm_d_www "pm.min_spare_servers.*=" 6
conf_update $file_php_fpm_d_www "pm.max_spare_servers.*=" 18
conf_update -c $file_php_fpm_d_www -o "pm" -v "dynamic"
conf_update -c $file_php_fpm_d_www -o "pm.max_children" -v 120
conf_update -c $file_php_fpm_d_www -o "pm.start_servers" -v 12
conf_update -c $file_php_fpm_d_www -o "pm.min_spare_servers" -v 6
conf_update -c $file_php_fpm_d_www -o "pm.max_spare_servers" -v 18
echo "tuning: big files"
......@@ -45,11 +45,11 @@ echo "tuning: big files"
# https://docs.nextcloud.com/server/15/admin_manual/configuration_files/big_file_upload_configuration.html#nginx
###
# change php.ini
conf_update_enable ${file_php_conf} "memory_limit.*=" "8G"
conf_update_enable ${file_php_conf} "post_max_size.*=" "8G"
conf_update_enable ${file_php_conf} "max_input_time.*=" "3600"
conf_update_enable ${file_php_conf} "max_execution_time.*=" "3600"
conf_update_enable ${file_php_conf} "output_buffering.*=" "0"
conf_update_enable ${file_php_conf} "upload_tmp_dir.*=" "/var/big_temp_file/"
conf_update_enable -c ${file_php_conf} -o "memory_limit" -v "8G"
conf_update_enable -c ${file_php_conf} -o "post_max_size" -v "8G"
conf_update_enable -c ${file_php_conf} -o "max_input_time" -v "3600"
conf_update_enable -c ${file_php_conf} -o "max_execution_time" -v "3600"
conf_update_enable -c ${file_php_conf} -o "output_buffering" -v "0"
conf_update_enable -c ${file_php_conf} -o "upload_tmp_dir" -v "/var/big_temp_file/"
mkdir -p /var/big_temp_file
chown $WWW_USER /var/big_temp_file
......@@ -5,6 +5,6 @@ echo "php: starting setup"
if [ ! -f "$file_php_conf" ]; then cp "${file_php_conf}-production" ${file_php_conf}; fi
echo "php: configure default values"
conf_update_enable ${file_php_conf} "memory_limit.*=" "512M"
conf_update_enable ${file_php_conf} "html_errors.*=" " On"
conf_update_enable ${file_php_conf} "mysqli.default_socket.*=" " ${file_mysql_sock}"
conf_update_enable -c ${file_php_conf} -o "memory_limit" -v "512M"
conf_update_enable -c ${file_php_conf} -o "html_errors" -v "On"
conf_update_enable -c ${file_php_conf} -o "mysqli.default_socket" -v "${file_mysql_sock}"
......@@ -28,10 +28,10 @@ sed -i .orig 's/^bind .*/bind 127.0.0.1/' ${file_redis_conf}
sed -i .orig 's/^port .*/port 0/' ${file_redis_conf}
#
# Enable Redis unix socket
conf_update_enable ${file_redis_conf} "unixsocket " "${file_redis_sock}"
conf_update_enable -c ${file_redis_conf} -o "unixsocket" -v "${file_redis_sock}" -a " "
#
# Grant permission to the socket to all members of the redis group
conf_update_enable ${file_redis_conf} "unixsocketperm " "770"
conf_update_enable -c ${file_redis_conf} -o "unixsocketperm" -v "770" -a " "
echo "redis: register redis in nextcloud"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment