To upgrade PHP on CentOS Web Server, you can follow these steps:
- Login to your server as root user via SSH.
- Run the following command to update the system's packages yum update
- Install the Remi repository, which provides updated versions of PHP for CentOS:
yum install -y https://rpms.remirepo.net/enterprise/remi-release-7.rpm
Note: Replace 7 with your CentOS version if you are using a different version.
- Once the Remi repository is installed, enable the PHP 7.x repository by running:
yum-config-manager --enable remi-php7
- Now, you can install the latest version of PHP 7 by running:
yum install -y php
6. Verify that the new version of PHP has been installed by running:
php -v
This will display the installed version of PHP on your system.
- Restart the web server to apply the changes by running:
service httpd restart
That's it! Your Cent OS server should now be running the latest version of PHP
Comments
Post a Comment