Server runs on OSX, BSD and Linux (also Windows if you have Cygwin)
Make sure you have these dependencies installed
- GNU Make
- nodejs and npm
- Optional: Git for the automated installer
- Optional: java to compress/minimize sources
You can also use PHP with or without a CGI webserver (Like Apache or Lighttpd)
Simply run curl -sS http://andersevenrud.github.io/OS.js-v2/installer | sh
This only requires a few simple steps
# Clone repository
git pull https://github.com/andersevenrud/OS.js-v2.git
cd OS.js-v2
# Or alternatively download the latest zip
#wget https://github.com/andersevenrud/OS.js-v2/archive/master.zip
#unzip master.zip
#cd OS.js-v2-master
# Install node.js packages
npm install
# Build OS.js
make
Make sure the VFS directories in vfs/
are given the correct web-server permissions to make filesystem work properly.
Example for Apache on Ubuntu: sudo chown -R www-data:www-data vfs/
See doc/apache.conf
for an example
Or run ./obt apache-vhost
to generate one
Note You have to enable mod_rewrite for Apache and make sure htaccess is allowed.
See doc/lighttpd.conf
for an example
Or run ./obt lighttpd-config
to generate one
This is mostly used for debugging and testing purposes (PHP 5.4+)
- Production dist:
(cd dist; php -S localhost:8000 ../src/server-php/server.php)
- Developer dist:
(cd dist-dev; php -S localhost:8000 ../src/server-php/server.php)
- Production dist:
node src/server-node/server.js
- Developer dist:
node src/server-node/server.js dist-dev