Skip to content

Manual Installation

Jara edited this page Mar 20, 2016 · 9 revisions

If the release files are not your thing, or you cant use the sh file, or are running it in an OS that not supports it. There be always the manual installation.

##First you will need JXCore

For Linux/OSX : (use below script – copy and paste to terminal)
curl http://jxcore.com/xil.sh | bash
This script downloads the latest release.

!! if you have ‘permission denied’ message, make sure the user has root access. Try
curl http://jxcore.com/xil.sh | sudo bash

(! FreeBSD requires bash, and unzip to be installed, or you may manually install jx binaries from JXcore Downloads)

##Now we need the files You can either use
git clone https://github.com/JaraLowell/OgarServ
or download the source or linux tar files to have the source located at OgarServ Release page

Unpack them and go in to the folder that has the index.js file.

##Adding the modules now we need to install the modules for the js library, to do so write
jx install ws http fs sys mysql url underscore
it migh cry about pyton but should work never the less. You can only run jx if it is in your path, in any other case you will have to write the full command path to js.

If everything went okay, you should be able now to run
jx index.js
to start your server!

##Auto restart on Windows? Make a bat file that loops for you
example start.bat

@echo off
c:\JXcore\64\jx install ws http fs sys mysql url underscore
:loop
c:\JXcore\64\jx index.js
goto loop

This works if JXcore's exe file is located in c:\JXcore so change this accordingly to where your exe is located. The bat file be located in same folder as where index.js is located.

##For node Users cd in to the src folder and there run npm to install node modules that are needed, sticky-session is not needed, but is an add on for ws to support cluster modes npm install sticky-session ws http fs sys mysql url underscore

when done,. node --nouse-idle-notification --expose-gc --always-compact --max-new-space-size=2048 --max-old-space-size=8192 index.js

##Nodejs Versions As of like V8 version 3.17.13.0 the option to set max new space bin removed. So when you start the server with the --max-new-space-size=xxxx option the server wont start trowing an error.

We do suggest that you use node v0.10.25 ~ v0.10.43 (V8 version 3.14.5.9) as these versions use the lowest memory with OgarServ.

To change your node version:
sudo npm cache clean -f --force
sudo npm install -g n
sudo n 0.10.43

After this, make sure to install the node modules again by first removing the node_modules folder and dooing an npm install ws http fs sys mysql url underscore and then run the server with the command line:
node --nouse-idle-notification --expose-gc --always-compact --max-new-space-size=2048 --max-old-space-size=2048 index.js

Clone this wiki locally