CONTENTS
#contents
----
Lastmodified &lastmod;
----
*Nextcloud [#ta2c5edf]

  # portinstall www/nextcloud
  # portinstall graphics/ImageMagick-nox11

*SSL [#h0b3e968]

 # 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.*

** edit usr/local/etc/apache24/httpd.conf [#z28c0383]

 # 以下の行のコメントを外す
 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
 

** edit httpd-ssl.conf [#e75900cb]

 <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


*post install settings [#s87c3949]

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',

** G7 [#baf5524a]

 # 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>

** Memorycache [#be104aa0]

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.local' => '\OC\Memcache\APCu',

// 'memcache.local' => '\OC\Memcache\APCu',




** File locking [#pebe294c]

https://docs.nextcloud.com/server/12/admin_manual/configuration_files/files_locking_transactional.html?highlight=lock

トランザクションファイルロックを使用して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.
       ),


* ファイルをアップロードすると 'Integrity constraint violation...' エラーが表示される [#cbf41a70]

https://wiki.archlinuxjp.org/index.php/Nextcloud

https://wiki.archlinuxjp.org/index.php/Nextcloud#.E3.83.95.E3.82.A1.E3.82.A4.E3.83.AB.E3.82.92.E3.82.A2.E3.83.83.E3.83.97.E3.83.AD.E3.83.BC.E3.83.89.E3.81.99.E3.82.8B.E3.81.A8_.27Integrity_constraint_violation....27_.E3.82.A8.E3.83.A9.E3.83.BC.E3.81.8C.E8.A1.A8.E7.A4.BA.E3.81.95.E3.82.8C.E3.82.8B

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キャッシュを止めると、エラーも出なくなる。

* ファイルロックを解除する [#k3d1dd4b]

https://help.nextcloud.com/t/file-is-locked-how-to-unlock/1883


* フォルダに65356個以上のファイルがあるとエラーする件  [#y747d4d0]

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

*AM3 ごろのエラーの件 [#d7c06fa5]

/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 &counter(total);:本日 &counter(today);:昨日 &counter(yesterday);
#counter([total|today|yesterday]);


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS