Skip to content
Joonghoon Kim edited this page Dec 7, 2015 · 22 revisions

Before installation, read Prerequisites document and prepare everythig. Don't miss setting LXC up

Download Source & Install dependencies

Downloading is easy : just clone webida server repository. Since Webida server uses various npm packages, before running server, these libraries should be installed. You can run "npm install" command at the "/src/server" directory.

$ cd /home/webida
$ git clone https://github.com/webida/webida-server.git
$ cd ./src/server
$ npm install

Source Structure

Following box shows directory structure cloned via git, webida-server/

/src                source directory
    /server         server source, configuration and installation scripts
        /app        app unit server
        /auth       auth unit server (oauth2, ACL and user/group management)
        /build      build unit server
        /buildjm    build job manager unit server
        /common     common modules
        /conf       configurations
        /emul       emulators
        /fs         file system unit server
        /notify     notification unit server
        /proxy      reverse proxy unit server
        /tests      QUnit test scripts
    /ext            external(3rd party) code that supports running Webida Server
    /system-configs     scripts & resources to configure your system 
update-system-apps.sh   update system applications from the repositories for each applications.

Prepare Directories

Some directories are needed by webida user that stores log, workspace data & other stuffs.

$ sudo su webida 
  (input password)
$ cd /home/webida 
$ mkdir apps 
$ mkdir fs
$ mkdir build
$ exit

Check permissions above directories that webida user has permissions to write. We recommend you to put lxc directory (where you created webida container) & webida-server (cloned git directory) directory in /home/webida, too.

Create & Edit conf.js

Webida server uses src/server/conf/default-conf.js as configuration file. As the name shows, it's default configuration file. To update Webida server easily, It's better to copy the file into 'real' confiugration file, conf.js.

$ cd webida-server/src/server/conf
$ cp default-conf.js conf.js 

Now you have conf.js. See Configurations guide how & what you have to do with configuration file.

** Before proceeding to next step, check your configuration file has no error or invalid paths. **

$ cd /home/webida/webida-server/src/server/conf
$ node ./conf.js 
 <node should exit without any exception>

Initialize Servers

Auth & FS server requires 'installation' process to initialize Database. App server need installtion too, to install basic system apps including Webida IDE (Yes, you may want to run this app). While initializing servers, you should use 'webida' user, not your own shell account

$ cd /home/webida/webida-server
$ sudo chown -R webida:webida src/server/app/systemapps  
$ sudo su webida 
  (input password)
$ cd src/server/
$ node auth-install.js
$ node fs-install.js 
$ ../../update-system-apps.sh 
$ node app-install.js 

DO NOT RUN app-install.js without running auth-install.sh, fs-install.sh & update-system-apps.sh.

Re-initializing app server

The app-install.js initialize app-related tables in DB & insert rows for system apps & do some optimization jobs if needed. If something goes wrong, you may want to register system-apps again from scratch. DB tables. In that case, you should run app-uninstall.sh. You should run the installation scripts with webida user.

$ cd /home/webida/webida-server
$ sudo chown -R webida:webida src/server/app/systemapps  
$ sudo su webida 
 (your shell password) 
$ ./update-system-apps.sh 
$ cd src/server
$ export RELEASE_BUILD=1
$ node app-uninstall.sh
$ node app-install.sh