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 Opera on Ubuntu systems / Debian / Linux Mint
Sublime Text - code editor for webmaster. Installation in Ubuntu
gconf-service gconf-service-backend gconf2-common libappindicator1 libc++1 libc++1-9 libc++abi1-9 libdbusmenu-gtk4 libgail-common libgail18 libgconf-2-4 libgtk2.0-0 libgtk2.0-bin libgtk2.0-commonAll-in-one voice and text chat for gamers
All-in-one voice and text chat for gamers that's free 20.04
How to change the background color / Ubuntu login screen wallpaper 21.10
Checking the installed version of Gnome on Linux





