Installing Opcache in Ubuntu 20.04 for Apache and Nginx
The guide below describes how to install Opcache on Ubuntu 20.04 with Apache or Nginx web server installed
We will do everything with the console in a few seconds.
We log into the console and release packages:
Sinstallation method for Apache
1 | apt-get update |
The next step is to install Opcache:
1 | apt-get install php-opcache -y |
The guide below describes how to install Opcache on Ubuntu
edit file
1 | nano /etc/php/7.4/apache2/php.ini |
and add at the end
1 2 3 4 | opcache.enable=1 opcache.memory_consumption=128 opcache.max_accelerated_files=3000 opcache.revalidate_freq=200 |
We are reloading the Apache server
1 | systemctl restart apache2 |
How to install Nginx
We update the repository
1 | apt-get update |
We install the opcache package
1 | apt-get install php-opcache php-fpm -y |
We're editing php.ini
1 | nano /etc/php/7.4/fpm/php.ini |
We add at the end:
1 2 3 4 | opcache.enable=1 opcache.memory_consumption=128 opcache.max_accelerated_files=3000 opcache.revalidate_freq=200 |
We restart the service:
1 | systemctl restart nginx |
1 | systemctl restart php7.4-fpm |
Related entries:
Installing the Minecraft server on the Debian system 10
Full configuration of BIND and DNS on the new server
Installing the OSA Studio 27.1 w Ubuntu 20.04, Ubuntu 21.04
The following tutorial describes how to install Snapd package manager on AlamaLinux 8
As in Ubuntu move to the bottom bar of the screen