Skip to content

Instantly share code, notes, and snippets.

@xwiz
Created September 15, 2022 23:16
Show Gist options
  • Save xwiz/d1644ade5d657df88e8328f0d9a250df to your computer and use it in GitHub Desktop.
Save xwiz/d1644ade5d657df88e8328f0d9a250df to your computer and use it in GitHub Desktop.

Revisions

  1. xwiz created this gist Sep 15, 2022.
    41 changes: 41 additions & 0 deletions setup.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,41 @@
    #install all necessary stuff

    wget https://php.hernandev.com/key/php-alpine.rsa.pub -O /etc/apk/keys/php-alpine.rsa.pub

    #if you encounter dns errors, replace php.hernandev with 50.116.12.38

    apk --update-cache add ca-certificates && \
    echo "https://php.hernandev.com/v3.15/php-8.1" >> /etc/apk/repositories

    apk add --update-cache php=8.1
    apk add php-phar=8.1
    apk add php-mbstring=8.1
    apk add php-iconv=8.1
    apk add php-openssl=8.1
    apk add php-curl=8.1
    apk add php-pdo_mysql=8.1
    apk add php-gettext=8.1
    apk add php-intl=8.1
    apk add php-sqlite3=8.1
    apk add php-posix=8.1
    apk add php-session=8.1
    apk add php-dev=8.1
    apk add php-dom=8.1
    apk add php-zlib=8.1

    ln -s /usr/bin/php /usr/bin/php8

    apk --update add autoconf gcc make g++ zlib-dev

    apk add openssl-dev pcre2-dev curl-dev

    pecl channel update pecl.php.net

    pecl install swoole
    #configure stuff

    apk add php-swoole=8.1

    php artisan octane:install

    php artisan octane:start