diff --git a/bin/wsl-init b/bin/wsl-init index 43540eb15..b8c1c426e 100644 --- a/bin/wsl-init +++ b/bin/wsl-init @@ -4,7 +4,7 @@ # sudo ./bin/homestead/wsl-init # ################################## export DEBIAN_FRONTEND=noninteractive -export NODE_VERSION="20" +export NODE_MAJOR="20" export PHP_VERSION="8.1" echo "What is your WSL user name?" @@ -29,13 +29,19 @@ apt-get install -y software-properties-common curl apt-add-repository ppa:ondrej/php -y apt-add-repository ppa:chris-lea/redis-server -y # NodeJS -curl -fsSL https://deb.nodesource.com/setup_$NODE_VERSION.x | sudo -E bash - +apt-get update +apt-get install -y ca-certificates curl gnupg +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list +apt-get update +apt-get install nodejs -y # PostgreSQL tee /etc/apt/sources.list.d/pgdg.list <> /etc/php/$PHP_VERSION/mods-available/opcache.in echo "opcache.revalidate_freq = 0" >> /etc/php/$PHP_VERSION/mods-available/opcache.ini # Disable XDebug On The CLI -sudo phpdismod -s cli xdebug +phpdismod -s cli xdebug # Set The Nginx & PHP-FPM User sed -i "s/user www-data;/user $WSL_USER_NAME;/" /etc/nginx/nginx.conf @@ -168,7 +174,7 @@ rm -rf /var/log/mysql rm -rf /etc/mysql # Add Maria PPA -curl -LsS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash +curl -LsS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | bash echo "mariadb-server mysql-server/data-dir select ''" | debconf-set-selections echo "mariadb-server mysql-server/root_password password secret" | debconf-set-selections @@ -230,7 +236,7 @@ service redis-server start wget --quiet -O /usr/local/bin/mailhog https://github.com/mailhog/MailHog/releases/download/v0.2.1/MailHog_linux_amd64 chmod +x /usr/local/bin/mailhog -sudo tee /etc/systemd/system/mailhog.service <