Skip to content

Instantly share code, notes, and snippets.

@asilbalaban
Last active July 20, 2022 05:44
Show Gist options
  • Save asilbalaban/6433504b6051c3e6674c5b37789a2394 to your computer and use it in GitHub Desktop.
Save asilbalaban/6433504b6051c3e6674c5b37789a2394 to your computer and use it in GitHub Desktop.
www-data ile node çalıştırmak için nvm npm kurulumu
cd /var/www/
sudo mkdir .nvm
sudo mkdir .npm
sudo chown www-data -R .nvm/ .npm/
cd ~
sudo su -s /bin/bash www-data
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash

root'a dön

sudo nano /etc/bash.bashrc

en alta ekle

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm

kurulumu gözden geçir

sudo su -s /bin/bash www-data
nvm --version
which node
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment