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
Total access 5324:本日 1:昨日 2