-
Notifications
You must be signed in to change notification settings - Fork 24
WISE Local Development using Windows Subsystem for Linux (WSL)
Follow the instructions here: https://docs.microsoft.com/en-us/windows/wsl/install-win10. (I'm using Ubuntu from the Windows Store for my Linux distribution)
Depending on your version of Windows, your system may support WSL 2, which includes a native Linux kernel and significant performance improvements.
Ensure that you are using WSL 2 on supported systems by following these instructions: https://docs.microsoft.com/en-us/windows/wsl/wsl2-install.
Start the Linux distro and complete initialization (if you haven't already done so): https://docs.microsoft.com/en-us/windows/wsl/initialize-distro.
$ sudo apt install maven
$ mvn -v
You should see output similar to:
Apache Maven 3.6.0
Maven home: /usr/share/maven
Java version: 11.0.4, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64
Default locale: en, platform encoding: UTF-8
OS name: "linux", version: "4.19.79-microsoft-standard", arch: "amd64", family: "unix"
The following steps follow these instructions for install Node using nvm: https://gist.github.com/noygal/6b7b1796a92d70e24e35f94b53722219.
$ sudo apt-get install build-essential
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh | bash
$ nvm install --lts
$ nvm use --lts
$ echo "nvm use --lts" >> .bash_profile
Run node -v
and npm -v
to verify installation.
Instructions for Ubuntu: https://anggo.ro/note/installing-redis-in-ubuntu-wsl/. (May vary slightly depending on your Linux distro).
Once Redis is installed, run redis-cli config set notify-keyspace-events Egx
$ sudo apt install git
$ git clone https://github.com/WISE-Community/WISE.git
$ cd WISE
# install node dependencies
WISE $ npm install
WISE $ chmod u+x wise.sh
Install MySQL and start service
WISE $ sudo apt install mysql-server
WISE $ sudo service mysql start
Create WISE database and user:
# login as root (or set a password for root user and run `mysql -u root -p`)
WISE $ sudo mysql
# create new user wiseuser, password wisepass
mysql> create user 'wiseuser'@'localhost' identified by 'wisepass';
# create wise_database
mysql> create database wise_database default character set=utf8;
# give wiseuser access to the new database
mysql> grant all privileges on wise_database.* to 'wiseuser'@'localhost';
mysql> flush privileges;
mysql> exit;
Create tables for wise_database by reading in the src/main/resources/wise_db_init.sql file:
# create tables for wise_database and load it with initial values
WISE $ mysql wise_database -u wiseuser -p < src/main/resources/wise_db_init.sql
Build the applications:
npm run build-dev-all
(development mode) or npm run build-prod-all
(production mode)
Start WISE: ./wise.sh