en fait pas www-data node dans son folder
This commit is contained in:
parent
77c655e412
commit
ffb7cb6372
16
install.sh
16
install.sh
|
@ -192,17 +192,19 @@ read answer
|
||||||
if [[ "$answer" == "y" ]]; then
|
if [[ "$answer" == "y" ]]; then
|
||||||
touch /var/www/.bashrc
|
touch /var/www/.bashrc
|
||||||
chown www-data:www-data /var/www/.bashrc
|
chown www-data:www-data /var/www/.bashrc
|
||||||
mkdir /var/www/node
|
mkdir /var/www/.nvm
|
||||||
chown www-data:www-data /var/www/node
|
chown www-data:www-data /var/www/.nvm
|
||||||
|
mkdir /var/www/.npm
|
||||||
|
chown www-data:www-data /var/www/.npm
|
||||||
|
|
||||||
su -s /bin/bash -c 'curl -o /var/www/node/install.sh https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash &&\
|
su -s /bin/bash -c 'curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash &&\
|
||||||
export NVM_DIR="$HOME/node/.nvm" &&\
|
export NVM_DIR="$HOME/.nvm" &&\
|
||||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" &&\
|
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" &&\
|
||||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" &&\
|
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" &&\
|
||||||
nvm install v18' www-data
|
nvm install v18' www-data
|
||||||
ln -sf /var/www/node/.nvm/versions/node/v18.19.1/bin/node /usr/bin/node
|
ln -sf /var/www/.nvm/versions/node/v18.19.1/bin/node /usr/bin/node
|
||||||
ln -sf /var/www/node/.nvm/versions/node/v18.19.1/bin/npm /usr/bin/npm
|
ln -sf /var/www/.nvm/versions/node/v18.19.1/bin/npm /usr/bin/npm
|
||||||
ln -sf /var/www/node/.nvm/versions/node/v18.19.1/bin/npx /usr/bin/npx
|
ln -sf /var/www/.nvm/versions/node/v18.19.1/bin/npx /usr/bin/npx
|
||||||
|
|
||||||
echo -e "${PURPLE}${BOLD}Node installed${RESET}";
|
echo -e "${PURPLE}${BOLD}Node installed${RESET}";
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue