Line 304: |
Line 304: |
| | | |
| ===Memory Caching=== | | ===Memory Caching=== |
− | For improved performance, use of a memory cache for compiled PHP code and data is recommended. As of version 8.1, ownCloud will complain on the Admin page if you don't have this configured. ownCloud supports a number of cache backends, but the easiest to configure is said to be APCu. To configure this, you'll need to install the PHP extension, and activate it in your config.php file. To install the extension, run the following command: | + | For improved performance, use of a memory cache for compiled PHP code and data is recommended. As of version 8.1, ownCloud will complain on the Admin page if you don't have this configured. Also, as of version 8.2, ownCloud implements transactional file locking, and it's preferred that this be managed with a memory cache as well. The only suitable memory cache system to support file locking is [http://redis.io/ Redis]. |
| + | |
| + | ====Redis==== |
| + | You'll need to install Redis, as well as its associated PHP module, configure your system to start Redis on startup, and change some configuration settings for both Redis and ownCloud. |
| + | |
| + | To install Redis, you'll need to have both the [[Remi]] and [[Epel]] repositories set up on your server. Then do |
| + | # yum --enablerepo=remi,epel install redis php54-php-pecl-redis php55-php-pecl-redis php56-php-pecl-redis |
| + | # ln -s /etc/rc.d/init.d/redis /etc/rc.d/rc4.d/S80redis |
| + | |
| + | You'll need to adjust two entries in the Redis configuration file: |
| + | # nano -w /etc/redis.conf |
| + | |
| + | Find the line that mentions "unixsocket", uncomment it and the following line, and edit them to appear as follows: |
| + | unixsocket /var/run/redis/redis.sock |
| + | unixsocketperm 777 |
| + | |
| + | Then start the redis server: |
| + | # /etc/rc.d/init.d/redis start |
| + | |
| + | You'll now need to edit the ownCloud config file: |
| + | # nano -w ~owncloud/../html/config/config.php |
| + | |
| + | Add the following lines: |
| + | 'filelocking.enabled' => 'true', |
| + | 'memcache.locking' => '\OC\Memcache\Redis', |
| + | 'memcache.local' => '\OC\Memcache\Redis', |
| + | 'redis' => array( |
| + | 'host' => '/var/run/redis/redis.sock', |
| + | 'port' => 0, |
| + | 'timeout' => 0.0, |
| + | ), |
| + | |
| + | Save the file and exit nano. You should now be able to log in to your ownCloud installation as the admin user, and not see a warning message about memory cache or file locking. |
| + | |
| + | ====APCu==== |
| + | If you don't want to use the memory cache for file locking, ownCloud supports a number of other cache backends, but the easiest to configure is said to be APCu. To configure this, you'll need to install the PHP extension, and activate it in your config.php file. To install the extension, run the following command: |
| # yum --enablerepo=remi install php54-php-pecl-apcu php55-php-pecl-apcu php56-php-pecl-apcu | | # yum --enablerepo=remi install php54-php-pecl-apcu php55-php-pecl-apcu php56-php-pecl-apcu |
| | | |