!#/usr/bin/env bash # mostly for setting up stuff with php and/or js-based stacks # add caddy repos apt install -y debian-keyring debian-archive-keyring apt-transport-https curl curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list chmod o+r /usr/share/keyrings/caddy-stable-archive-keyring.gpg chmod o+r /etc/apt/sources.list.d/caddy-stable.list #update apt repo list apt update # apt installs apt install caddy apt install php8.4-fpm apt install unzip apt install git apt -y install podman apt install mariadb-server apt install sqlite apt install gcc apt install make apt install clang apt install pkg-config # secure mysql mysql_secure_installation # install fav editor wget https://github.com/curlpipe/ox/releases/download/0.7.7/ox_0.7.7-1_amd64.deb dpkg -i ox_0.7.7-1_amd64.deb rm ox_0.7.7-1_amd64.deb # setup zsh + omz apt install zsh sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" # replace .zshrc with custom config ~/.zshrc < EOF export PATH=$HOME/bin:/usr/local/bin:$PATH export ZSH="/Users/zhanchi/.oh-my-zsh" ZSH_THEME="duellj" plugins=(git gnu-utils zsh-syntax-highlighting zsh-autosuggestions command-not-found composer colored-man-pages perl rust themes wp-cli colored-man-pages deno dotenv iterm2 timer) source $ZSH/oh-my-zsh.sh export EDITOR='ox' alias zshconfig="mate ~/.zshrc" alias ohmyzsh="mate ~/.oh-my-zsh" EOF # install bun curl -fsSL https://bun.sh/install | bash # install rust toolchain curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh # install composer php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" php -r "if (hash_file('sha384', 'composer-setup.php') === 'ed0feb545ba87161262f2d45a633e34f591ebb3381f2e0063c345ebea4d228dd0043083717770234ec00c5a9f9593792') { echo 'Installer verified'.PHP_EOL; } else { echo 'Installer corrupt'.PHP_EOL; unlink('composer-setup.php'); exit(1); }" php composer-setup.php php -r "unlink('composer-setup.php');" mv composer.phar /usr/local/bin/composer # setup services systemctl stop apache2 systemctl disable apache2 systemctl enable caddy # don't start it yet tho because we don't have servers set up