For this example I am using a virtual server on Digital Ocean, where I’m currently hosting all my node projects. With the referral link, you will get 10$ of credit with Digital Ocean, which could make their smallest VPS plan run for two months 🙂
Installing the io.js binary instead of node.js
Log in to your server or do this on your local Ubuntu / Linux Mint or other distribution machine.
To install the binary of io.js, just hit the download button on the website and pick the right platform, in my case that would be linux-x64. I simply copy the url of the file to your clip board or run the code below:
wget https://iojs.org/dist/v1.0.2/iojs-v1.0.2-linux-x64.tar.gz tar zxf iojs-v1.0.2-linux-x64.tar.gz cd iojs-v1.0.2-linux-x64 cp bin/* /usr/bin
Line by line it does the following:
- download the file
- decompress the archive with the io.js binary
- change directory to the uncompressed files
- copy everything from the
Step 4 might vary based on your personal preference and your operating system. To check if you have io.js installed now, you can run
node -v. Basically what it does is that it copies the symlinks
node and the iojs executable to a path where they can be called as programs from any place in your terminal.
root@iojs:~/iojs-v1.0.2-linux-x64# node -v v1.0.2
If the version shows
v1.0.2 you probably did it just right.
Installing io.js with nvm, side by side with node.js
As this issue on the github repository of nvm shows, the developers are working on adding io.js support to nvm, so you will be able to install io.js in the future through nvm too.
In the future
nvm install iojs/1.0.2 will most likely be possible, but is not supported yet.
Installing io.js on Arch Linux
Since the io.js package is already in the Arch User Repositories, you can install it through:
yaourt -S iojs
for a more recent version, do:
yaourt -S iojs-git