There are multiple ways to update a Linux box.
One way is to use the package manager that shipped with Ubuntu. This method is good for a system that doesn't already have node installed and for a person who wants to spend minimal effort on keeping Node up to date.
The command to install Node 6 would be
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
The command for Node 7 would be
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
sudo apt-get install -y nodejs
If Node is already installed then the latest release can be installed with
sudo n latest
The stable version can be installed with
sudo n stable
I am going to give nvm a try for installing the latest version of Node.
I will start by installing nvm with the command
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash
Then use the following command find the latest version of Node
nvm ls-remote
Once I determined which version I wanted to install, I ran the command
nvm install v7.4.0
No comments:
Post a Comment