-
Notifications
You must be signed in to change notification settings - Fork 16
Prerequisites
Currently, webida server officially supports x64 Ubuntu only (tested on 14.04.3). To install Webida in other Linux distribution, read whole installation manual cafeully and configure your system with equivalent packages & tools.
System requirements - recommended
- Ubuntu® 14.04 (64-bit)
- At least dual-core 2 GHz of CPU
- At least 4 GB of RAM memory
- At least (100 GB + number of users * 10 mb) of free disk space Local administrator authority
System requirements - minimal
- Modern Linux system that can run node.js, git, LXC or Docker on common x86 machine
- at least 512 MB RAM to run node.js & some container jobs including git & java compiler
- at least 2GB of disk space to save container root file system image, log, codes & other stuffs.
- install system packages via apt-get
- install node.js & required global modules
- prepare database
- prepare DNS (optional)
$ sudo apt-get install -y make gcc g++ libattr1-dev lxc
$ sudo apt-get install -y openjdk-7-jdk git-svn mysql-client
You can install Oracle JDK instead of Open JDK. Just keep 'java & javac' binary reachable to any users.
- C/C++ compiler and make is required to build node.js modules
- libattr1 is required to support quota per user.
- LXC (Linux Container) is required to support sandboxing user's terminal & building jobs. You can use docker instead of LXC, but you have to create your own docker image for users.
- JDK is required to support building & running java project.
- git is required to use 'git' feature in Webida IDE
- mysql-client is required to access MySQL server, where users credential, ACL and other important stuffs are indexed.
Webida server will soon support redis-cluter. So, please install latest redis server 3.0.x
$ sudo add-apt-repository ppa:chris-lea/redis-server
$ sudo apt-get update
$ sudo apt-get install redis-server
Default configuration may work well, but consider following recommendations.
- Set maxclients to 1024 or under, if you don't want to increase number of maximum file descriptor per user
- Set maxmemory not to exceed half of your memory. Webida server uses not so much cache usually.
- DO NOT change maxmemory-policy, other than volatile-lru. Webida Server may store cache items that should never expire.
- You can turn-off disk persistence.
Download the latest long-term-support pre-built binary from nodejs website http://nodejs.org/download and copy it to /usr/local. currently, Weibda supports nodejs 4.x only. (We'll test on Nodejs 5.x, soon) Since some node modules that Webida server depends on are using native code, they have to be bound to some node.js engine versions) Use nvm, if you prefer to test latest node versions.
$ wget http://nodejs.org/dist/v4.2.2/node-v4.2.2-linux-x64.tar.gz
$ tar zxvf node-v4.2.2-linux-x64.tar.gz
$ cd node-v4.2.2-linux-x64
$ sudo cp -r * /usr/local/
If you want to work with root account, be sure to have /usr/local/bin is on your path
npm install -g grunt-cli pac forever node-pre-gyp
- pac, grunt-cli is needed to build webida system apps, including IDE & dashboard
- forever is needed to run Webida server with provided upstart configuration files
- node-pre-gyp is needed to download some pre-built module, whose bundled node-pre-gyp is broken
Install mysql packages and create the user/database.
- database name : "webida"
- mysql account(id/pw) : "webida"/"webida"
$ sudo apt-get install mysql-server
(set your mysql root password)
$ sudo mysqladmin -u root create webida -p
$ sudo mysql -u root -p webida
mysql> GRANT ALL PRIVILEGES ON webida.* TO webida@localhost IDENTIFIED BY 'webida' WITH GRANT OPTION;
mysql> exit
If you are using some 'external' database, create webida user & database to your DB server and grant permissions. (But you should install mysql-client package on Webida Server, to access DB server) You can use your own DB password of course, setting the password in Webida server's configuration file.
Webida servers should be run as webida user, with right of sudo.
$ sudo adduser webida
$ id webida or id webida > /tmp/webida.id
You should know the uid/gid of webida user to set-up LXC container (or your docker image) properly. See /tmp/webida.id when you set-up the container image
You must remember id value. Id value is used in LXC container set-up
By default, each unit service (server module) of Webida servers owns its own port to serve (from 5001~5010 under default configuration) If you want to provide webida services under plain http/https port only, especially for public service, then request from client (browser) should be proxied via reverse proxy and each unit should be accessed by domain names only, not by IP address or single host domain name as default configuration.
Set webida server domain names on DNS server. Or set domain names in local /etc/hosts file for tests, like following example. (You should set the hosts file in every machine from where you want to access Webida server. )
127.0.0.1 webida.mine
127.0.0.1 auth.webida.mine
127.0.0.1 fs.webida.mine
127.0.0.1 app.webida.mine
127.0.0.1 deploy.webida.mine
127.0.0.1 jash.webida.mine
127.0.0.1 conn.webida.mine
127.0.0.1 build.webida.mine
127.0.0.1 ntf.webida.mine
127.0.0.1 debug.webida.mine
127.0.0.1 cors.webida.mine
Each domain should be be bound to each module's service port in the configuration file of Webida server.
Before install webida server, create and config LXC container first. Read LXC Configuration
If you want to set users' quota, you should prepare an XFS or BTRFS partition in your system. Read XFS Guide for XFS. or, use BTRFS. (Don't miss enabling quota via mount option)