Skip to content

Instantly share code, notes, and snippets.

@siriokun
Last active March 17, 2023 09:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save siriokun/29ff5d75c9761631b7c0a25bb67dfa52 to your computer and use it in GitHub Desktop.
Save siriokun/29ff5d75c9761631b7c0a25bb67dfa52 to your computer and use it in GitHub Desktop.
New Linux Setup
  1. Setup Docker
sudo apt-get update
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh

Run post-install step: https://docs.docker.com/engine/install/linux-postinstall/

  1. Setup Brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Follow instruction after install

  1. Container Setup:
brew install git node
brew install colima php composer
  1. Setup GIT:
git config --global user.name "Your Name"
git config --global user.email "email@gmail.com"
ssh-keygen -t ed25519 -C "email@gmail.com"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
cat ~/.ssh/id_ed25519.pub
  1. Setup DDEV:
brew install drud/ddev/ddev
sudo apt install libnss3-tools
mkcert -install
  1. Setup NVM (optional):
brew install nvm

Follow instruction after install

  1. Setup Platform (optional):
brew install platformsh/tap/platformsh-cli
@siriokun
Copy link
Author

siriokun commented Feb 1, 2023

Upgrade example:

brew upgrade platformsh-cli

@siriokun
Copy link
Author

siriokun commented Feb 2, 2023

Follow instruction after install NVM:

  1. You should create NVM's working directory if it doesn't exist:
mkdir ~/.nvm
  1. Add the following to ~/.zshrc or your desired shell configuration file:
export NVM_DIR="$HOME/.nvm"
[ -s "/usr/local/opt/nvm/nvm.sh" ] && \. "/usr/local/opt/nvm/nvm.sh"  # This loads nvm
[ -s "/usr/local/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/usr/local/opt/nvm/etc/bash_completion.d/nvm"  # This loads nvm bash_completion

@siriokun
Copy link
Author

To run Docker as a non-privileged user, consider setting up the
Docker daemon in rootless mode for your user:

dockerd-rootless-setuptool.sh install

Visit https://docs.docker.com/go/rootless/ to learn about rootless mode.

To run the Docker daemon as a fully privileged service, but granting non-root
users access, refer to https://docs.docker.com/go/daemon-access/

WARNING: Access to the remote API on a privileged Docker daemon is equivalent
to root access on the host. Refer to the 'Docker daemon attack surface'
documentation for details: https://docs.docker.com/go/attack-surface/

@siriokun
Copy link
Author

The php.ini and php-fpm.ini file can be found in:
/home/linuxbrew/.linuxbrew/etc/php/8.1/

@siriokun
Copy link
Author

sudo systemctl enable docker.service
sudo systemctl enable containerd.service

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment