As basic OS for this example of installation it is selected by the Microsoft Windows 7 64 bit. Also other versions, for example, of the Microsoft Windows 2012 Server or the Microsoft Windows 2008 Server are also possible.
For functioning of a software product, it is necessary to download the following software products: PostgreSQL 9.4 a choice of digit capacity depends on your operating system. Installation files can be downloaded here:
Be sure that you have installed the Visual C++ 2010 SP1 Redistributable Package: Win64 vcredist_x64.exe, Win32 vcredist_x86.exe
Python 3.4 compiled in the Visual Studio 10
Apache 2.4 which is brought together in the compiler VC10
The mod_wsgi 4.4.12 module for Apache 2.4 compiled in the compiler VC10 https://github.com/GrahamDumpleton/mod_wsgi/releases?after=4.4.13 in archive there will be several modules, for different versions of Apache and compilers. Selection terms will be described further.
The freshest version of the program is recommended to installation.
Attention! In order that installation process took place successfully, it is necessary to launch the program of an installer from the user name having admin privileges and also the user login on behalf of which the program is launched shall be surely collected by Latin characters.
We wait for installation process completion process
We launch the psql program through Start - All Programs - PostgreSQL 9.5 - SQL Shell (psql)
Also we enter the text into windows shell
postgres=# CREATE USER scuser WITH password '123456';
This instruction creates the user of scuser.
Further we create the database
postgres=# CREATE DATABASE severcart WITH ENCODING='UTF8' OWNER=scuser CONNECTION LIMIT=-1 TEMPLATE template0;
On it preparation of DB is complete.
After downloading of archive with the program, we unpack it in the directory C:\Apache24\. We launch command line of Windows cmd with the rights of the superuser, further we pass into the directory
We collect in command line
C:\Apache24\bin>httpd.exe -k install -n "Apache2.4"
This instruction will transfer operation of web the Apache server to the mode of service.
Let's launch service
C:\Apache24\bin>net start Apache2.4
After the service successfully starts, we check that the program listens to the 80th port. For example, it can be checked in the Google Chrome program having transferred to the address 127.0.0.1. If you see the text of “It works!” the server means it is successfully installed.
We activate the «Add python.exe to Path» point for adding of a way of the program to the list of the Path variable
We click «Yes» for reset of the PC.
Attention! Installation of mod_wsgi only after Python installation, differently the Apache server will collapse with an error.
The downloaded archive of mod_wsgi-Windows-4.4.12.tar.gz contains the directories Apache22-win32-VC9, Apache24-win32-VC10, Apache24-win32-VC9, Apache24-win64-VC10 which contain the compiled mod_wsgi modules for different processor architecture and compilers. Since we have the 64th bit architecture and Apache compiled in MS VC10, select Apache24-win64-VC10. If you have the 32nd architecture, then select Apache24-win32-VC10.
The file of the module with extension of so is selected proceeding from the set Python version. In this case it will be the mod_wsgi-py34-VC10.so file.
We copy the unpacked mod_wsgi-py34-VC10.so file in the directory C:\Apache24\modules.
Further we rename the mod_wsgi-py34-VC10.so file on mod_wsgi.so
We connect the new module to the Apache 2.4 program. We add a line to the principal configuration C:\Apache24\conf\httpd.conf file
LoadModule wsgi_module modules/mod_wsgi.so
We reboot service Apache
C:\>net stop apache2.4 C:\>net start apache2.4
If the service successfully started, everything means it is made truly and it is possible to pass to the following step.
In command line of cmd it is executed
C:\>pip install virtualenv
We create the virtual envirement
C:\> virtualenv c:\venv\
We launch the C:/venv/severcart/tkinstaller/install.py file for installation of necessary dependences. This program itself will download and will set necessary dependences for functioning of a software product of Severcart.
In installation process the name of the new user who will perform functions of the system administrator will also be requested.
We enter admin. Further the password is requested, we enter the password. We confirm password entry.
We add the following contents to the end of the C:\Apache24\conf\httpd.conf file
Alias /static "C:/venv/severcart/static" <Directory "C:/venv/severcart/static"> # for Apache 2.4 Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory> WSGIScriptAlias / "C:/venv/severcart/conf/wsgi_prod.py" WSGIPythonPath "C:/venv/Scripts/" <Directory "C:/venv/severcart/conf/"> <Files wsgi_prod.py> Require all granted </Files> </Directory>
Here ways by default to the program are selected. We reboot service Apaches in order that changes in the configuration file were applied.
net stop apache2.4 net start apache2.4
Further in the browser we open the http://127.0.0.1/ page. If you see the following
installation means took place successfully.
On it is installation is complete!