Skip to content

Commit 5181ac6

Browse files
CHG: fixed formatting
1 parent f0d2ca0 commit 5181ac6

File tree

1 file changed

+65
-64
lines changed

1 file changed

+65
-64
lines changed

docs/installation/windows.md

Lines changed: 65 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -45,39 +45,39 @@ The following instructions detail how to create an environment for compiling ISS
4545
- The 'Best match' should be 'MSYS2 MSYS'; click 'Open file location'
4646
- In the resulting File Explorer window, right-click 'MSYS2 MinGW 64-bit' and select 'Send to' → 'Desktop (create shortcut)'
4747
- Right-click on the newly-created desktop shortcut and select 'Properties'
48-
- click the 'Advanced...' button
49-
- check the box labeled 'Run as administrator'
50-
- click the 'OK' button
51-
- click the 'Apply' button
52-
- click the 'OK' button
48+
- click the 'Advanced...' button
49+
- check the box labeled 'Run as administrator'
50+
- click the 'OK' button
51+
- click the 'Apply' button
52+
- click the 'OK' button
5353

5454
### Update the package database and install required packages
5555

5656
- Double-click the 'MSYS2 MinGW 64-bit' desktop shortcut
5757
- At the resulting command prompt run,
58-
````
58+
````
5959
$ pacman -Syu
60-
````
61-
to update the database and base packages, entering "Y" when prompted
60+
````
61+
to update the database and base packages, entering "Y" when prompted
6262
- The previous step will result in the window being closed, so double-click the 'MSYS2 MinGW 64-bit' desktop shortcut again
6363
- At the resulting command prompt run,
64-
````
64+
````
6565
$ pacman -Su
66-
````
67-
until the resulting output is,
68-
````
66+
````
67+
until the resulting output is,
68+
````
6969
:: Starting core system upgrade...
7070
there is nothing to do
7171
:: Starting full system upgrade...
7272
there is nothing to do
73-
````
74-
- Install necessary packages with,
75-
````
73+
````
74+
- Install necessary packages with,
75+
````
7676
$ pacman -S --needed base-devel git openssh python python-setuptools subversion unzip mingw-w64-x86_64-autotools mingw-w64-x86_64-cmake mingw-w64-x86_64-gcc-fortran mingw-w64-x86_64-toolchain
77-
````
78-
entering "Y" or simply hitting the return key as needed
77+
````
78+
entering "Y" or simply hitting the return key as needed
7979
- (Optional) Install Vim text editor with,
80-
````
80+
````
8181
$ pacman -S vim
8282
````
8383

@@ -95,15 +95,15 @@ The Python interface to ISSM on Windows is currently under development.
9595

9696
- Open `/c/msys64/home/<USER>/.bash_profile` for editing (the easiest way to do this is with vim if you installed it in the previous step)
9797
- Add the following to the bottom of the file,
98-
````
98+
````
9999
# Allow for NTFS symbolic links
100100
export MSYS=winsymlinks:nativestrict
101-
````
101+
````
102102

103103
### .bashrc
104104

105-
- Open `/c/msys64/home/<USER>/.bashrc` for editing and add the following at the bottom of the file,
106-
````
105+
- Open `/c/msys64/home/<USER>/.bashrc` for editing and add the following at the bottom of the file:
106+
````
107107
## MATLAB
108108
#
109109
MATLAB_VER="<MATLAB_VER>" # Allows for easy resetting of MATLAB version added to path
@@ -114,8 +114,9 @@ export PATH="${MATLAB_PATH}/bin:${PATH}"
114114
#
115115
export ISSM_DIR=<ISSM_PATH>
116116
export ISSM_DIR_WIN=$(cygpath -ms "${ISSM_DIR}") # Needed by MATLAB
117-
````
118-
where `<MATLAB_VER>` is the version of MATLAB that you have installed (for example, "R2023b") and `<ISSM_DIR>` is the path to the copy of the ISSM source code that you checked out (e.g. `/c/Users/<USER>/ISSM/src`, where `<USER>` is your username)
117+
````
118+
where `<MATLAB_VER>` is the version of MATLAB that you have installed (for example, "R2023b") and `<ISSM_DIR>` is the path to the copy of the ISSM source code that you checked out (e.g. `/c/Users/<USER>/ISSM/src`, where `<USER>` is your username)
119+
119120
## Microsoft MPI
120121

121122
- Navigate to <a href="https://docs.microsoft.com/en-us/message-passing-interface/microsoft-mpi-release-notes" target="_blank">the 'Microsoft MPI Release Notes' webpage</a>
@@ -162,10 +163,10 @@ autoreconf -ivf
162163
- Replace `<NUM_CPUS>` with the number of available CPU's
163164
- `MATLAB_PATH` was defined previously in `bashrc`.
164165
- `MSMPI_ROOT` will be defined after running,
165-
````
166+
````
166167
$ source ${ISSM_DIR}/etc/environment.sh
167-
````
168-
- You may need to update the path to `libgfortran` in the `--with-fortran-lib` option
168+
````
169+
- You may need to update the path to `libgfortran` in the `--with-fortran-lib` option
169170
170171
Next, create a configuration file called `configure.sh` in `${ISSM_DIR}`. Its contents will depend on the interface you will be using, the external packages and capabilities you wish to use, and the location of certain libraries and executables on disk. The following examples can be used for an installation of ISSM with basic capabilities,
171172
@@ -212,61 +213,61 @@ You are now ready to
212213
- Navigate to <a href="https://www.msys2.org/wiki/Setting-up-SSHd" target="_blank">the MSYS2 'Setting up SSHd' webpage</a>
213214
- Copy the contents of the code block and paste to a new text file
214215
- Set the value of the variable `UNPRIV_NAME` to the desired user
215-
- If the user does not already exist, it will be created
216-
- If the user does already exist, note the default password is the same that is used to log in to the Windows user account
216+
- If the user does not already exist, it will be created
217+
- If the user does already exist, note the default password is the same that is used to log in to the Windows user account
217218
- Save the file out to the location of your choice
218219
- In a MSYS2 MinGW 64-bit shell instance, run the script
219220
- If errors occur with messages about missing packages, install those packages and run the script again
220221
- You can disregard the message,
221-
````
222+
````
222223
cygrunsrv: Error removing a service: OpenService: Win32 error 1060:
223224
The specified service does not exist as an installed service.
224-
````
225-
- The following message indicates that setup was successful,
226-
````
225+
````
226+
- The following message indicates that setup was successful,
227+
````
227228
The MSYS2 sshd service is starting.
228229
The MSYS2 sshd service was started successfully.
229-
````
230-
- You can test that the service and your log in are working correctly by running,
231-
````
230+
````
231+
- You can test that the service and your log in are working correctly by running,
232+
````
232233
ssh -l <UNPRIV_NAME> localhost
233-
````
234-
where `<UNPRIV_NAME>` is the same user that we authorized to use the service. You should be prompted to accept an ECDSA fingerprint, you which you respond "yes". Then, enter the password for this account. If all goes well, you should now have a prompt that reads,
235-
````
234+
````
235+
where `<UNPRIV_NAME>` is the same user that we authorized to use the service. You should be prompted to accept an ECDSA fingerprint, you which you respond "yes". Then, enter the password for this account. If all goes well, you should now have a prompt that reads,
236+
````
236237
<UNPRIV_NAME>@<HOSTNAME> MSYS ~
237-
````
238-
- Once logged in to the target machine, open `/etc/ssh/sshd_config` for editing, add,
239-
````
238+
````
239+
- Once logged in to the target machine, open `/etc/ssh/sshd_config` for editing, add,
240+
````
240241
AcceptEnv MSYSTEM
241-
````
242-
then save out the changes. On the client machine, open `/etc/ssh/ssh_config` for editing, add,
243-
````
242+
````
243+
then save out the changes. On the client machine, open `/etc/ssh/ssh_config` for editing, add,
244+
````
244245
SendEnv MSYSTEM
245-
````
246-
to the file (you can add `MSYSTEM` to the list of environment variables if `SendEnv` already exists), then save out the changes. You can now prefix your SSH commands like,
247-
````
246+
````
247+
to the file (you can add `MSYSTEM` to the list of environment variables if `SendEnv` already exists), then save out the changes. You can now prefix your SSH commands like,
248+
````
248249
MSYSTEM=MINGW64 ssh [...]
249-
````
250-
in order to log in to the MSYS2 MinGW 64-bit shell (other possible values are MSYS2 and MINGW32).
250+
````
251+
in order to log in to the MSYS2 MinGW 64-bit shell (other possible values are MSYS2 and MINGW32).
251252
- If an attempted SSH connection from a remote machine stalls out or is denied, it may be the case that you are running Windows Defender Firewall and need to open port 22. To do so,
252-
- in the Windows search bar, search for "Defender" and select 'Windows Defender Firewall with Advanced Security'
253-
- click 'Inbound Rules' in the left sidebar
254-
- click 'New Rule...' in the right sidebar
255-
- select 'Port', then click the 'Next' button
256-
- select 'TCP'
257-
- select 'Specific local ports', set the field to "22", then click the 'Next' button
258-
- select 'Allow the connection' then click the 'Next' button (if you are using a third-party firewall application, it is up to you to determine how to open port 22)
259-
- uncheck the 'Public' box (if a subsequent attempted connection stalls out or is denied, you may need to edit this rule, checking the 'Public' box, but try first without it), then click the 'Next' button
260-
- set the 'Name' field to "SSH", then click the 'Next' button
253+
- in the Windows search bar, search for "Defender" and select 'Windows Defender Firewall with Advanced Security'
254+
- click 'Inbound Rules' in the left sidebar
255+
- click 'New Rule...' in the right sidebar
256+
- select 'Port', then click the 'Next' button
257+
- select 'TCP'
258+
- select 'Specific local ports', set the field to "22", then click the 'Next' button
259+
- select 'Allow the connection' then click the 'Next' button (if you are using a third-party firewall application, it is up to you to determine how to open port 22)
260+
- uncheck the 'Public' box (if a subsequent attempted connection stalls out or is denied, you may need to edit this rule, checking the 'Public' box, but try first without it), then click the 'Next' button
261+
- set the 'Name' field to "SSH", then click the 'Next' button
261262
- The `ssh-keygen` utility can be used to create a more secure SSH connection and to protect your Windows user password
262263
- If you later decide that you want to stop the `sshd` service, you can do so with,
263-
````
264+
````
264265
net stop msys2_sshd
265-
````
266-
and can remove the service altogether with,
267-
````
266+
````
267+
and can remove the service altogether with,
268+
````
268269
cygrunsrv -R msys2_sshd
269-
````
270+
````
270271
Sources:
271272
272273
- <a href="https://www.msys2.org/wiki/Setting-up-SSHd" target="_blank">MSYS2 'Setting up SSHd' webpage</a>

0 commit comments

Comments
 (0)