php-compile.sh 776 B

12345678910111213141516171819202122232425262728
  1. #!/bin/bash
  2. MAIN_DIR=$(pwd)
  3. # Install dependencies
  4. sudo apt-get update -y
  5. sudo apt-get install libzip-dev libonig-dev openssl zip unzip git ibgmp-dev gmp-dev libcurl4-openssl-dev libsqlite3-dev libxml2-dev pkg-config build-essential dpkg-dev debhelper autotools-dev libgeoip-dev libssl-dev libpcre3-dev zlib1g-dev -y
  6. # Download PHP source
  7. wget http://de2.php.net/distributions/php-8.2.0.tar.gz
  8. tar -zxvf php-8.2.0.tar.gz
  9. cd php-8.2.0
  10. # Configure PHP
  11. sudo ./configure --prefix=/usr/local/phyre/php \
  12. --with-libdir=lib/$(arch)-linux-gnu \
  13. --enable-fpm --with-fpm-user=admin --with-fpm-group=admin \
  14. --with-openssl \
  15. --with-mysqli \
  16. --with-gettext \
  17. --with-curl \
  18. --with-zip \
  19. --enable-mbstring
  20. # Compile PHP
  21. sudo make
  22. sudo make install