Issue
How to install or disable Hardened PHP on Imunify360?
Environment
- Imunify360
- HardenedPHP
- CentOS
- Ubuntu/Plesk
Solution
Installation
1. To check if HardenedPHP is already installed, run the command below:
imunify360-agent features status hardened-php
2. To install it via the UI, follow this documentation.
3. To install it via the CLI, run the following command:
imunify360-agent features install hardened-php
Disabling
If you want to disable it, use the instructions from the documentation (UI) or run this command in the CLI:
imunify360-agent features remove hardened-php
- In case of CloudLinux is installed – you can manage it in "CloudLinux Manager - Selector"
- If Imunify360 was uninstalled on your server, but the server has Hardened packages left, downgrade such packages using "yum downgrade ea..."
Hardened Repos
- The HardenedPHP feature requires a registered Imunify360. Upon the registration, an additional repo is created:
cat /etc/yum.repos.d/imunify360-alt-php.repo
[imunify360-alt-php]
name=Imunify360 alt-php repository for CentOS $releasever - $basearch
baseurl=https://repo.alt.cloudlinux.com/el/<accesstokern>/alt-php/$releasever/updates/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://repo.alt.cloudlinux.com/el/alt-php/install/centos/RPM-GPG-KEY-CloudLinux
- For Plesk on Ubuntu, if PHP Handlers are not installed with the meta-packages, an alt-php-config can be used as a workaround:
apt install alt-php-config
python3 /opt/alt/alt-php-config/alt-php-panel-configuration.py --mode=install --verbose
plesk bin php_handler --list | grep alt-php
Useful links
Comments
0 comments
Please sign in to leave a comment.