Skip to content

Instantly share code, notes, and snippets.

@knu2xs
Last active April 27, 2022 13:43
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save knu2xs/ed61b65de1ce430e642d284fa3aedc0b to your computer and use it in GitHub Desktop.
Save knu2xs/ed61b65de1ce430e642d284fa3aedc0b to your computer and use it in GitHub Desktop.
ArcGIS on Ubuntu Install Notes

No worries. You do need to copy it to the /etc/init.d as you mentioned. This will only tell the system how it can start/stop/restart the arcgisserver service. However you still need to tell it you want it to start at boot.

All the major distros now use something called systemD which handles starting up the system, so you have to do two other small things, listed below, to get it to start on boot.

To interact with system you mainly use the systemctl command to tell it what you want to do .

  1.  The following will tell systemD to start the arcgisserver service.

systemctl start arcgisserver

  1.  This next command will tell systemD to start it EACH time it boots up.

systemctl enable arcgisserver

So just run both of the above commands. Or just run systemctl enable arcgisserver, and reboot the machine, and it will start on the next boot.

If you were to run the systemctl commands without copying over the arcgisserver file to an init.d directory (which is where it saves all its initialization scripts.) SystemD would basically say, “ok I hear you want to start and/or enable arcgisserver, but how do I do that?”

Just some background info if you’re interested; if you open up the arcgisserver file it’s just a plain text file (technically a bash script) that basically can be distilled down into 3 functions, start, stop and restart. That way when you tell systemD to start the arcgisserver service, it will

  1.  Look for an arcgisserver script in its init scripts directory
  2.  If it finds one, it runs it,
  3.  calling the function corresponding action (start/stop/restart) from within that script. That’s why we package the script, so you can tell the system how you want to service to actually run.

Install prerequsite package, gettext

sudo apt-get install -y gettext

Set file handles and processes limits.

sudo echo "arcgis soft nofile 65535" >> /etc/security/limits.conf
sudo echo "arcgis hard nofile 65535" >> /etc/security/limits.conf
sudo echo "arcgis soft nproc 25059" >> /etc/security/limits.conf
sudo echo "arcgis hard nproc 25059" >> /etc/security/limits.conf

Create arcgis user

sudo useradd arcgis -m -s /bin/bash

Optionally, set the password for the arcgis user

sudo passwd arcgis

Create location to install ArcGIS.

sudo mkdir /opt/arcgis && sudo mkdir /opt/arcgis/server

Set user ownership and permissions for the install location.

sudo chown -R arcgis:users /opt/arcgis && sudo chmod -R 700 /opt/arcgis

Run the installation from the location I have copied all the resources to in the temp directory.

sudo -u arcgis /tmp/arcgis/ArcGISServer/Setup -m silent -l yes -a /tmp/arcgis/server.prvc -d /opt/arcgis

Copy the arcgisserver script to init.d so ArcGIS Server will start when the machine starts up.

sudo cp /opt/arcgis/server/framework/etc/scripts/arcgisserver /etc/init.d/

Set the path in the arcgisserver script to the install path.

sudo perl -pi -e 's/agshome=\/arcgis\/server/agshome=\/opt\/arcgis\/server/g' /etc/init.d/arcgisserver

#!/bin/bash
# install prerequsites
apt-get install -y gettext
# set file handles and process limits
echo "arcgis soft nofile 65535" >> /etc/security/limits.conf
echo "arcgis hard nofile 65535" >> /etc/security/limits.conf
echo "arcgis soft nproc 25059" >> /etc/security/limits.conf
echo "arcgis hard nproc 25059" >> /etc/security/limits.conf
# create the arcgis user
useradd arcgis -m -s /bin/bash
# create the install location, set ownership, and set permissions
mkdir /opt/arcgis
mkdir /opt/arcgis/server
chown -R arcgis:users /opt/arcgis
chmod -R 700 /opt/arcgis
# install ArcGIS Server as the arcgis user
sudo -u arcgis /tmp/arcgis/ArcGISServer/Setup -m silent -l yes -a /tmp/arcgis/server.prvc -d /opt/arcgis
# copy the startup file to the init.d directory so ArcGIS Server will start with the machine
cp /opt/arcgis/server/framework/etc/scripts/arcgisserver /etc/init.d/
perl -pi -e 's/agshome=\/arcgis\/server/agshome=\/opt\/arcgis\/server/g' /etc/init.d/arcgisserver
# set ArcGIS Server to start with the instance boot
systemctl enable arcgisserver
#!/bin/bash
# install prerequsites
apt-get install -y gettext
# set file handles and process limits
cp /vagrant/resources/limits.conf /etc/security/limits.conf
# create the install location
mkdir /opt/arcgis
mkdir /opt/arcgis/server
# install ArcGIS Server as the arcgis user
/vagrant/resources/ArcGISServer/Setup -m silent -l yes -a /vagrant/resources/server.prvc -d /opt/arcgis
# copy the startup file to the init.d directory so ArcGIS Server will start with the machine
cp /vagrant/resources/arcgisserver /etc/init.d/
# set ArcGIS Server to start with the instance boot
systemctl enable arcgisserver

Install Tomcat 7 with documentation and a web administration interface

sudo apt-get install -y tomcat7 tomcat7-docs tomcat7-admin

Run the Web Adaptor installation

/tmp/arcgis/WebAdaptor/Setup -m silent -l yes -d /opt

Copy the web adator WAR file to be used in Tomcat 7

sudo cp /opt/arcgis/webadaptor10.5/java/arcgis.war /var/lib/tomcat7/webapps/server.war

Configure the web adaptor to work with the local installation of Server

/opt/arcgis/webadaptor10.5/java/tools/configurewebadaptor.sh -m server -w http://localhost:8080/server/webadaptor -g http://localhost:6080 -u admin -p n!ftyP@$$W0rd -a true

  1. Create sources list for webmin repos.
sourcesFile=/etc/apt/sources.list.d/webmin.sources.list
sudo touch sourcesFile
sudo echo "# webmin software repositories" > sourcesFile
sudo echo "deb http://download.webmin.com/download/repository sarge contrib" > sourcesFile
sudo echo "deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib" > sourcesFile
  1. Import the key.

curl http://www.webmin.com/jcameron-key.asc | sudo apt-key add -

  1. Install Webmin.

sudo apt-get update && sudo apt-get install -y webmin

#!/bin/bash
# set up the sources file for Webmin
sourcesFile=/etc/apt/sources.list.d/webmin.sources.list
touch sourcesFile
echo "# webmin software repositories" >> sourcesFile
echo "deb http://download.webmin.com/download/repository sarge contrib" >> sourcesFile
echo "deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib" >> sourcesFile
# import the repo key
curl http://www.webmin.com/jcameron-key.asc | apt-key add -
# update software sources
apt-get update
# install webmin
apt-get install -y webmin

Python Path: /opt/arcgis/server/framework/runtime/ArcGIS/bin/Python/envs/arcgispro-py3/python.exe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment