NodeJS
-
cd /usr/local
-
wget https://npm.taobao.org/mirrors/node/v10.15.3/node-v10.15.3-linux-x64.tar.xz
-
xz -d node-v10.15.3-linux-x64.tar.xz
-
tar -xvf node-v10.15.3-linux-x64.tar
-
rm -rf node-v10.15.3-linux-x64.tar
-
mv node-v10.15.3-linux-x64 node
-
Make globally available (make node and npm commands available throughout the system)
- Configure environment variables (recommended)
- Edit the
/etc/profile
file, at the end of file add the following
export PATH=$PATH:/usr/local/node/bin
- After exiting edit mode, execute the following command
source /etc/profile
- Edit the
- Configure soft links
- Configure environment variables (recommended)
ln -s /usr/local/node/bin/node /usr/local/bin
ln -s /usr/local/node/bin/npm /usr/local/bin
ln -s /usr/local/node/bin/npx /usr/local/bin
yarn
- Add yum source
curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
- installation
yum install yarn