Created
May 18, 2022 09:47
-
-
Save amanjuman/2fd379ed66d8625e36b2ba52fc63626a to your computer and use it in GitHub Desktop.
Installing the PHP-APCU for RunCloud Linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Install Tools | |
sudo apt install autoconf libpcre3-dev -y | |
## Define Module Name and Version | |
MODULE_NAME="apcu" | |
MODULE_VERSION="5.1.21" | |
## Download and Unzip Extensions | |
wget https://pecl.php.net/get/$MODULE_NAME-$MODULE_VERSION.tgz | |
tar -zxvf $MODULE_NAME-$MODULE_VERSION.tgz | |
## Enter source Directory | |
cd $MODULE_NAME-$MODULE_VERSION | |
# Set PHP version | |
PHPRC_VERSION="php74rc" | |
## Build Extension | |
/RunCloud/Packages/$PHPRC_VERSION/bin/phpize --clean | |
/RunCloud/Packages/$PHPRC_VERSION/bin/phpize | |
./configure --with-php-config=/RunCloud/Packages/$PHPRC_VERSION/bin/php-config | |
make -j$(nproc) | |
sudo make install | |
## Add Extension into PHP ini | |
echo "extension=$MODULE_NAME.so" | sudo tee /etc/$PHPRC_VERSION/conf.d/$MODULE_NAME.ini | |
## Restart PHP FPM | |
sudo systemctl reload $PHPRC_VERSION-fpm | |
## Check Extension | |
/RunCloud/Packages/$PHPRC_VERSION/bin/php -m | grep apcu | |
## Credit | |
## https://harry.plus/blog/install-apcu-php-extension-on-runcloud/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment