The default Alpine package manager can offer the php 81 package, so the installation will be quick and easy.
Prerequisites
- Alpine Linux
- sudo privileges
Install PHP 8.1 on Alpine Linux
Step 1. Update Alpine system packages.
sudo apk update
Step 2. Install PHP 8.1:
sudo apk add php81
Step 3. Verify installation.
php -v
Output:
PHP 8.1.20-r0
Conclusion
Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.