The update will be done through a console of the server being updated. A console (or a terminal) is a window of a Linux-based operating system where you can type commands in a text form - as strings. Depending on the server type, when started, the console may display general information on the server and an invitation to log in or just an invitation to log in without general information. In any case, you have to enter the user login that will be used for working the console. The console looks as follows: Image Added All TM servers (TME Node Server installation type) and DBMS server (TME DB Server must be updated). The update is done in the following order: Step 1. Updating all TM servers (TME Node Server). Step 2. Updating and restarting DBMS (TME DB Server). Step 3. Restarting all TM servers (TME Node Server). STEP 1. UPDATING ALL TM SERVERS (TME Node Server) To update TM servers (TME Node Server), take the following steps on each of them: - Open the console of the server being updated:
- in the case of a physical server - the console is displayed on the screen of a monitor connected to the server;
- in the case of a virtual server - run Launch Virtual Machine Console command (see the example below).
Image Added A window with the server console will open.
- In the Login as: (or login: - depending on the server type) line, enter root and press Enter.
Image Added In the root@<server_address>'s password: (or Password: - depending on the server type) line, enter a password of the root user (superuser) and press Enter. Please, note that nothing is displayed in the line while typing. Image Added The screen will display the service information and (in the last line) an invitation to enter the command (command line). | Подсказка |
|---|
| In the console, commands are entered from the keyboard and must be confirmed by pressing Enter . So, if the instruction tells you to enter the command, it means that you should enter the command and then press Enter . Once the command is executed, the invitation is displayed again - it is ended with # or $ (depending on the user who logged in). Before typing the next command, make sure that an invitation is displayed at the command line. |
- Enter the command to call the file manager:
mc Image Added
The screen will display a window of Midnight Commander file manager where you can view files. You can navigate in the file manager using keyboard arrows and the Enter key or with a mouse. Besides, you can enter commands at the command line which is displayed in the lower part of the screen (for entering commands, no additional actions are required). To go up one level, position the cursor in the /.. field (the first line in the file manager) and press Enter. Go to the /opt/iw/tm5 directory and make sure that it contains iwks_mode file. Image Added | Информация |
|---|
| If iwks_mode file is missing in the directory, you need to create it. For this, enter the command: touch iwks_mode
|
Position the cursor on the iwks_mode fine and press F3. The screen will display the content of iwks_mode file: "iwtm" word (indicated that the installation type is TME Node server). | Информация |
|---|
| If the file content is different: 1. press F3 again. 2. press F4. 3. in the window that opens, delete all characters and enter iw tm 4. press F2. 5. in the window that opens, confirm the file saving by clicking Save. 6. press F10. 7. press F3 and make sure that the file content is correct. |
- Press F3.
- Enter the command:
mkdir -p /mnt/rhel-dvd The /mnt/rhel-dvd directory will be created. - Make sure that a distribution disk with InfoWatch Traffic Monitor is connected to the server (see the "Updating the System" article, step 2).
Enter the command: mount /dev/cdrom /mnt/rhel-dvd | Информация |
|---|
| There is a space between the words "/dev/cdrom" and "/mnt/rhel-dvd". |
The distribution disk which is located in /dev/cdrom section will be connected as a repository in /mnt/rhel-dvd directory. Go to /mnt/rhel-dvd directory and make sure that in contains files and folders. If the directory is empty, repeat steps 9 and 10. Go to the /etc/yum.repos.d directory and make sure that it contains rhel-dvd.repo file (this file is required to specify the path to the update files). | Информация |
|---|
| As, in the file manager, the elements are sorted in the alphabetic order, folders precede files (as they begin with a slash ( / )) . So the /yum.repos.d directory is one of the last in the last of folders which begin with "/", but is previous to the first file . |
Image Added
| Информация |
|---|
| If the rhel-dvd.repo file is missing in the directory, you need to create it. For this, enter the command: touch rhel-dvd.repo
|
Position the cursor on the rhel-dvd.repo file and press F4. - In the window that opens, delete all characters and enter the following text:
[rhel-dvd] name=Red Hat Enterprise Linux $releasever - $basearch - DVD baseurl=file:///mnt/rhel-dvd/ enabled=1 gpgcheck=0
[rhel-dvd-iwtm] name=DVD_IWTM baseurl=file:///mnt/rhel-dvd/infowatch/traffic-monitor/Linux/ enabled=1 gpgcheck=0
- Press F2.
- In the window that opens, confirm the file saving by clicking Save.
- Press F10.
Press F3 and make sure that the file content is correct, then press F3 again to close the file. - To exit the file manager (is required to better control command execution), enter the command:
exit - Enter the command to clean the package manager cache:
yum clean all - Enter commands to stop the interceptors:
service iwtm stop icap service iwtm stop smtpd service iwtm stop expressd service iwtm stop sniffer service iwtm stop xapi_xapi service iwtm stop xapi_puppy - Enter the command to call the file manager again:
mc Wait until all events which are in the queue for processing are processed. Events in the queue are located in the following directories: opt/iw/tm5/queue/analysis/.db/ opt/iw/tm5/queue/analysis/.in/ opt/iw/tm5/queue/analysis/.out/ opt/iw/tm5/queue/db/.db/ opt/iw/tm5/queue/db/.in/ opt/iw/tm5/queue/db/.out/ opt/iw/tm5/queue/smtp/.db/ opt/iw/tm5/queue/smtp/.in/ opt/iw/tm5/queue/smtp/.out/ When all events are processed, these directories will be empty. | Предупреждение |
|---|
| To continue the update, make sure that all specified directories are empty. Otherwise, we cannot guarantee that the System will be updated correctly and will operate properly after the update. If for some reason, you cannot wait until the processing is complete, you can delete events from the queue; such events will be completely removed from the System. To delete the event, go to the required directory in the file manager, position the cursor on the event you want to delete and press F8. Then, confirm the deletion by clicking Yes in the confirmation window that opens. |
- To exit the file manager (is required to better control command execution), enter the command:
exit - To stop services of Traffic Monitor server, enter the commands:
service iwtm stop service php-fpm stop service nagios stop
- Depending on the DBMS, enter the command to start the process of updating packages:
- Before loading files required for installation, the screen will display a request like this
Image Added . To continue, type Y and press Enter. Downloading packages from the repository and then installing the packages will begin. This may take some time. Image Added
- Enter the command to call the file manager:
mc If while using the System, configuration files with .conf extension have been modified, then go to the /opt/iw/tm5/etc directory and check if it contains files with conf.rpmnew extension. If the directory contains such files, you need to properly merge them with configuration files (see "Merging .conf, .cfg and .lua configuration files with .conf.rpmnew, .cfg.rpmnew and .lua.rpmnew configuration files"). | Предупреждение |
|---|
| If PostgreSQL DBMS is used in the System, it is necessary to take the following steps when updating Traffic Monitor version 6.0 or 6.1 to 6.5 and higher: 1. Go to the /opt/iw/tm5/etc directory. 2. Position the cursor on the postgresql.conf.rpmnew file. 3. Press F3. 4. Make sure that the value of Port parameter is 5433. If the parameter value is different, press F3 and change the parameter value to the required one. For this, take the following steps: - Position the cursor on the postgresql.conf.rpmnew file in the file manager.
Image Added - Press F4.
Replace values of file sections with values of corresponding sections of the postgresql.conf file. The result will look like this: Image Added | Информация |
|---|
| For the distributed installation type, the value of the "Host" field will be an IP address of the server where the DBMS is installed. For example: Image Added |
- Press F2.
- In the window that opens, confirm the file saving by clicking Save.
- Press F10.
Press F3 and make sure that the file content is correct. Then press F3 again to close the file. - Position the cursor on the postgresql.conf file in the file manager.
- Press F8 to delete the postgresql.conf file.
- In the window that opens, confirm the file deletion by clicking Yes.
- Select the postgresql.conf.rpmnew file in the file manager.
- Press F6.
- In the to field, enter
/opt/iw/tm5/etc/postgresql.conf and press Enter. Now the System has only one PostgreSQL configuration file - postgresql.conf. It has a file structure of the new version and the required content: Image Added
|
- If while using the System, configuration files with .cfg extension (Nagios service) have been modified, then go to the
/etc/nagios/iwmon directory and check if it contains files with cfg.rpmnew extension. If the directory contains such files, you need to properly merge them with configuration files (see "Merging .conf, .cfg and .lua configuration files with .conf.rpmnew, .cfg.rpmnew and .lua.rpmnew configuration files"). - If while using the System, LUA script files (files with .lua extension) have been modified, then go to the
/opt/iw/tm5/etc/scripts/ directory and check if it contains files with .lua.rpmnew extension. If the directory contains such files, you need to properly merge them with configuration files (see "Merging .conf, .cfg and .lua configuration files with .conf.rpmnew, .cfg.rpmnew and .lua.rpmnew configuration files"). - Update the DBMS server (TME DB Server) - see the description below.
STEP 2. UPDATING DBMS SERVER (TME DB Server) To update the DBMS server (TME DB Server), take the following steps: - Open the console of the server being updated:
- in the case of a physical server - the console is displayed on the screen of a monitor connected to the server;
- in the case of a virtual server - run Launch Virtual Machine Console command (see an example below).
Image Added A window with the server console will open.
- In the Login as: (or login: - depending on the server type) line, enter root and press Enter.
In the root@<server_address>'s password: (or Password: - depending on the server type) line, enter a password of the root user (superuser) and press Enter. The screen will display the service information and (in the last line) an invitation to enter the command (command line). - Enter the command to call the file manager:
mc Image Added The screen will display a window of Midnight Commander file manager where you can view files. You can navigate in the file manager using keyboard arrows and the Enter key or with a mouse. Besides, you can enter commands at the command line which is displayed in the lower part of the screen (for entering commands, no additional actions are required). To go up one level, position the cursor in the /.. field (the first line in the file manager) and press Enter. Go to the /opt/iw/tm5 directory and make sure that it contains iwks_mode file. Image Added | Информация |
|---|
| If iwks_mode file is missing in the directory, you need to create it. For this, enter the command: touch iwks_mode
|
Position the cursor on the iwks_mode fine and press F3. The screen will display the content of iwks_mode file: "iwdb" word (indicates that the installation type is TME DB server). | Информация |
|---|
| If the file content is different: 1. press F3 again. 2. press F4. 3. in the window that opens, delete all characters and enter iwdb 4. press F2. 5. in the window that opens, confirm the file saving by clicking Save. 6. press F10. 7. press F3 and make sure that the file content is correct. |
- Press F3.
- Enter the command:
mkdir -p /mnt/rhel-dvd The /mnt/rhel-dvd directory will be created. - Make sure that a distribution disk with InfoWatch Traffic Monitor is connected to the server (see the "Обновление Системы" article, step 2).
Enter the command: mount /dev/cdrom /mnt/rhel-dvd | Информация |
|---|
| There is a space between the words "/dev/cdrom" and "/mnt/rhel-dvd". |
The distribution disk which is located in the /dev/cdrom section will be connected as a repository in the /mnt/rhel-dvd directory.
- Go to the
/mnt/rhel-dvd directory and make sure that in contains files and folders. If the directory is empty, repeat steps 9 and 10. Go to the /etc/yum.repos.d directory and make sure that it contains rhel-dvd.repo file (this file is required to specify the path to the update files). | Информация |
|---|
| As, in the file manager, the elements are sorted in the alphabetic order, folders precede files (as they begin with a slash ( / )) . So the /yum.repos.d directory is one of the last in the last of folders which begin with "/", but is previous to the first file . |
Image Added
| Информация |
|---|
| If the rhel-dvd.repo file is missing in the directory, you need to create it. For this, enter the command: touch rhel-dvd.repo
|
- Position the cursor on the rhel-dvd.repo file and press F4.
- In the window that opens, delete all characters and enter the following text:
[rhel-dvd] name=Red Hat Enterprise Linux $releasever - $basearch - DVD baseurl=file:///mnt/rhel-dvd/ enabled=1 gpgcheck=0
[rhel-dvd-iwtm] name=DVD_IWTM baseurl=file:///mnt/rhel-dvd/infowatch/traffic-monitor/Linux/ enabled=1 gpgcheck=0
| Предупреждение |
|---|
| If you want to install a new standard classification base (the old classification base and changes made to it will be lost), enter an additional text: [rhel-dvd-iwtm-cfdb] name=DVD_IW-CFDB baseurl=file:///mnt/rhel-dvd/infowatch/traffic-monitor/cfdb/ enabled=1 gpgcheck=0 |
- Press F2.
- In the window that opens, confirm the file saving by clicking Save.
- Press F10.
Press F3 and make sure that the file content is correct, then press F3 again to close the file. - To exit the file manager (is required to better control command execution), enter the command:
exit - Enter the command to clean the package manager cache:
yum clean all - Depending on the DBMS, enter the command to start the process of updating packages:
- Before loading files required for installation, the screen will display a request like this
Image Added . To continue, type Y and press Enter. Downloading packages from the repository and then installing the packages will begin. This may take some time. Image Added - Enter the command to call the file manager:
mc If while using the System, configuration files with .conf extension have been modified, then go to the /opt/iw/tm5/etc directory and check if it contains files with conf.rpmnew extension. If the directory contains such files, you need to properly merge them with configuration files (see "Merging .conf, .cfg and .lua configuration files with .conf.rpmnew, .cfg.rpmnew and .lua.rpmnew configuration files"). | Предупреждение |
|---|
| If PostgreSQL DBMS is used in the System, it is necessary to take the following steps when updating Traffic Monitor version 6.0 or 6.1 to 6.5 and higher: 1. Go to the /opt/iw/tm5/etc directory. 2. Position the cursor on the postgresql.conf.rpmnew file. 3. Press F3. 4. Make sure that the value of Port parameter is 5433. If the parameter value is different, press F3 and change the parameter value to the required one. For this, take the following steps: - Position the cursor on the postgresql.conf.rpmnew file in the file manager.
Image Added - Press F4.
Replace values of file sections with values of corresponding sections of the postgresql.conf file. The result will look like this: Image Added | Информация |
|---|
| For the distributed installation type, the value of the "Host" field will be an IP address of the server where the DBMS is installed. For example: Image Added |
- Press F2.
- In the window that opens, confirm the file saving by clicking Save.
- Press F10.
Press F3 and make sure that the file content is correct. Then press F3 again to close the file. - Position the cursor on the postgresql.conf file in the file manager.
- Press F8 to delete the postgresql.conf file.
- In the window that opens, confirm the file deletion by clicking Yes.
- Select the postgresql.conf.rpmnew file in the file manager.
- Press F6.
- In the to field, enter
/opt/iw/tm5/etc/postgresql.conf and press Enter. Now the System has only one PostgreSQL configuration file - postgresql.conf. It has a file structure of the new version and the required content:
|
- If while using the System, configuration files with .cfg extension (Nagios service) have been modified, then go to the
/etc/nagios/iwmon directory and check if it contains files with cfg.rpmnew extension. If the directory contains such files, you need to properly merge them with configuration files (see "Merging .conf, .cfg and .lua configuration files with .conf.rpmnew, .cfg.rpmnew and .lua.rpmnew configuration files"). - If while using the System, LUA script files (files with .lua extension) have been modified, then go to the
/opt/iw/tm5/etc/scripts/ directory and check if it contains files with .lua.rpmnew extension. If the directory contains such files, you need to properly merge them with configuration files (see "Merging .conf, .cfg and .lua configuration files with .conf.rpmnew, .cfg.rpmnew and .lua.rpmnew configuration files"). - Depending on DBMS, go to the directory:
-
/opt/iw/tm5/csw/oracle (если используется СУБД Oracleif Oracle DBMS is used); -
/opt/iw/tm5/csw/postgres (если используется СУБД PostgreSQLif PostgreSQL DBMS is used).
- Выделите файл Select the database.conf file.
Image Removed - Нажмите Press F3.
- Убедитесь, что для параметра Make sure that for the
\set schema_version указана версия, до которой происходит обновление. Если указана старая версия, повторите действия parameter, a version to which you are updating the System is specified. If an old version is specified, repeat steps 28 - 37. - Нажмите Press F3.
- Для выхода из файлового менеджера (требуется для лучшего контроля выполнения команд) введите команду:
exit - Последовательно введите команды для остановки служб:
service iwtm stop
service nagios stop - В зависимости от используемой СУБД введите команду для переключения на нужного пользователя:
su - oracle - для переключения на пользователя oracle (если в Системе используется СУБД Oracle)su - postgres - для переключения на пользователя postgres (если в Системе используется СУБД PostgreSQL)
- В зависимости от используемой СУБД введите команду для перехода в нужную директорию:
cd /opt/iw/tm5/csw/oracle - (если в Системе используется СУБД Oracle)cd /opt/iw/tm5/csw/postgres - (если в Системе используется СУБД PostgreSQL)
- Введите команду для запуска скрипта (сценария) обновления БД:
./update.sh
Начнется процесс обновления схемы данных. Это может занять некоторое время. Если пакет web-gui установлен на сервере СУБД (TME DB Server), введите команду для очистки кеша: redis-cli flushall
Введите команду для переключения на пользователя root (суперпользователя): su - root- Введите пароль пользователя root, нажмите Enter.
Запустите остановленные службы: service iwtm start service nagios start - Введите команду для перезагрузки сервера:
reboot - Дождитесь загрузки сервера и выполните вход от имени пользователя root (ШАГ 1, действия 2 и 3 данной инструкции).
Введите команду для проверки запуска процессов: service iwtm status На экране отобразится список процессов и их статус. Сервисы должны быть запущены, при этом строки должны заканчиваться фразой "is running...": Image Removed - Запустите все Серверы TM (TME Node Server) - описание смотрите ниже.
ШАГ 3. ПЕРЕЗАПУСК СЕРВЕРОВ TM (TME Node Server) Чтобы перезапустить Серверы TM (TME Node Server), на каждом из них выполните следующие действия: Если пакет web-gui установлен на сервере TM (TME Node Server), введите команду для очистки кеша: redis-cli flushall
Запустите остановленные ранее службы: service iwtm start service php-fpm start service nagios start - Введите команду для перезагрузки сервера:
reboot - Дождитесь загрузки сервера и выполните вход от имени пользователя root (ШАГ 1, действия 2 и 3 данной инструкции).
Введите команду для проверки запуска процессов: service iwtm status На экране отобразится список процессов и их статус. Обычно сервисы iw_qmover_client и iw_qmover_server бывают остановлены, а все остальные сервисы - запущены, при этом строки должны заканчиваться фразой "is stopped (disabled)..." для сервисов iw_qmover_client и iw_qmover_server и фразой "is running..." для всех остальных сервисов: Image Removed | Информация |
|---|
| При наличии в Системе подсистемы Краулер потребуется запустить службы указанной подсистемы (на сервере Краулер). Данная процедура выполняется на сервере, где установлена подсистема, стандартными средствами ОС Windows: Пуск - Панель управления - Администрирование - Службы, затем потребуется выделить службу в списке служб и нажать Запуск службы. |
Обновление сервера Traffic Monitor распределенного типа установки завершено. Если в Системе есть другие серверы или подсистемы, подлежащие обновлению, воспользуйтесь инструкциями данного раздела. | Информация |
|---|
| Для корректного отображения консоли управления до начала работ удалите кеш в вашем браузере. Данное действие выполняется стандартными средствами браузера. |
|