====== Configuration and administration ======
{{indexmenu_n>4}}
===== File .env =====
Watch a tutorial (english subs): {{youtube>KHqYpV3HXqU?}}
Subsystem configuration is done by editing the .env file \\ /var/www/html/dpiui2/backed/.env
The file has the following content:
\\
#System settings. It should remain unchanged.
APP_ENV=local
APP_DEBUG=true
APP_KEY=
APP_TIMEZONE=UTC
#Application URL. It is needed to form the correct link when sending QoE reports to e-mail
APP_URL=https://localhost/
#System settings regarding connection to the MySql DB, it should remain unchanged
DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=dpiui2
DB_USERNAME=root
DB_PASSWORD=vasexperts
#Settings regarding connection to the SMTP server. They are needed to send email notifications.
CFG_SMTP_UNAME=dpiuitest@gmail.com
CFG_SMTP_PW=dpiuitestdpiuitest
CFG_SMTP_HOST=smtp.gmail.com
CFG_SMTP_PORT=587
#tls or ssl
CFG_SMTP_SECURE=tls
#Technical support address
CFG_SEND_ERROR_EMAIL=sd@vas.expert
#Address for sending of email copies
CFG_SEND_COPY_EMAIL=
#System settings, prohibited from changing
CACHE_DRIVER=file
QUEUE_DRIVER=database
SESSION_DRIVER=cookie
#Settings regarding connection to QoE Stor
QOESTOR_DB_HOST=localhost
QOESTOR_DB_PORT=8123
QOESTOR_DB_USER=default
QOESTOR_DB_PASS=vasexperts
QOESTOR_DB_NAME=qoestor
QOESTOR_CACHE_LIFE_TIME_SEC=3600
QOESTOR_MAIN_LOG_PARTITIONS_LIFE_TIME_HOUR=24
QOESTOR_AGG_LOG_PARTITIONS_LIFE_TIME_DAYS=15
#Subscriber synchronization period in minutes (for the Subscribers and Services and Advertising sections)
SM_SUBSCRIBERS_UPDATE_PERIOD_MINUTES=30
#Data сleanup period for charts in the Performance Section
CHART_DATA_DELETE_DAYS_INTERVAL=60
#CG-NAT profile and statistics synchronization period
CG_NAT_SYNC_MINUTES_INTERVAL=5
#Хост Vas Cloud
VAS_CLOUD_HOST=5.200.37.122
If changes to .env have been made, you should run the following command: ''dpiui2 queue:restart''\\
//If the command is not found restart the ssh session in the terminal.//
===== Equipment connection =====
==== Sudo user ====
The equipment is connected and controlled using the SSH protocol. Connection must be done under a user with sudo privileges, or under the root user **(not recommended)**.
Watch a tutorial on connecting to DPI (english subs): {{youtube>81WMPGw6tak?}}
A new user should be created with sudo access granted on the connected equipment.
Let's consider ''dpisu'' user creating as an example:
- Create the ''dpisu user'' adduser dpisu
passwd dpisu
- Add to the ''/etc/sudoers.d/dpisu'' file the following stuff Defaults:dpisu !requiretty
Defaults secure_path = /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
dpisu ALL=(ALL) NOPASSWD: ALL //By doing this, you disable the dpisu user requirement for a password and the requiretty requirement when switching to sudo mode.//
- Disable the requiretty requirement in the file ''/etc/sudoers'' sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
=====Migrating the GUI from CentOS 7 to VEOS=====
- Install the latest version of the GUI on a **new** machine. For more information, see [[dpi:dpi_components:dpiui:install_and_update:install]]
- Update the GUI to the latest version on an **old** machine. For more information, see [[dpi:dpi_components:dpiui:install_and_update:update]]
- Disable all cron jobs related to the GUI on the **old machine**: # Back up current crontab jobs
crontab -l > ./cron_backup.txt
# Delete all user tasks
crontab -r
# Stopping the cron system service
sudo service crond stop
- Export the dpiui2 database from the **old** machine using the mysqldump utility.\\ :!: **Make sure you have enough free disk space beforehand!** . /var/www/html/dpiui2/backend/.env
mysqldump --add-drop-table --single-transaction=TRUE -u $DB_USERNAME --password=$DB_PASSWORD -h $DB_HOST -P $DB_PORT $DB_DATABASE | gzip > dpiui2.sql.gz
- Back up the contents of the **old** machine in the ''/var/www/html/dpiui2'' directory: sudo tar -zcvpf var_www_html_dpiui2.tar.gz /var/www/html/dpiui2/*
- Import the ''dpiui2.sql.gz'' file created in step 4 onto the **new** machine . /var/www/html/dpiui2/backend/.env
gunzip < dpiui2.sql.gz | mysql -u $DB_USERNAME --password=$DB_PASSWORD $DB_DATABASE
- Upload the contents of the archive created in step 5 to the **new** machine, into the ''/var/www/html/dpiui2'' folder: sudo tar -xzpf var_www_html_dpiui2.tar.gz -C /
- Reinstall the GUI package on a **new** machine: yum reinstall dpiui2
- Verify that everything is working correctly on the **new** GUI and that all policies/services have been migrated
- Run the uninstallation script on the **old** machine: source <(curl https://vasexperts.ru/install/dpiui2-rpm_uninstall.sh)