en:dpi:dpi_components:модуль_wi-fi_hotspot [Документация VAS Experts]

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:dpi:dpi_components:модуль_wi-fi_hotspot [2020/03/03 07:17] kvazikraven:dpi:dpi_components:модуль_wi-fi_hotspot [2022/03/29 12:41] (current) – removed edrudichgmailcom
Line 1: Line 1:
-====== 8 Wi-Fi HotSpot Module ====== 
-{{indexmenu_n>8}} 
-===== Introduction ===== 
-The module provides the feature to [[https://vasexperts.ru/products/skat/identifikaciya-polzovatelej-v-seti-wifi/|authorize users by phone number in public Wi-Fi networks]]. 
- 
-===== Architecture ===== 
- 
-{{ :dpi:dpi_components:wifif_hotspot_scheme.png?600 |}} 
-===== Scenarios of use ===== 
- 
-When a subscriber connects to Wi-Fi, the router requests the DCHP server to obtain a new IP address. The server returns the addresses to the router and runs the shell-script, which activates the tariff with limited access and the “White List”. It makes sense to include in the white lists, for example, the site of the provider or organization providing public Wi-Fi. 
- 
-Then the subscriber is redirected to the browser start page, where he needs to go through the authorization by phone number. The web server receives a successful authorization response from the SMS gateway and, using a shell-script, disables restrictions specified on the DPI and redirects the subscriber to the desired page. 
- 
-{{ :dpi:dpi_components:wifi_hotspot_scenario.png?600 |}} 
-===== Installation and Upgrade ===== 
- 
-==== Hardware Recommendations ==== 
-In order to run the module you can use the following hardware or virtual machines matching the following characteristics: 
-  - CPU 2.5 GHz, 1 pcs 
-  - RAM 512 MB - 1 GB 
-  - HDD 20 GB - 50 GB 
-  - Operating system Cent OS 6.4 - 7+ 
-  - NIC ranging from 10 Mб/сек 
- 
-<note>Recommended operating system is Cent OS  7+ 
-If you need to install the module on Cent OS 6, make sure that supervisor 3+ is installed. If you do not have the needed package, plese contact the VAS Experts technical support. 
-</note> 
- 
-<note important>Do not install the module on the same hardware running the DPI or the VAS Experts DPI 2 management interface! Use a dedicated virtual machine instead.</note> 
- 
-==== Before installation ==== 
- 
-=== New Virtual Machine === 
- 
-  - Make sure the openssh-clients is installed, it is required to connect to the DPI 
-  - The rest of environment will be installed automatically 
- 
-=== Old Virtual Machine === 
- 
-  - Make sure the openssh-clients is installed, it is required to connect to the DPI 
-  - If PHP version <7.1 is installed, uninstall the old one: <code>yum -y remove php*</code> The new version will be installed automatically during dpiui2 installation. 
-  - If MySql is installed, uninstall it:<code>yum remove mysql mysql-server mysql-community-common</code> Also delete the MySql directory: <code>mv /var/lib/mysql /var/lib/mysql_old_backup</code> During wifi_hotspot installation MariaDB 10.2+ will be installed 
- 
- 
-=== CentOS 6 === 
- 
-Recommended operating system is Cent Cent OS  7+ 
-If you need to install the module on Cent OS 6, make sure that supervisor 3+ is installed. If you do not have the needed package, plese install it using the following commands: 
-<code> 
-sudo wget https://vasexperts.ru/install/supervisor-3.0-1.gf.el6.noarch.rpm 
-yum install supervisor-3.0-1.gf.el6.noarch.rpm 
-</code> 
- 
-==== Installation ==== 
- 
- 
-<note warning>Before installing or upgrading, check your internet connection. Run scripts with root privilege or using sudo.</note> 
- 
-<note important>**Attention**: You should to disable selinux. To do this, set SELINUX = disabled in the /etc/selinux/config file and restart server.</note> 
- 
-<note important>**Attention**: If you've installed and configured the virtual machine using [[en:dpi:dpi_components:dpiui:dpiui2#hotspot_management|HotSpot Management]] section before you install this module on it, all the needed tools and settings will be installed automatically.</note> 
- 
-Для установки запустите скрипт: 
-<code> 
-#!/usr/bin/env bash 
- 
-info () { 
-    echo -e " info:    $@ "; 
-} 
- 
-ok () { 
-    echo -e " done:    $@ "; 
-} 
- 
-error () { 
-    echo -e  " ERROR:  $@"; 
-} 
- 
-CENTOSRELEASE=`cat /etc/redhat-release` 
-SUBSTR=`echo $CENTOSRELEASE|cut -c1-22` 
-SUBSTR2=`echo $CENTOSRELEASE|cut -c1-26` 
- 
-#Check OS version 
-CentOsVersion=0 
-if [ "$SUBSTR" = "CentOS Linux release 7" ] 
-    then 
-        CentOsVersion=70 
-elif [ "$SUBSTR2" == "CentOS release 6.5 (Final)" ] 
-    then 
-        CentOsVersion=65 
-elif [ "$SUBSTR2" == "CentOS release 6.4 (Final)" ] 
-    then 
-        CentOsVersion=64 
-else 
-    CentOsVersion=60 
-fi 
- 
-#Configure repos 
-info "Configuring repos..." 
- 
-rpm --import http://vasexperts.ru/centos/RPM-GPG-KEY-vasexperts.ru 
-rpm -Uvh http://vasexperts.ru/centos/6/x86_64/vasexperts-repo-1-0.noarch.rpm 
- 
- 
-MARIADB_REPO=/etc/yum.repos.d/mariadb.repo 
-if [ "$CentOsVersion" == 70 ] 
-then 
-        rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm 
-        rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm 
-         
-        echo "[mariadb] 
-name=MariaDB 
-baseurl=http://yum.mariadb.org/10.2/centos7-amd64 
-gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB 
-gpgcheck=1" > $MARIADB_REPO 
- 
-else 
- 
-        rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm 
-        rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm 
-         
-        MACHINE_TYPE=`uname -m` 
-        if [ ${MACHINE_TYPE} == 'x86_64' 
-        then 
- 
-echo "[mariadb] 
-name=MariaDB 
-baseurl=http://yum.mariadb.org/10.2/centos6-amd64 
-gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB 
-gpgcheck=1" > $MARIADB_REPO 
- 
-else 
-echo "[mariadb] 
-name=MariaDB 
-baseurl=http://yum.mariadb.org/10.2/centos6-x86 
-gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB 
-gpgcheck=1" > $MARIADB_REPO 
-fi 
- 
- 
-fi 
-ok "Finished Configuring repos." 
- 
-#wifi_hotspot install 
-info "Wifi hotspot package installing..." 
- 
-yum install -y wifi_hotspot --exclude=php-common*; 
- 
-info "Finished wifi_hotspot package installing." 
-</code> 
- 
-Будет произведена установка rpm-пакета wifi_hotspot. Будет произведена автоматическая настройка согласно конфигурации. 
- 
-В процессе установки будет произведена установка / обновление окружения: 
-  - PHP >= 7.1 
-  - MariaDB >= 10.2 
-  - Apache 
-  - Composer 
-  - PHP SSH2 lib 
-  - Laravel/Lumen 
- 
-В процессе установки будут открыты необходимые порты, а также запущен cron для выполнения фоновых задач по расписанию. 
- 
-Установка подсистемы будет произведена в папку: \\ <code>/var/www/html/wifi_hotspot/</code> 
- 
-После инсталляции, введите в браузере: 
-\\ <code>http://<IP адрес VM>/</code> 
- 
-==== Обновление ==== 
-Для обновления ранее установленной версии, выполните команду <code>yum install -y wifi_hotspot</code> 
- 
-==== Конфигурация ==== 
- 
-Системные настройки модуля находятся в файле .env <code>/var/www/html/wifi_hotspot/backend/.env</code> 
- 
-Содержимое файла следующее: 
-<code> 
-#Системные настройки, лучше не трогать 
-APP_ENV=local 
-APP_DEBUG=true 
-APP_KEY= 
-APP_TIMEZONE=UTC 
- 
-#Системные настройки подключения к БД MySql, лучше не трогать 
-DB_CONNECTION=mysql 
-DB_HOST=localhost 
-DB_PORT=3306 
-DB_DATABASE=wifi_hotspot 
-DB_USERNAME=root 
-DB_PASSWORD=vasexperts 
- 
-#Настройки подключения к SMTP-серверу. Нужны для отправки данных по авторизации в режиме отладки. 
-CFG_SMTP_UNAME=smtptestvasexperts@gmail.com 
-CFG_SMTP_PW=pH3xkXTp1 
-CFG_SMTP_HOST=smtp.gmail.com 
-CFG_SMTP_PORT=587 
-CFG_SMTP_SECURE=tls 
-CFG_SMTP_SENDER=smtptestvasexperts@gmail.com 
- 
-#Системные настройки, трогать нельзя 
-CACHE_DRIVER=file 
-QUEUE_DRIVER=database 
-SESSION_DRIVER=cookie 
- 
-</code> 
- 
-<note important>Если были внесены изменения в .env, необходимо выполнить команду \\ <code>php /var/www/html/wifi_hotspot/backend/artisan queue:restart</code></note> 
-==== Информация о версиях ==== 
-=== Версия v.1.1.0 (06.11.2019) === 
-  * Переработан процесс замены логотипа и иконки через интерфейс dpiui2 
-  * Изменен ограничение размера файла логотипа или иконки с 64кб до 750кб 
- 
-=== Версия v.1.0.10 (25.10.2019) === 
-  * Исправление отображения портала на мобильных устройствах 
-  * Исправление алгоритма повторной авторизации  
- 
-=== Версия v.1.0.7 (15.09.2019) === 
-  * Создан новый модуль Wi-Fi HotSpot 
- 
-===== Известные проблемы ===== 
-  * <del>При изменении логотипа в разделе [[dpi:dpi_components:dpiui:dpiui2#управление_разделом_hotspot| Хотспот]] существует ограничение на максимальный размер файла 64кб. **Будет исправленно в версии v.1.1.0.**</del>