Arches works on Linux, Windows, or macOS, but some of its dependencies may be more difficult to install on certain operating systems. Most enterprise-level installations of Arches have been created on Linux servers.
To begin development or make a test installation of Arches, you will need the following:
- 2gb disk space
- 1.5gb for all dependencies and 600mb for Arches.
- In production, the amount of disk space you need will depend on the number of resources in your database, specifically uploaded images or media files.
- 4gb memory (RAM)
- This recommendation is calculated by the fact that ElasticSearch requires 2gb to run, and as per ElasticSearch documentation no more than half of your system’s memory should be dedicated to ElasticSearch.
- In development, it’s possible to force ElasticSearch to run with only 1gb of memory, as we have noted here.
- In production, you may want to increase your memory, and allow ElasticSearch to use more than its default.
Please note that Arches 4.0.0 beta release is only fully supported in Chrome.
- PostgreSQL 9.6 with PostGIS 2.3 The easiest way to install this on OS X is Postgres.app. For Windows, use the EnterpriseDB installers, and use Stack Builder (included) to get PostGIS.
- GDAL and GEOS GDAL Version > 1.11.5. On Windows, use the OSgeo4W installer, and choose to install the GDAL package.
- Python 2.7.x Installation instructions: https://www.python.org/downloads/. We recommend 2.7.12, and on Windows you must choose 32-bit or 64-bit Python depending on your operating system architecture.
- pip If you are using Python < 2.7.9, you will need to get pip from here: https://pip.pypa.io/en/latest/installing.html. In Python 2.7.9 and later, pip is included by default. For good measure, you may as well upgrade pip right away with this command
python -m pip install --upgrade pip.
- Bower Requires NodeJS/npm. Installation instructions here: https://bower.io/#install-bower
- Mapnik Version 2.2. Installation instructions: http://mapnik.org/pages/downloads.html. If you are on 64-bit Windows you will not be able to install Mapnik; the Python bindings are not compatible. Please read this note on our Wiki about how this limitation affects Arches.
- JDK Use these installers: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html. On Windows, be sure to set the JAVA_HOME system environment variable.
- Elasticsearch Please read Installing Elasticsearch regarding Arches and Elasticsearch.
These instructions will provide some guidance on installing the required dependencies and getting Arches up and running quickly.
Once you have all of the dependencies installed, you can use
pip to install Arches. It’s best to do this in a virtual environment. Using a command prompt, follow these steps.
Create and enter a new directory called Projects:
mkdir Projects && cd Projects
Create a virtual environment called ENV:
Activate the new virtual environment
Linux and macOS:
At this point (once the virtual environment is activated), Windows users need to manually install Shapely. Follow these instructions.
Install Arches into your virtual environment
You can install Arches with pip:
pip install arches==4.0b3
Windows users should add
--no-binary :all:to this command. This extra argument will avoid some extraneous error messages during the installation process. However, Arches will install successfully whether you add that argument or not.
Create a new Arches project
A project is a standalone Arches app that sits outside of your virtual environment and facilitates all of the customizations that you will need to make one installation of Arches different from the next.
Linux and macOS:
arches-project create my_project
python C:\Projects\ENV\Scripts\arches-project create my_project
On Windows, with the current Arches beta release, v4.0b3, the above command will end in an error on the last step of the command. The workaround for this is to enter
my_project\my_project\(the directory that contains
bower.json) and run this command:
On Windows, you must specify the path to your GDAL library. Open
settings.pyin your new project and add this line:
GDAL_LIBRARY_PATH = 'C:/OSGeo4W64/bin/gdal201.dll'Be sure to adjust the path as necessary for your installation, and note the forward slashes.
At this point you should install ElasticSearch (unless you have done so already) before continuing.
Setup your Arches database
First, make sure ElasticSearch is installed and running
Then create your Arches database with:
python manage.py packages -o setup_db
Run the development server
To view Arches, run:
python manage.py runserver
You can now view Arches by navigating to
localhost:8000in a browser.
If you want to install Arches directly from the GitHub repo (instead of from the stable pip distribution), use the developer installation documentation on the Arches repo wiki.
More about Arches Projects¶
Arches Projects facilitate all of the customizations that you will need to make one installation of Arches different from the next. You can update html to modify web page branding, and add functions, datatypes, and widgets to introduce new functionality. A project sits outside of your virtual environment, and can thus be transferred to any other system where Arches is installed.
The general structure of a new Arches project is::
my_project/ └─ manage.py └─ my_project/ └─ settings.py └─ datatypes/ └─ functions/ └─ media/ └─ templates/ └─ widgets/
Note that not all files are shown
Many project-specific settings are defined here. You will likely want to add a
settings_local.py file that can separately store variables that you may want to keep out of the public eye (db passwords, API keys, etc.).
This directory holds HTML templates that you can modify to customize the branding and general appearance of your project.