Note: This document has not yet been revised.
Git. To install using:
apt-get install gitpacman -S gitNote: If you’re using Node 5.x and NPM 3.x, the build process will crash, further Information under [[Troubleshooting]] or Issue #218
After you installed the prerequisites just clone the repository
$ git clone https://github.com/NodeOS/NodeOS.git
Once you’ve installed the prerequisites you need the dependencies for Debian/Ubuntu using apt-get. First you need to update your cache. To do so run
$ dpkg --add-architecture i386
$ apt-get -qq -y update
Then you install the dependencies listed below
apt-get -qq -y gcc g++ realpath texinfoapt-get -qq -y bc libpixman-1-devapt-get -qq -y genisoimage libuuid:i386apt-get -qq -y autoconf automakeapt-get -qq -y libsdl1.2-devOr as a one liner:
$ apt-get -qq -y gcc g++ realpath texinfo bc libpixman-1-dev genisoimage libuuid:i386 autoconf automake libsdl1.2-dev
Or just run if you’re outside the folder
$ cd NodeOS/
$ bin/install-debian-deps
Once you have installed the prerequisites you need the dependencies for Arch Linux
pacman -S gcc texinfo python2pacman -S bc pixman lib32-pixmanpacman -S cdrkitpacman -S cpiopacman -S autoconf automakepacman -S sdlNote: The initramfs dependencies are not shipped with the installation of Arch Linux thats why we need to install them on Arch Linux
Or as one liner:
$ pacman -S gcc texinfo python2 bc pixman lib32-pixman cdrkit cpio autoconf automake sdl
Or just run if you’re outside the folder
$ cd NodeOS/
$ bin/install-arch-deps
Once you’ve installed the correct dependencies for your operating system you can start with the installation of NodeOS.
Note: If you have Arch Linux you need to set python2 as default binary when you run python. Because the standard python binary is python3 and nodegyp doesn’t uses it. To do this, run following commands:
$ cd /usr/bin
$ ln -sf python2 python
The next step is to install the npm dependencies and the bundled dependencies to do this run following command:
$ npm install
If you want to change the target platform to build NodeOS for, just prepend the PLATFORM argument before npm install. Example (NodeOS for QEMU 32bit):
$ PLATFORM=qemu_32 npm install
or
$ PLATFORM=docker npm install
Now it should install correctly. This process can take some time, so pick some microwave pop-corn and go to see a movie. No, really… do it.
Now you can run your fresh build with:
$ npm start
If NodeOS does not boot into the REPL, unless you wanted that, then everything was compiled correctly. If not look under [[Troubleshooting]]
After NodeOS has booted up you should see something like:
Hello! I'm a user init script :-)
Now you’re prompted to enter your username and password. By default, the username and password is nodeos and cannot be changed without altering code.
$ username: nodeos
$ password: nodeos
Note: This is not permanent on later versions this will be changed