CONTENTS
Lastmodified 2022-05-10 (火) 09:09:31
# portinstall www/nextcloud # portinstall graphics/ImageMagick-nox11
# cd /usr/local/etc/apache24/ # openssl genrsa -out server.key 2048 # openssl req -new -key server.key -out server.csr # openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt # chmod 0400 /usr/local/etc/apache24/server.*
# 以下の行のコメントを外す LoadModule socache_shmcb_module libexec/apache24/mod_socache_shmcb.so LoadModule ssl_module libexec/apache24/mod_ssl.so Include etc/apache24/extra/httpd-ssl.conf
<VirtualHost _default_:443> # General setup for the virtual host DocumentRoot "/usr/local/www/apache24/data" ServerName xxxx.smb.net:443 ServerAdmin xxxx@smb.net ErrorLog "/var/log/httpd-error.log" TransferLog "/var/log/httpd-access.log"
# apachectl restart
config.sample.php
/** * Where user files are stored. The SQLite database is also stored here, when * you use SQLite. * * Default to ``data/`` in the Nextcloud directory. */ 'datadirectory' => '/usr/local/www/nextcloudnextcloud/data',
# cp -rp /usr/local/www/nextcloud/data /usr/home/Nextcloud/ # chown -R www:www /usr/home/Nextcloud/data
'datadirectory' => '/usr/home/Nextcloud/data',
/usr/local/etc/php.ini
opcache.enable=1 opcache.enable_cli=1 opcache.interned_strings_buffer=8 opcache.max_accelerated_files=10000 opcache.memory_consumption=128 opcache.save_comments=1 opcache.revalidate_freq=1
/usr/local/etc/apache24/Includes/nextcloud.conf
Alias /nextcloud /usr/local/www/nextcloud AcceptPathInfo On <Directory /usr/local/www/nextcloud> AllowOverride All Require all granted Header set Strict-Transport-Security "max-age=15768000; includeSubDomains; preload" </Directory>
https://docs.nextcloud.com/server/12/admin_manual/configuration_server/caching_configuration.html
# portinstall databases/memcached # portinstall databases/pecl-memcache
memcached_enable="YES"
# portinstall devel/pecl-APCu [Reading data from pkg(8) ... - 405 packages found - done] ** Port marked as IGNORE: devel/pecl-APCu: cannot be installed: doesn't work with lang/php56 port (doesn't support PHP 5.6) ** Listing the failed packages (-:ignored / *:skipped / !:failed) - devel/pecl-APCu
# portinstall devel/pecl-APCu4
/usr/local/www/nextcloud/config/config.php
'memcache.local' => '\OC\Memcache\APCu',
「すべてのチェックに合格しました。」とでるが、サーバDBでは、エラーの嵐状態となる。
トランザクションファイルロックを使用してMemcacheを使用するには、Redisサーバーとそれに対応するPHPモジュールをインストールする必要があります。
# portinstall databases/redis
redis_enable="YES"
# portinstall databases/pecl-redis
'redis' => array( 'host' => 'localhost', 'port' => 6379, 'timeout' => 0.0, 'password' => '', // Optional, if not defined no password will be used. ),
https://wiki.archlinuxjp.org/index.php/Nextcloud
PHPのキャッシュを止めるとOK
/usr/local/etc/php.ini
;opcache.enable=1 ;opcache.enable_cli=1 ;opcache.interned_strings_buffer=8 ;opcache.max_accelerated_files=10000 ;opcache.memory_consumption=128 ;opcache.save_comments=1 ;opcache.revalidate_freq=1
結局RedisをセットしてPHPキャッシュを止めると、エラーも出なくなる。
https://help.nextcloud.com/t/file-is-locked-how-to-unlock/1883
https://www.iij.ad.jp/company/development/tech/activities/weighttp/
コマンドにスペースが含まれるとエラーする
# sysctl -w kern.ipc.somaxconn = 100000 kern.ipc.somaxconn: 128 sysctl: unknown oid '' sysctl: unknown oid '100000'
ので、こう
# sysctl -w kern.ipc.somaxconn=100000 kern.ipc.somaxconn: 128 -> 100000
ブート時にこの値になるよう設定するには、「/etc/sysctl.conf」に以下を書き加えます
kern.ipc.somaxconn=100000
/etc/sysctrl.conf
# https://pleiades.ucsc.edu/hyades/FreeBSD_Network_Tuning kern.maxfiles=6289573 kern.maxfilesperproc=6289573 #kern.maxvnodes=3339551
Sep 25 02:55:00 sun1 /usr/sbin/cron[75782]: (munin) CMD (/usr/local/bin/munin-cron) Sep 25 03:00:00 sun1 /usr/sbin/cron[76073]: (root) CMD (newsyslog) Sep 25 03:00:00 sun1 /usr/sbin/cron[76074]: (root) CMD (/usr/libexec/atrun) Sep 25 03:00:00 sun1 /usr/sbin/cron[76075]: (operator) CMD (/usr/libexec/save-entropy) Sep 25 03:00:00 sun1 /usr/sbin/cron[76076]: (munin) CMD (/usr/local/bin/munin-cron) Sep 25 03:01:00 sun1 /usr/sbin/cron[76365]: (root) CMD (adjkerntz -a) Sep 25 03:01:00 sun1 /usr/sbin/cron[76366]: (root) CMD (periodic daily) Sep 25 04:39:58 sun1 kernel: sonewconn: pcb 0xfffff80079f03ae0: Listen queue overflow: 193 already in queue awaiting acceptance (1 occurrences) Sep 25 04:41:03 sun1 kernel: sonewconn: pcb 0xfffff80079f03ae0: Listen queue overflow: 193 already in queue awaiting acceptance (8 occurrences) Sep 25 04:42:07 sun1 kernel: sonewconn: pcb 0xfffff80079f03ae0: Listen queue overflow: 193 already in queue awaiting acceptance (10 occurrences) Sep 25 04:43:11 sun1 kernel: sonewconn: pcb 0xfffff80079f03ae0: Listen queue overflow: 193 already in queue awaiting acceptance (3 occurrences) Sep 25 04:44:15 sun1 kernel: sonewconn: pcb 0xfffff80079f03ae0: Listen queue overflow: 193 already in queue awaiting acceptance (8 occurrences)
https://blog.tyk.nu/blog/fun-with-freebsd-listen-queue-overflow/
https://github.com/tmux/tmux/issues/352
https://wiki.archlinux.jp/index.php/Nextcloud#CSync_failed_to_find_a_specific_file.
Total access 5342:本日 1:昨日 0