Установщики QGIS¶
Как получить QGIS?
QGIS свободно доступна на Windows, Linux, MacOS X, BSD и Android.
Мы рекомендуем устанавливать пакеты выпущенного программного обеспечения.
Для оценки предстоящего выпуска и для того, чтобы позволить пользователям влиять на процесс разработки мы также предоставляем тестовую версию (обратите внимание на предупреждение warning).
В стадии заморозки, предшествующей стадии релиза (см. Порядок выпусков ) эти пакеты доступны в виде пре-релиза, который мы настоятельно рекомендуем пользователям тестировать.
Windows¶
Получить установщик для Windows можно в основном разделе загрузки.
Начинающим пользователям рекомендуется использовать автономные установщики.
For more advanced QGIS users you can use OSGeo4W packages, which make it possible to install several versions in parallel.
Репозиторий OSGeo4W включает в себя большое число программ проектов OSGeo. QGIS и все её зависимости также включены в этот репозиторий, равно как и Python, GRASS, GDAL, и др. Установщик позволяет инсталлировать программы как из интернета, так и из предварительно загруженных пакетов. Загружаемые файлы сохраняются в локальном каталоге и могут использоваться повторно. Последовательность действий:
Download OSGeo4W Installer (32 bit or 64 bit) and start it
Выберите Расширенная установка,
navigate to the Desktop section
and pick one or more of the following packages:
Nightly build of the upcoming point release
Long Term Release Repository
3.16.x Hannover LTR
Nightly build of the upcoming point long term release
Nightly build of the development version
Latest release nightlies SHA: 32 bit , 64 bit
Latest long-term release nightlies SHA: 32 bit , 64 bit
Master nightlies SHA: 32 bit , 64 bit
Nightlies are debug builds (including debugging output)
Don’t blindly do a full install of OSGeo4W. Only install QGIS and maybe other components you like. Dependencies will be included automatically. A full install pulls in components that require third party additions, which need to be installed manually. These components render the installation unusable without those additions.
Linux¶
Большинство дистрибутивов Linux разбивают QGIS на несколько пакетов; скорее всего вам понадобятся пакеты qgis и qgis-python (для работы с модулями). Пакеты вроде qgis-grass (или qgis-plugin-grass), qgis-server могут не устанавливаться или устанавливаться только при необходимости.
Below you find instructions to install per distribution. For most distro’s there are instructions to install QGIS stable and instructions to install a cutting edge QGIS testing build (note the warning).
Debian/Ubuntu¶
Quickstart¶
Here you will simply install the latest stable QGIS (3.18.x Zürich) in your Debian or Ubuntu without having to edit config files.
Although you see „Debian“ in some places, this also works for „Ubuntu“, as one is actually a symlink to the other on our server.
First install some tools you will need for this instructions:
Now install the QGIS Signing Key, so QGIS software from the QGIS repo will be trusted and installed:
Add the QGIS repo for the latest stable QGIS (3.18.x Zürich).
Note: «lsb_release -c -s» in those lines will return your distro name:
Update your repository information to reflect also the just added QGIS one:
Now, install QGIS:
Add „qgis-server“ to this line if you also want to install QGIS Server
Репозитории¶
В стандартных репозиториях Debian и Ubuntu зачастую доступны только предыдущие выпуски QGIS.
Чтобы получить актуальные версии, вы должны использовать альтернативные репозитории, добавив одну из следующих строк в ваш /etc/apt/sources.list.
Our main repository contains multiple lines of packages for several versions of Debian and Ubuntu based on the dependencies the individual distributions provide.
For Ubuntu we also used to have extra packages in a separate repository that are based on ubuntugis, which held more uptodate versions of other GIS packages than Ubuntu itself for LTS versions. If you want those you also need to include ubuntugis-unstable ppa in your /etc/apt/sources.list file (see ubuntugis documentation).
The release packages are only produced once shortly after a new version has been released. As unstable, not yet released debian versions (testing) and ubuntugis-unstable can have library changes the packages might sooner or later be broken for these targets, when the development in debian, ubuntu or ubuntugis-unstable moves on and their packages used as dependencies in qgis change. In that event you can either
move to a stable debian version and use the released packages for it,
wait for the next point release (due 2021-04-16 12:00:00 UTC), which happens every month and will include the updated dependencies,
switch to a nightly repository (available for the two release branches and master) whose packages are rebuild on regular basis and will also pickup the updated dependencies automatically or
build your own set of packages (see build-debian-packages).
Updated — Installing Apache, QGIS Server, and Lizmap Web Client on Windows OS
Part 1: QGIS Server and Lizmap
NOTE: This post has been updated to include my configuration files for those who want to compare their own files with mine. You can download the files at the end of this post. Please keep in mind that I cannot guarantee that this process will work for you.
This is an updated version of my previous blog post on installing Apache, QGIS Server, and Lizweb Map on Windows OS — this time using Apache 2.4.33, QGIS Server LTR 2.18.21 and Lizmap Web Client 3.1.12. I just updated my Windows Server 2016 and needed to redo my GIS server. This post includes screenshots so hopefully it will be more helpful with details. This shows the process on my Windows 10 Pro laptop but should be the same for a Windows Server 2016 (which I’ve done at my work). If this helps you or if you find any errors or have any suggestions, let me know in the comments section.
For my test on my Windows 10 Pro laptop, I have everything on the same machine. But on the Windows Server 2016 machine, I have QGIS Desktop with Lizmap Web Plugin on a different machine. For my installation I put Apache and Lizmap side-by-side inside a C:/webserver directory. You can however, put your installations inside of Apache root directory (e.g. C:/Apache24/Lizmap) or inside Apache htdocs directory (e.g. C:/Apache24/htdocs/lizmap). If installation of Lizmap and Apache are side by side or Lizmap is inside Apache root directory then you need to properly configure the virtual hosts.
Software Used/Requirements:
Lizmap and QGIS Server must be on same machine
QGIS Server LTR 2.18.21 (installed via OSGeo4W x64)
QGIS Desktop (installed via OSGeo4W x64)
Lizmap Web Plugin (installed via QGIS Desktop plugin manager)
Lizmap Web Client 3.1.12
C++ Redistributable VS 2015
Part 1: Set up workspace
You can choose how you set up your workspace environment, but for this guide the following setup is used.
1. Optional — turn off IIS if enabled in Windows. I have it enabled so I turned if off so I can use the default port 80.
2. Set up a home workspace on your local drive — for simplicity sake, I have a directory called webserver on my drive that I will use as my workspace (e.g. C:\webserver)
Part 2: Install and Configure Apache
For more info on using Apache for Windows — see this link: https://httpd.apache.org/docs/2.4/platform/windows.html
1. Download Apache and needed components
Go to apachelounge.com/download page and download the appropriate software for your Windows OS. Here’s what I’m using:
Visual C Redistributable Package: vc_redist_x64
Note: The Visual C Redistributable Package is needed to run Apache HTTPD as a Windows Service but the version required will depend on which binary you are installing: If you are installing Apache 2.4 VC15 then you need Microsoft Visual Studio C 2017 Redistributable.
Be sure !! that you have installed the latest C++ Redistributable Visual Studio 2017 — Install this package first if you don’t already have it installed : vc_redist_x64 or vc_redist_x86
2. Install the C++ VS 2017 redistributable that you downloaded first if you don’t have it installed already
3. Extract from httpd-2.4.33-win64-VC15.zip the Apache24 folder and put into your webserver directory (e.g. C:\webserver\Apache24)
4. Extract mod_fcgid-2.3.9-win64-VC15.zip\mod_fcgid-2.3.9 folder then copy mod_fcgid.so and put into your \Apache24\modules folder (e.g. C:\webserver\Apache24\modules)
5. Change configuration in \Apache24\conf\httpd.conf file (e.g. C:\webserver\Apache24\conf\httpd.conf). In a text editor (I use notepad++) open the httpd.conf file and edit it
a. Replace all occurrences of c:/Apache24 to c:/webserver/Apache24 or where ever you have your Apache24 folder.
b. Find where it says “ServerName” – this should be ServerName localhost:80 (if using default port 80) or if not using default port then it should be ServerName localhost:port (e.g. ServerName localhost:90).
Uncomment the ServerName line — that is remove the # character
Change from ServerName www.example.com:80 to ServerName localhost:80
c. Optional — Find where it says “Listen 80” to and change the port number if not using the default 80 (e.g. Listen 90). You need to use a port that is not already in used by another service.
d. Find where it says “DirectoryIndex index.html” and add index.php (e.g. DirectoryIndex index.html index.php)
e. Save your changes. You can keep the configuration file open
6. Check to see if Apache will start. To quickly check to see Apache configurations work and to see if Apache starts up correctly you can run the httpd.exe as a console application. You can use the command window (CMD) to run the httpd.exe or go into the directory where httpd.exe is located and run as admin.
a. Go to \Apache24\bin folder (e.g. C:\webserver\Apache24\bin) and right click on httpd.exe and run as administrator
b. If you get a pop up, allow the app to run — you should then get a console window (black window) that pops up — keep this window open (if you close it, Apache will stop)
c. Then in a web browser type in http://localhost or http:localhost:port and you should see a webpage with «It Works!» This means Apache is installed correctly
d. To stop Apache you can just close the console window (black window above)
7. Run Apache as a Windows Service rather than as a console application. Running as a service should be preferred because this lets Apache end any current operations and clean up gracefully. See https://httpd.apache.org/docs/2.4/platform/windows.html#winsvc for more info.
a. Optional — Append Apache to your Windows System Path so you can directly access Apache by just typing httpd.exe instead of the full pathname to it.
b. Start Apache as Windows Service:
Go to the Command Prompt (CMD) and run as administrator
Install Apache as a service: httpd.exe -k install
Open your Windows Services Manager: you should see Apache as a listed service.
Select Apache service and start it
Then in web browser, try http://localhost or http://localhost:port and you should get «It Works!»
Stop the Apache service for now as you’ll do more configuration — you can keep the services window open
Note: If you would rather start, stop, restart Apache in the Command Prompt window: use httpd.exe -k restart, httpd.exe -k shutdown
8. Edit Apache configuration (httpd.conf) to enable needed modules. Open Apache24\conf\httpd.conf (e.g. C:\webserver\Apache24\conf\httpd.conf) and edit it.
a. Remove the # character in front of each of the following module to enable it.
Note: If you don’t see the module already in the file then you need to type it in — for example I had to insert mod_fcgid.so module
LoadModule actions_module modules/mod_actions.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule expires_module modules/mod_expires.so
LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule fcgid_module modules/mod_fcgid.so
LoadModule headers_module modules/mod_headers.so
LoadModule ident_module modules/mod_ident.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule ssl_module modules/mod_ssl.so
Note: If you are using a different port than the default 80 then you need to also enable these modules as well.
LoadModule cache_module modules/mod_cache.so
LoadModule cache_disk_module modules/mod_cache_disk.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
LoadModule proxy_http_module modules/mod_proxy_http.so
b. Add the following code to the end of the httpd configuration file:
9. Save your changes to the configuration file and restart Apache service. See if you can still access Apache on localhost or localhost:port. I like to restart and check after each set of configuration changes so it’s easy to keep track of errors should something not work.
Part 3: Install and Configure PHP
1. Go to PHP download page and download the appropriate file for your OS and Apache version installed from Part 2. I am using PHP 7.2 (7.2.7) VC15 x64 Non Thread Safe
2. Create a new php folder, called php72 or whatever you want. Extract the zipped file contents to your PHP folder inside your main webserver directory (e.g. C:\webserver\php72).
3. In the php folder there is a php-ini-production file, make a copy of this and rename the copy to php-ini — this will be the php configuration file you edit
4. Open php.ini file (e.g. C:\webserver\php72\php.ini) in a text editor and make the following changes
a. Find where it says ;extension_dir = «ext» and remove the ; character and replace «ext» with the path to your php ext folder (e.g. «C:/webserver/php72/ext»)
b. Enable the following php modules by removing the ; character