4

I am after a startup/shutdown script for the newly named ArcGIS Enterprise at 10.5.

This is my home machine, where I have installed ArcGIS Server, ArcGIS Data Store, Portal for ArcGIS and also GeoEvent Server. Therefore I just want to startup the Web GIS when I want to do some development. I know a Virtual Machine might be a good option here, but can we rule that out as an answer.

I remember back at 9.3.1, I used to make use of some shell scripts that I would have as shortcuts on my desktop to Start SQL Server, SDE, ArcGIS Server, but have lost them. I remember they had some logic to wait for other service to finish starting up before the next one would startup.

Will accept an answer that includes everything but GeoEvent.

3

Assuming you have the whole WebGIS stack installed on a single machine. Then starting them all up is simple but depends on your host's OS:

Windows
Each part of the stack's entry point is the windows service (thats what bootstraps everything). So you just simply invoke a windows service start command for each product:

net start "ArcGIS Datastore" & net start "ArcGIS Server" & net start "Portal for ArcGIS"

Save the above code as a .bat file (startwebgis.bat) and you can then just run that file to bootstrap the whole WebGIS stack.

To stop the services:

net stop "ArcGIS Datastore" & net stop "ArcGIS Server" & net stop "Portal for ArcGIS"

Linux
In the Linux world, the concept of a service translates to a daemon but that is not what WebGIS uses. If you look under your installed product directory structure; ie. ~/arcgis/server you'd find there are startserver.sh and stopserver.sh shell scripts. You just need to invoke those to bootstrap the application.

#!/bin/bash
source /path/to/startdatastore.sh &
source /path/to/startserver.sh &
source /path/to/startportal.sh
  • Excellent. I'm windows but love the Linux answer. From memory net start would not wait for previous service to finish starting up? How would you take this into account? Even a hard coded delay between net starts would work? – Simon Dec 17 '16 at 22:18
  • Sourcing a Linux startup script is unwise. It was designed to be executed and therefore could exit. In addition, simultaneous startup could cause race conditions and delay execution time. – Vince Dec 17 '16 at 22:58
  • 1
    @Simon replace & with && if you want to ensure each service starts only if the preceding service started successfully. Vince you could use exec or bash. In regards to race conditions- not really, each of these will be in their own separate processes/JVMs and don't share state so there aren't critical sections to race against. – olive_tree Dec 17 '16 at 23:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.