Setting up WSL Version 1 and Installing WebMO

Windows Subsystem for Linux (WSL) allows one to install Linux distributions as apps onto Windows machines. It is important to note that WSL distributions are not virtual machines. The filesystem for each distribution is part of your Windows filesystem. Furthermore, you are not able to instantiate multiple separate instances of a single distribution.

There are two versions of WSL:

To find the version of Windows you are running, go to Start > Settings > System > About, or search for and run the "winver" program.

Enable WSL on Your Machine

Go to your Control Panel and Enable WSL:

In your app search bar type "control" and hit <enter>. This will open the Control Panel. Then select View b: <Large icons>. Select <Programs and Features>. Click <Turn Windows features on or off> near the left of the page. Check Windows Subsystem for Linux, click OK, and click Restart when requested.


Install a Linux Distribution

Use this link for a list of available distros. Examples Include Ubuntu, Ubuntu 18.04, and Debian.

From the Start menu, open Microsoft Store (shopping bag with microsoft logo). Then search for the distro you want; if you select the one without a version number, you will always have the latest version. Click <Get> and wait (it may ask you for a Microsoft Account, but you don't need to give it one; just hit the x on the window). Then click <Launch> to install and open the shell. You will eventually be prompted for a username and password. Then you will be in your bash shell for the distro. Note your IPv4 address.

In the future, to access your local linux distribution, either use the Start menu, or open the command line and use the name of the distro as a command (for instance if you have ubuntu 18.04 installed, simply type "ubuntu1804" into the command line and press <enter>).


Verifiy You are in a Bash Shell and Enable Useful Features

Test some unix commands:

$ ls
$ pwd
$ whoami

Enable copy/paste into shell:

Right click on the title banner of your WSLl window. Select <Properties> from the dropdown. Verify that <Use Ctrl+Shift+C/V as Copy/Paste> is checked. If not, check it and click OK.


Install WebMO

  1. In your bash session, download and run the Server in the Cloud (sitc) script:
    $ curl -O https://www.webmo.net/cloud/sitc.tar.gz
    $ tar xzf sitc.tar.gz
    $ ./sitc/install
  2. Follow prompts to:
    • update the operating system and add some components
    • configure the operating system
    • install webmo
      • obtain and/or specify webmo license number
      • create a webmo user
    • install mopac7

  3. Windows Firewall may ask to allow access for apache to operate. Allow this as appropriate.

    Note the WebMO login address at the end of the installation.


Set a WebMO administrator password

In your web browser, navigate to

      <IP Address>/webmo

(NOTE: if this does not work try navigating to http://localhost/webmo)

Log in with the username "admin" and a blank password. Set an administrative password when prompted. Enter your registration information. You are brought to the WebMO administration menu. Since a user was already created and mopac was already installed, simply click Logout.


Access and use WebMO

Log in with the username and password you supplied to the installation script. Run a test job.

Log in with the username and password you supplied to the installation script. Run a test job.


After Windows Logout or Computer Restart

Logging out of your Windows session or restarting Windows will end your terminate your WSL app and prevent access to WebMO. When logging to windows again you must 1) start WSL Linux session (from the Start menu or command line) and 2) start the apache webserver from the linux terminal by typing:

sudo /sbin/service apache2 start

Advanced Tips

Administering WebMO:

To access the WebMO administration pages, log into WebMO as username "admin" with the administration password. You can now access the User Manager to add additional users, Job Manager to monitor jobs, Interface Manager to enable other engines (which need to be installed separately), etc.

Adding additional computational engines:

Run the commands:

$ cd ~
$ ./sitc/install --skip_webmo="true" --skip_update="true" --engines="foo" (where foo is the engine, or engines separated by commas, that you wish to install)

Some engines require a file to be downloaded beforehand. Run:

./sitc/install --help

for more information.

Upgrading WebMO to Pro or Enterprise:

Upgrading with SITC: Obtain a license for WebMO Pro/Enterprise. Login to your virtual machine and run:

$ ./sitc/install --upgrade-webmo

Provide your WebMO Pro/Enterprise license numnber and password when prompted. SITC will download the webmo distribution and perform the upgrade.

Upgrading manually: Obtain a license for WebMO Pro/Enterprise, and download the webmo distribution tar.gz file. Upload the webmo distribution into /home/webmo/download on the virtual machine. Install the upgrade as the webmo system user:

$ sudo su - webmo
$ cd /home/webmo/download
$ tar xzf WebMO.20.0.00Xe.tar.gz
$ cd WebMO.install
$ find /home/webmo -name globals.int
$ perl upgrade.pl
Have you backed up your present WebMO installation [y/n]:y
Location: /home/webmo/public_html/cgi-bin/webmo/interfaces/globals.int
Continue with upgrade [y/n]:y
License number: ####-####-####
Do you wish to purge deleted jobs? [y/n]:y
$ exit

Set up SSH (useful for scp):

Run commands:

$ sudo apt update
$ sudo apt remove openssh-server (Openssh-server may not be there in the first place, if so then an error message will be returned. Ignore it and move to the next step)
$ sudo apt install openssh-server

Then open /etc/ssh/sshd_config with a text editor of your choice. Ensure that the the field of PasswordAuthentication is "yes" and that there is no # in front of it. Add the line "AllowUsers user" to the bottom of the file where "user" is the username you created. Save and quit from the file. Run commands:

$ sudo service ssh start (Windows will ask you if you want to run sshd the first time you run this command. Allow it to do so)
$ sudo apt install dnsutils
$ dig +short myip.opendns.com @resolver1.opendns.com (shows you the external IP you need in order to ssh/scp to the your linux app)

Other Linux Distributions:

The sitc.tar.gz script supports the following linux distributions on WSL: