Knowledgebase

How to install alt-php packages

To install Alt-PHP packages on a CloudLinux server, follow these steps:

  1. Access Alt-PHP Manager: Log in to your server's control panel (such as cPanel or Plesk) and navigate to the Alt-PHP Manager. This is where you can select and manage different PHP versions.

  2. Select Alt-PHP Version: Choose the Alt-PHP version for which you want to install additional packages. Make sure you're working with the correct PHP version.

  3. Access Shell (Terminal) or SSH: Open a terminal or connect to your server via SSH. This is where you'll execute the necessary commands.

  4. Update Package Lists: Before installing any package, it's a good practice to update the package lists to ensure you're getting the latest version. Run the following command:

    bash

 

  • yum update
  • Install Alt-PHP Packages: Use the yum package manager to install Alt-PHP packages. The packages are typically named in the format alt-phpXX-package_name, where XX represents the PHP version (e.g., alt-php73 for PHP 7.3).

    For example, if you want to install the php-mysqlnd package for PHP 7.3, you would use:

    bash
  • yum install alt-php73-php-mysqlnd

    Replace XX with the appropriate PHP version.

  • Verify Installation: After installation, you can verify that the package has been installed correctly by using the appropriate command for the specific package.

  • Integrate Package with Your PHP Application: Depending on the package, you'll need to integrate it into your PHP application. This might involve including it in your code or configuring it through specific settings.

  • Restart Web Server: After installing any packages, you'll likely need to restart your web server for the changes to take effect. Use one of the following commands based on your web server:

    For Apache:

    bash

 

sudo systemctl restart httpd

For Nginx with PHP-FPM:

bash
  1. sudo systemctl restart php-fpm sudo systemctl restart nginx

Please note that specific steps might vary depending on your server setup and the Alt-PHP version you're using. Always refer to the official CloudLinux or Alt-PHP documentation for any specific instructions related to their environment.

Additionally, make sure that you have the necessary permissions to install packages on your server, and that you're following best practices for security and system maintenance.

 
 
 
  • 0 Users Found This Useful
Was this answer helpful?