How to use PHP Binaries PHP 7.x on AlmaLinux 10

Published: 2026-05-17
Google AdSense 广告位 (待申请通过后开启)

Introduction

Linux Multi-version PHP Binaries (7.1-8.5)

These are multiple PHP binary executables that require no further compilation. Future extensions can be easily implemented directly within these binaries, making them extremely convenient.

https://github.com/pixel-jey/php-binaries

After cloning with git,

you can directly use command-line decompression.

Download and Deploy

git clone https://github.com/pixel-jey/php-binaries
sudo unzip php*
sudo \cp -r usr/* /

INSTALL OpenSSL

# install openssl-1.1.1i

yum install perl perl-FindBin
wget https://www.openssl.org/source/openssl-1.1.1i.tar.gz

tar xzf openssl-1.1.1i.tar.gz

cd openssl-1.1.1i

./Configure --prefix=/usr/local/openssl/openssl-1.1.1i/bin -fPIC -shared linux-x86_64

make -j 8

make install

export PKG_CONFIG_PATH=/usr/local/openssl/openssl-1.1.1i/bin/lib/pkgconfig

#If the shared library cannot be recognized here, add a symbolic link.

error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory

ln -s /usr/local/openssl/openssl-1.1.1i/bin/lib/libssl.so.1.1 /usr/lib64/

ln -s /usr/local/openssl/openssl-1.1.1i/bin/lib/libcrypto.so.1.1 /usr/lib64/

Testing OpenSSL

If OpenSSL is not installed,

INSTALL OpenSSL

# install openssl-1.1.1i See here for detailed installation instructions.

ll /usr/local/openssl/openssl-1.1.1i/bin/lib/pkgconfig
echo "/usr/local/openssl/openssl-1.1.1i/bin/lib" | sudo tee /etc/ld.so.conf.d/openssl-1.1.1i.conf
sudo ldconfig -v | grep libssl #openssl

If you haven't installed it, open the `install-openssl` file and follow the steps above; it's very simple.

Currently, it provides...

ls /usr/local/
php7.1/ php7.4/ php8.1/ php8.5/

These four versions are generally sufficient. Since the differences between the versions aren't significant, there's no need to compile them all; they're enough for daily development needs.

Know More

Future versions will depend on the situation; if there are significant version updates, we'll move to

https://github.com/pixel-jey/php-binaries/releases/tag/v1.0.0 You can download them directly from here.

The content is brief, but in reality, compiling such a system with numerous dependencies is no easy task. Previously, it was possible to compile across multiple versions directly on Red Hat 9.0, but this is no longer possible on Alma 10 due to version upgrades and the inclusion of various underlying dependencies like OpenSSL.

Python dependencies no longer support compilation with PHP 7. It's now almost impossible to compile multiple lower versions of dependencies on a brand new Alma 10 or Red Hat 10 system; you have to start by compiling lower versions and then upgrade to higher versions.

Related AlmaLinux 10 Tutorials

How to Install Mysql on AlmaLinux 10

How to Compile Install PHP on AlmaLinux 10

Explore More

Technology Guides →

How to Compile Install PHP 7.x on AlmaLinux 10

How to install rabbitmq on PHP 7.x

PHP opcache.max_accelerated_files Explained: Configuration, Performance, and Best Practices

PHP opcache.validate_timestamps Explained: Configuration, Code Updates, and Best Practices

Southeast Asia Insights →