Edjet LMS Server 6.4
Setup a Windows server
This tutorial will guide you trough the setup of a virtual or physical server with Windows operating system.
Article outline:
Edjet LMS can be run on any Windows version or edition, that can run required software. It can also run on Linux and in the Docker container.
This guide was tested with:
- Windows Server 2016
- Windows Server 2019
You can use any cloud provider of your choice to launch virtual machine or use any other way to run a Windows server.
Follow the tutorial Get started with Amazon EC2 Windows instances.
Download and install Apache 2.4 webserver and run the webserver as a service.
- Download latest C++ Redistributable Visual Studio 2015,2017,2019 (vc_redist_x86) from https://www.apachelounge.com/download/.
- Install downloaded C++ Redistributable.
- Download latest Apache 2.4 32-bit from https://www.apachelounge.com/download/.
- Unzip downloaded archive into C:\Apache24\
- Run cmd.exe as an Administrator to install Apache httpd service:
C:\Apache24\bin\httpd.exe -k install
- Start Apache service:
C:\Apache24\bin\httpd.exe -k start
- Enable mod_rewrite in the config file "C:\Apache24\conf\httpd.conf":
uncomment line
LoadModule rewrite_module modules/mod_rewrite.so
- Enable htaccess override in config file "C:\Apache24\conf\httpd.conf" in section <Directory "${SRVROOT}/htdocs">:
change
AllowOverride None
to
AllowOverride All
- Restart the Apache webserver:
C:\Apache24\bin\httpd.exe -k restart
Configure Apache to setup setup HTTPS connection and SSL certificates to run Edjet LMS securely.
- Enable Apache SSL module in the config file "C:\Apache24\conf\httpd.conf":
uncomment line
LoadModule ssl_module modules/mod_ssl.so
and uncomment line
Include conf/extra/httpd-ssl.conf
and uncomment line
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
- Redirect requests from http to https for your domain/hostname in the config file "C:\Apache24\conf\httpd.conf":
ServerName lms.example.com:80
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
Replace "lms.example.com" with your domain/hostname.
- Copy your SSL certificates (.crt and .key) into "C:\Apache24\conf\".
- To match certificate names and Apache config, you can either:
- Rename the files to "server.crt" and "server.key".
- Update the Apache config to your names.
- Configure https for your domain/hostname in the config file "C:\Apache24\conf\exra\httpd-ssl.conf":
ServerName lms.example.com:443
Replace "lms.example.com" with yout domain/hostname.
- Restart the Apache webserver:
C:\Apache24\bin\httpd.exe -k restart
For more information and Apache documentation visit http://httpd.apache.org/
Download and install PostgreSQL and enable support in PHP.
- Download PostgreSQL 10 32-bit from: https://www.enterprisedb.com/downloads/postgres-postgresql-downloads.
- Run downloaded installer (with standard priviledges) and install PostgreSQL.
- Install into "C:\PostgreSQL\" folder.
- Install all components including pgAdmin4 (recommended).
- Keep other setting in default (data directory, port 5432, superuser username,...).
- To enable PostgreSQL support in PHP (load a db driver via Apache), open Apache config file "C:\Apache24\conf\httpd.conf" and add this line to the end of file:
LoadFile "C:\PostgreSQL\bin\libpq.dll"
Create a new database to be used by LMS.
- Run any SQL manager (you can use installed PgAdmin4).
- Log into PostgreSQL using "postgres" superuser.
- Create new role "template_c6":
- Create role with a password.
- Enable login and create database priviledges.
- Create new database named "learnis"* with owner "template_c6":
database encoding must be set to UTF-8 otherwise the installation will fail.
*You can choose different name according to your project name.
Download and install PHP and configure php.ini.
- Download latest PHP 7.2 32-bit VC15 x86 from: https://windows.php.net/downloads/releases/archives/.
- Unzip downloaded archive into "C:\php\
- Enable Apache webserver PHP 7.2 support in the Apache config file "C:\Apache24\conf\httpd.conf":
add following lines to the end of the file:
LoadModule php7_module "C:/php/php7apache2_4.dll"
AddHandler application/x-httpd-php .php
# configure the path to php.ini
PHPIniDir "C:/php"
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
- Rename "c:\php\php.ini-production file to php.ini
- Enable required extensions in the config file "c:\php\php.ini":
add following lines to the end of the file:
extension=C:/php/ext/php_pgsql.dll
extension=C:/php/ext/php_mbstring.dll
extension=C:/php/ext/php_gd2.dll
extension=C:/php/ext/php_fileinfo.dll
extension=C:/php/ext/php_openssl.dll
extension=C:/php/ext/php_ldap.dll
- Enable short open tags in the config file "c:\php\php.ini":
change line
short_open_tag = Off
to
short_open_tag = On
- Set max. upload size using config file "c:\php\php.ini":
upload_max_filesize = 500M
- Set max. post size using config file "c:\php\php.ini":
post_max_size = 508M
- Set max. input vars using config file "c:\php\php.ini":
max_input_vars = 100000
- Set correct timezone using config file "c:\php\php.ini" (date.timezone)
- Restart the Apache webserver:
C:\Apache24\bin\httpd.exe -k restart
Other PHP configuration
- Add path to PHP folder "C:\php" into Windows Environment variables (System variables).
- Create folder for LMS temporary data in " C:\php\tmp".
- Download ionCube PHP Loader for Windows (VC15, 32 bits) from: https://www.ioncube.com/loaders.php.
- Unzip downloaded archive.
- Copy file "ioncube_loader_win_7.2.dll" to folder "C:\php\ext\"
- Enable the loader in the config file "c:\php\php.ini":
add following line to the end of the file:
zend_extension=C:/php/ext/ioncube_loader_win_7.2.dll
- Restart the Apache webserver:
C:\Apache24\bin\httpd.exe -k restart
Task Scheduler is used to run Edjet LMS Server scripts periodically.
- Launch Windows Task Scheduler.
- Add new task:
Download Edjet LMS Server installation file (zip archive) to the server and prepare everything for the LMS installation.
The Edjet LMS application files will be placed in the folder "C:\Apache24\htdocs".
- Clear all files (including hidden files, .htaccess etc.) in the folder "C:\Apache24\htdocs".
- Download the Edjet LMS Server 6.4.23 installation file.
- Extract the content of the installation archive to "C:\Apache24\htdocs"
You have completed the server setup. Congratulations!
Now you can move to the installation of Edjet LMS Server.
If you are reporting issues, please provide as much info about the error as possible, namely:
- Provide operating system including version.
- Provide what software dependencies you use, including versions.
- Provide (copy & paste) text(s) or screenshot(s) of any error(s) displayed during setup.
- Provide any other additional info that can help us to find a solution for error.