Fail to install PHP-FPM 7.1 - 7.4
-
![Hello Sandeep,
I have been trying to install and enable PHP-FPM from version 7.1 to 7.4, but it has not been impossible, I have a fresh install with the CWPPro licence, how could you illustrate me how to do it, I already tried the guide to install 7.3 and 7.4 manually, but it wasn't possible either, I don't know if I'm missing a step before I try to configure them.
I'll appreciate your comments.]
-
@jesu-villawolf hi
provide log for php rebuild without it its impossible to say whats wrong. When you run the php build from cwp it creates log in /var/log location. -
@sandeep Thanks for the implicit answer, you said it all, the file /var/log/php-selector-rebuild.log
This file had a line regarding "virtual memory exhausted: Cannot allocate memory", it seem that between the OS, CWP procecess and the PHP COMPILE, the memory was not enought. I forgot to tell you I have a basic AWS Instance from Lightsail 1GB Ram, 1 CPU and 40GB SSD.
What I did was to make a swap file to help out the memory, and this is how I did it...
swapon --show # Shows your swap sudo dd if=/dev/zero of=/swap bs=1024 count=1M # Create a file with a size of 1G/swap sudo chmod 600 /swap # Make file only accessible by root user, suggested only sudo mkswap /swap # Will use the file /swap as your swap space sudo swapon /swap # Enables the file /swap files for paging and swapping sudo echo "/swap swap swap sw 0 0" >> /etc/fstab # Creates an entry for the new swap file to be persistant on boot sudo reboot swapon --show # Check your swap once again, it should be there
Well i really got it from here [https://www.programmersought.com/article/9813273613/](link url)
Here is the result:Everything is working like a charm.
PS (I did all this in a test server, don't do it on a production server, it will freeze it for like 3 hours)
Thnaks once again @sandeep, I'll be back...!!
-
@jesu-villawolf said in Fail to install PHP-FPM 7.1 - 7.4:
One more thiong @Sandeep is it ok to have a swap file for a CWP Web server? It worked for me in order to compile, but for the webserver??
Thanks in advance.
-
@jesu-villawolf
here is the guide for creating swap.
https://www.mysterydata.com/create-and-add-swap-on-linux-os-cwp-centos-webpanel-and-vesta-cp/swap doesn't harm anything ensure your disk read/write speed is above 100mbps for optimal performance all things will work like normal.