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 distrution.
There are two versions of WSL:
- WSL Version 1: Available in Windows 10, versions 1607 through 1909
- WSL Version 2: Available in Windows 10, version 2004 and later
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 by> <large icons>. Then select <programs and features>. Click <turn windows features on or off> near the left of the page. Ensure that Windows Subsystem for Linux is checked.
Install a Linux Distribution
Use this link for a list of available distros. Examples Include Ubuntu, Ubuntu 18.04, and Debian.
Open Microsoft Store (click icon on your toolbar with bag sporting microsoft logo). Then search for the distro you want (if you select the one without a version you will always have the latest version). Click <download> 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.
In the future, to access your local linux distribution, 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:
Enable copy/paste into shell:
Right click on the title banner of your wsl window. Select <properties> from the dropdown. Verify that <Use Ctrl+Shift+C/V as Copy/Paste> is checked, if not check it
- 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
- 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
(Windows may ask to allow apache to operate. Allow this.)
Set a WebMO administrator password
(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.
NOTE: if you restart your computer after installing WebMO on WSL you may need to run the command:
within your linux distribution in order to access 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:
$ ./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:
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:
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:
$ 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
Continue with upgrade [y/n]:y
License number: ####-####-####
Do you wish to purge deleted jobs? [y/n]:y
Set up SSH (useful for scp):
$ 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 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:
- Ubuntu 18.04 LTS