In my previous post could you read about the performance of PHP-fpm vs Apache. In this post, I will tell you how you can upgrade to PHP-fpm on an existing server with Apache. To make it easier, I wrote a script for centos 6.7.
- First install PHP-FPM with the Vesta config files.
- Edit the Vesta config file.
- Edit vesta domain config files (templates).
- Remove existing config files (/home/username/conf/web/)
- Rebuild users
- Remove apache
Tip: First take backups of your configuration files!
After the upgrade, I noticed that PHP version has been decreased from 5.4 to 5.3. phpMyAdmin and RoundCube also stopped working. I have PHP upgraded to 5.6 and reinstalled phpMyAdmin and RoundCube.
The script can be downloaded here:
Or run as root:
wget “http://www.tpweb.org/?smd_process_download=1&download_id=125” -O script.sh
After the upgrade, you need to log out to you admin panel. Also, all the templates are replaced with the default.
rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
yum install yum-plugin-replace
yum replace php-common –replace-with=php56w-common
and reinstall phpmyadmin and roundcube
wget “http://www.tpweb.org/?smd_process_download=1&download_id=164” -O upgarde.sh
Attention! This does not always work correctly. There may be a lot of bugs. Run at your risk. First take backups !!