Loading...

- Views: 579
- Category: WHM
- Published at: 20 Nov, 2023
- Updated at: 21 Nov, 2023
Guide to Compile PHP with AVIF Support on AlmaLinux
Step 1: Install Development Tools and Libraries
- Log into Server: Access your server as the root user via SSH (if you are using the GoDaddy VPS, have the WHM installed and root access).
- Update System: Execute sudo yum update to update system packages.
- Install Development Tools: Use sudo yum group install "Development Tools" to install necessary compilers and tools.
Step 2: Install libavif
Install EPEL Repository:
sudo yum install epel-release
Install libavif: Execute
sudo yum install libavif-devel
Step 3: Download and Extract PHP Source from php.net
Download PHP Source:
wget http://www.php.net/distributions/php-8.1.0.tar.gz
Extract PHP:
tar -xvf php-8.1.0.tar.gz
Step 4: Now You Need to Compile PHP
Navigate to PHP Directory:
cd php-8.1.0
Prepare Build Environment:
./buildconf --force
Configure Build:
/configure --enable-gd --with-avif
Compile PHP:
make
Install PHP:
make install
Step 5: Verify AVIF Support
Check PHP Version:
php -v
Check AVIF Support:
php -i | grep AVIF
Step 6: Restart the Web Server or the VPS/Dedicated Server
Restart Server: If using Apache,
systemctl restart httpd
Important Notes
- This guide is essential. Your specific server or the OS may require additional adjustments.
- Always back up your server before starting this/every process.
- If you encounter issues, contact your hosting provider.
This process upgrades your server's PHP version to support the newer AVIF image format version, which enhances its capabilities and performance.
- Tag
- AVIF
- Compiled PHP
0 Comment(s)