Skip to content

Latest commit

 

History

History
169 lines (105 loc) · 4.73 KB

INSTALL.md

File metadata and controls

169 lines (105 loc) · 4.73 KB

Installation instructions

Server runs on Linux, OS X, BSD and Windows.

Installation is done in a few simple steps and only takes a minute to get running.

For more general information look at the README file or in the official documentation.

I have also made a simplified installation guide so you don't have to read this entire thing.

Table of Contents

Dependencies

You just need node and npm. Install them with your package manager or download the official installer.

Debian\Ubuntu: Also install package nodejs-legacy.

Installation

To easily apply updates and other changes, I recommend using git to download instead of using a zip-file/automated installer.

If you install npm packages without --production parameter, you need to install mocha sudo npm install -g mocha

NIX

Automated

Run curl -sS http://os.js.org/installer | sh.

Manual

$ sudo npm install -g grunt-cli

# You can also download and extarct the latest zip
$ git clone https://github.com/os-js/OS.js.git
$ cd OS.js
$ npm install --production
$ grunt

Windows

Automated

Download and run http://os.js.org/installer.exe.

Manual

Official video instruction on YouTube

Run cmd as Administrator (important)!

$ npm install -g grunt-cli

# You can also download and extarct the latest zip
$ git clone https://github.com/os-js/OS.js.git
$ cd OS.js
$ npm install --production

# This is required to make the Development Environment work, but is optional.
$ bin\create-windows-symlinks

$ grunt --force

Containers and Virtual Machines

Vagrant

See Vagrant.md.

Docker

See Docker.md.

NW.js

See NW.md.

X11

See X11.md.

Running

If you built OS.js using a container (above) you can skip this.

Make sure the VFS directories in vfs/ are given the same permissions as the web-servers running user.

After you have started a server, simply navigate to http://localhost:8000 (port 8000 is default).

Node

Node is the prefered server for OS.js.

Production (dist)

./bin/start-dist.sh` or `bin\win-start-dist

Development (dist-dev)

./bin/start-dev.sh` or `bin\win-start-dev

You can install node supervisor and the development (dist-dev) server will automatically reload on change.

PHP5

You can start a server manually with (cd dist; php -S 0.0.0.0:8000 ../src/server/php/server.php) or look below for webserver alternatives.

If you have a "webhost" (or "webhotel") with ex. cPanel without shell access (or no node support), you can run OS.js, but has to be built on another computer, then transfered over to the target machine. The only downside here is that you'd have to run from /OS.js/dist/ without doing modifications to the setup (if you don't have access to mod_rewrite to create proxy rules). You can find more info on this here.

By default PHP uses 'dist' as the default root

Apache

Run grunt apache-vhost to generate config file (or look in doc/ for example)

Note You have to enable mod_rewrite for Apache and make sure htaccess is allowed.

Lighttpd

Run grunt lighttpd-config to generate config file (or look in doc/ for example)

Nginx

Run grunt nginx-config to generate config file (or look in doc/ for example)

WAMP

Works fine. Just look up the Apache section above for configuration.

Setting up optional features