Обновлению подлежат все серверы TM (тип установки TM Node) и сервер СУБД (тип установки DB Node). | Предупреждение |
|---|
| Каждый сервер должен иметь уникальный корректный FQDN. |
Порядок обновления следующий: Шаг 1. Обновление всех серверов TM (TM Node). Шаг 2. Обновление и перезапуск сервера СУБД (DB Node). Шаг 3. Перезапуск всех серверов TM (TM Node). ШАГ 1. ОБНОВЛЕНИЕ ВСЕХ СЕРВЕРОВ TM (TM Node) Чтобы обновить Серверы TM (TM Node), на каждом из них выполните следующие действия: Откройте консоль обновляемого сервера.Введите имя пользователя, от имени которого планируется обновление, и нажмите Enter. Введите пароль и нажмите Enter.Вызовите командную строку (например, терминал Fly). Введите команду для вызова файлового менеджера: mc
Image Removed На экране отобразится окно файлового менеджера Midnight Commander, в котором удобно просматривать файлы. Перейдите в директорию /opt/iw/tm5 и убедитесь в наличии там файла iwks_mode.
Image Removed
| Информация |
|---|
| Если файл iwks_mode отсутствует в директории, то его необходимо создать. Для этого введите команду: touch iwks_mode
|
Убедитесь, что содержимое файла - слово "iwtm". | Информация |
|---|
| Если файл имеет другое содержимое, удалите все символы и введите: iwtm | Вставьте в CD-привод диск Astra-Linux-Smolensk-1.5_x86_64.Скопируйте все содержимое диска в произвольную директорию на жестком диске. Например, в директорию /disk1. Вставьте в CD-привод диск Astra-Linux-Smolensk-Devel-1.5_x86_64.Скопируйте все содержимое диска в произвольную директорию на жестком диске. Например, в директорию /disk2.Откройте на редактирование файл sources.list, расположенный в директории /etc/aptУдалите все строки и введите следующее:
deb file:///директория_1/ smolensk main non-free contrib
deb file:///директория_2/ smolensk main non-free
где: директория_1 - это абсолютный путь к директории, в которой сохранены данные с диска Astra-Linux-Smolensk-1.5_x86_64директория_2 - это абсолютный путь к директории, в которой сохранены данные с диска Astra-Linux-Smolensk-Devel-1.5_x86_64
В нашем примере текст файла будет следующим: deb file:///disk1/ smolensk main non-free contrib
deb file:///disk2/ smolensk main non-free
Сохраните файл sources.list. Cкопируйте файл iwtm-installer-x.x.x.xxx-astra-smolensk.run (где x.x.x.xxx - номер сборки) и архив astra-linux-smolensk-1.5-pg96_x86_64.tar.gz, поставляемые на дистрибутивном диске InfoWatch Traffic Monitor, в любую директорию на жестком диске сервера. Например, в директорию /distr.Введите команду для перехода в нужную директорию:
cd /<директория_с_архивом> где /<директория_с_архивом> - путь к директории, содержащей архив astra-linux-smolensk-1.5-pg96_x86_64.tar.gz.
В нашем примере команда будет следующей: cd /distr Введите команду для извлечения архива:
sudo tar -xzf astra-linux-smolensk-1.5-pg96_x86_64.tar.gz -C /optВведите команду для перехода в нужную директорию:
cd /opt Выполните следующую команду:
sudo mv astra-linux-smolensk-1.5-pg96-local.list /etc/apt/sources.list.d Выполните следующую команду:
sudo apt-get update
Выполните команды для остановки перехватчиков:
service iwtm stop expressd service iwtm stop xapi_xapi service iwtm stop xapi_puppy | Информация |
|---|
| Если в Системе используются два и более серверов перехвата, то к следующему действию следует переходить после выполнения указанных действий на каждом из этих серверов. | Дождитесь, пока обработаются все события, стоящие в очереди на обработку. События, находящиеся в очереди, хранятся в следующих директориях: 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/
По завершении обработки событий данные директории должны стать пустыми. | Предупреждение |
|---|
| До продолжения обновления настоятельно рекомендуется убедиться в том, что все указанные выше директории пусты . В противном случае нельзя гарантировать успешное обновление и дальнейшую работоспособность Системы. Если по какой-либо причине дождаться завершения обработки невозможно, вы можете удалить события из очереди, при этом такие события будут полностью удалены из Системы. Чтобы удалить событие, перейдите в нужную директорию в файловом менеджере, установите курсор на планируемом к удалению событии и нажмите F8, затем подтвердите удаление, выбрав в открывшемся окне Yes. |
Необходимо получить файл (имя файла - sd_nodes.out ), содержащий IP-адреса нод для обновления. Для этого запустите инталлятор .run с параметром: sudo bash /<директория_с_файлом>/iwtm-installer-x.x.x.xxx-astra-smolensk.run -- --before-upgrade где <директория_с_файлом> - путь к директории, содержащей файл iwtm-installer-x.x.x.xxx-astra-smolensk.run.Выберите инструкцию по обновлению в зависимости от версии Traffic Monitor, до которой обновляется Система: 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 Removed 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 Removed 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 RemovedIn 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 Removed 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 Removed
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 Removed | Информация |
|---|
| 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 Removed
| Информация |
|---|
| 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. Make sure that the file content includes the following text:
[rhel-dvd] name=Red Hat Enterprise Linux $releasever - $basearch - DVD baseurl=file:///mnt/rhel-dvd/ enabled=0 gpgcheck=0
[rhel-dvd-iwtm] name=DVD_IWTM baseurl=file:///mnt/rhel-dvd/infowatch/traffic-monitor/Linux/ enabled=0 gpgcheck=0
[rhel-dvd-iwtm-cfdb] name=DVD_IW-CFDB baseurl=file:///mnt/rhel-dvd/infowatch/traffic-monitor/cfdb/ enabled=0 gpgcheck=0
| Предупреждение |
|---|
| If the text of the file is different, replace it with the specified one. | In the [rhel-dvd] and [rhel-dvd-iwtm] blocks, change values of the enabled parameter from 0 to 1.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 iwtm-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 Removed . 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 Removed 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 Removed - Press F4.
Replace values of file sections with values of corresponding sections of the postgresql.conf file. The result will look like this: Image Removed | Информация |
|---|
| 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 Removed |
- 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 Removed
| 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 Removed 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 Removed 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 Removed | Информация |
|---|
| 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 Removed
| Информация |
|---|
| 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.Make sure that the file content includes the following text:
[rhel-dvd] name=Red Hat Enterprise Linux $releasever - $basearch - DVD baseurl=file:///mnt/rhel-dvd/ enabled=0 gpgcheck=0
[rhel-dvd-iwtm] name=DVD_IWTM baseurl=file:///mnt/rhel-dvd/infowatch/traffic-monitor/Linux/ enabled=0 gpgcheck=0
[rhel-dvd-iwtm-cfdb] name=DVD_IW-CFDB baseurl=file:///mnt/rhel-dvd/infowatch/traffic-monitor/cfdb/ enabled=0 gpgcheck=0
| Предупреждение |
|---|
| If the text of the file is different, replace it with the specified one. | In the [rhel-dvd] and [rhel-dvd-iwtm] blocks, change values of the enabled parameter from 0 to 1. If you want to install a new standard classification base (the old classification base and changes made to it will be lost), in the [rhel-dvd-iwtm-cfdb] block, change the value of the enabled parameter from 0 to 1. 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 If Oracle DBMS is used in the System, perform the following steps:
- Enter the command to stop Oracle DBMS:
service oracle stop - Enter the command to switch to the required user:
su - oracle - Enter the command to get the list of patches installed in the System:
/u01/app/oracle/product/db_1/OPatch/opatch lsinventory | grep "Patch" | grep "applied" Image Removed The list of patches installed in the System will be displayed on the screen. Write down all numbers which go after "Patch" (or it can be the first eight 8 digits after p. For example, for p19972569_112040_Linux-x86-64.zip patch, the number is 19972569). These numbers are needed to compare installed patches with patches which are needed for the update. - Again, enter the command to call the file manager:
mc Go to the /mnt/rhel-dvd/infowatch/extras/OraclePatches directory and make sure that patch numbers in the directory are in the list of patches installed in the System (which you have written down). Image Removed | Информация |
|---|
| If any patch from the /mnt/rhel-dvd/infowatch/extras/OraclePatches directory is not in the list of installed patches, you should install this patch. To install the patch, perform the following steps (the sample below is for a patch with the number 12345678 - p12345678_112040_Linux-x86-64.zip): - To exit the file manager (is required to better control of command execution), enter the command:
exit - To extract the patch, enter the command:
unzip /mnt/rhel-dvd/infowatch/extras/OraclePatches/p12345678_112040_Linux-x86-64.zip -d /tmp/ - When the patch is unpacked, the System prompts you to press any key to continue:
Image Removed - Press any key to continue.
- Enter the command to go to the required directory:
cd /tmp/12345678/ - Enter the command to install the patch:
/u01/app/oracle/product/db_1/OPatch/opatch napply -silent -skip_subset -skip_duplicate Once the patch is installed, the screen will display the message: Image Removed - Press any key to continue.
- Enter the command to delete files which are not longer needed:
cd /tmp/ && rm -rf /tmp/12345678/ && rm -f /tmp/PatchSearch.xml
|
- if Midnight Commander file manager is running, enter the command to exit it (this is required for better control of command execution):
exit - enter the command to switch to the root user:
logout - enter the command to start Oracle DBMS:
service oracle start 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 Removed . 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 Removed 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 Removed - Press F4.
Replace values of file sections with values of corresponding sections of the postgresql.conf file. The result will look like this: Image Removed | Информация |
|---|
| 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 Removed |
- 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 (if Oracle DBMS is used); -
/opt/iw/tm5/csw/postgres (if PostgreSQL DBMS is used). Select the database.conf file.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.To exit the file manager (is required to better control command execution), enter the command: exit To stop services, enter the commands one by one:
service iwtm stop | Информация |
|---|
| If in the System, the Crawler subsystem is installed you need to stop services of this subsystem (on Crawler server). This is done on the server where the subsystem is installed with Windows standard tools: Start - Control Panel - Administrative Tools - Services, then select the service in the list and click Stop service. | Make sure that there are no active users connected to the server via the management console. Depending on DBMS, enter the command to switch to the required user: -
su - oracle - to switch to the oracle user (if Oracle DBMS is used in the System) -
su - postgres - to switch to the postgres user (if СУБД PostgreSQL DBMS is used in the System) Depending on DBMS, enter the command to go to the required directory: -
cd /opt/iw/tm5/csw/oracle - (if Oracle DBMS is used in the System) -
cd /opt/iw/tm5/csw/postgres - (if СУБД PostgreSQL DBMS is used in the System) Enter the command to start the database update script: ./update.sh The process of updating the database scheme will start. It may take some time. If web-gui package is installed on the DBMS server установлен на сервере СУБД (TME DB Server), enter the command to clear the cache: redis-cli flushall To switch back to the root user, enter the command: logout Enter the command to restart the server: reboot Wait until the server is started and log in under root (STEP 1, actions 2 and 3 in this instruction).Enter the command to check if the processes are started: service iwtm status The screen will display the list of processes and their status. The services must be started and the lines must end with "is running...": Image Removed Start all TM Servers (TME Node Server) - see the description below.STEP 3. RESTARTING TM SERVERS (TME Node Server) To restart TM servers (TME Node Server), take the following steps on each server: If web-gui package is installed on TM server (TME Node Server), enter the command to clear the cache: redis-cli flushall Enter the command to restart the server: reboot Wait until the server is started and log in under root (STEP 1, actions 2 and 3 in this instruction).Enter the command to check if the processes are started: service iwtm status The screen will display the list of processes and their status. Generally, iw_qmover_client and iw_qmover_server services are stopped and all other services are started. For iw_qmover_client and iw_qmover_server services, the lines should end with "is stopped (disabled)..." and for all other services, the lines should end with "is running...": Image Removed | Информация |
|---|
| If in the System, the Crawler subsystem is installed you need to start services of this subsystem (on Crawler server). This is done on the server where the subsystem is installed with Windows standard tools: Start - Control Panel - Administrative Tools - Services, then select the service in the list and click Start service . |
Updating Traffic Monitor servers of the distributed type is complete. Version of the System in the About window of the Management Console will be changed. If the System includes other servers or subsystems to be updated, follow instructions in this section. | Информация |
|---|
| For the Management Console to be displayed correctly, delete the cache in your browser before you start working in the Management Console. This is done with browser standard tools. | | Раскрыть |
|---|
| title | Обновление Traffic Monitor на Astra Linux 1.5 до версий 6.10.0 и 6.10.1 |
|---|
| | Якорь |
|---|
| Astra 1.5 distr update |
|---|
| Astra 1.5 distr update |
|---|
| Порядок обновления следующий:
Шаг 1. Обновление всех серверов TM (TM Node). Шаг 2. Обновление и перезапуск сервера СУБД (DB Node). Шаг 3. Перезапуск всех серверов TM (TM Node). | Предупреждение |
|---|
| Права пользователя, созданного на этапе установки, ограничены в операционной системе, поэтому: при выполнении части команд в командной строке потребуется использовать программу sudo. Например, для создания директории disk1 в корневой директории необходимо ввести команду: sudo mkdir /disk1 копировать данные по SSH можно только в домашний каталог пользователя и вложенные в него каталоги (например, это касается дистрибутива Traffic Monitor при копировании его на компьютер по SSH).
Чтобы работать с правами пользователя root, в командной строке введите sudo su. Внимание! К данному способу работы, ввиду возможности допустить серьезную ошибку, крайне не рекомендуется прибегать без помощи специалистов компании InfoWatch. |
ШАГ 1. ОБНОВЛЕНИЕ ВСЕХ СЕРВЕРОВ TM (TM Node) Чтобы обновить серверы TM (TM Node), на каждом из них выполните следующие действия: - Откройте консоль обновляемого сервера.
Введите имя пользователя, от имени которого планируется обновление, и нажмите Enter. - Введите пароль и нажмите Enter.
Вызовите командную строку (например, терминал Fly). Введите команду для вызова файлового менеджера: sudo mc
Image Added На экране отобразится окно файлового менеджера Midnight Commander, в котором удобно просматривать файлы.
- Перейдите в директорию
/opt/iw/tm5 и убедитесь в наличии там файла iwks_mode.
Image Added
| Информация |
|---|
| Если файл iwks_mode отсутствует в директории, то его необходимо создать. Для этого введите команду: touch iwks_mode
|
Убедитесь, что содержимое файла - слово "iwtm". | Информация |
|---|
| Если файл имеет другое содержимое, удалите все символы и введите: iwtm |
Для подготовки Системы к обновлению, выполните действия: На Сервере СУБД (TME DB Server): Выполните действия 1-7 Шага 2 (см. ниже). Перейдите в директорию /opt/iw/tm5/etc, установите курсор на файл serman.conf и нажмите F3. - В блоке
DefaultInterface найдите IP-адрес.
На всех Серверах TM (TME Node Server): Перейдите в директорию /opt/iw/tm5/etc, установите курсор на файл serman_client.conf и нажмите F4. - Найдите блок
SermanHost. Сравните его значение с IP-адресом, который указан в файле serman.conf на Сервере СУБД (TME DB Server). - Если они не совпадают, замените значение в блоке SermanHost на СерверахTM (TME Node Server) на IP-адрес, который указан в блоке
DefaultInterface файла serman.conf на Сервере СУБД (TME DB Server). - Нажмите F2.
- В открывшемся окне подтвердите сохранение файла, нажав Save.
- Нажмите F10.
- На Сервере СУБД (TME DB Server) нажмите F3.
- Откройте файл sources.list, расположенный в директории
/etc/apt, и проверьте соответствие его содержимого следующему виду:
deb file:///директория_1/ smolensk main non-free contrib
deb file:///директория_2/ smolensk main non-free
где: директория_1 - это абсолютный путь к директории, в которой сохранены данные с диска Astra-Linux-Smolenskдиректория_2 - это абсолютный путь к директории, в которой сохранены данные с диска Astra-Linux-Smolensk-Devel
- Закройте файл sources.list.
Перейдите в указанные в файле директории, и убедитесь в наличии в них папок и файлов репозиториев. - Для выхода из файлового менеджера (требуется для лучшего контроля выполнения команд) введите команду:
exit - Если в указанных директориях не созданы репозитории, создайте их (см. статью "Установка TM в режиме "Все-в-одном", действия 5-11).
- Cкопируйте файл iwtm-installer-x.x.x.xxx-astra-smolensk.run (где x.x.x.xxx - номер сборки) и архив astra-linux-smolensk-1.5-pg96_x86_64.tar.gz, поставляемые на дистрибутивном диске InfoWatch Traffic Monitor, в любую директорию на жестком диске сервера.
Например, в директорию /distr. - Введите команду для перехода в нужную директорию:
cd /<директория_с_архивом>
где /<директория_с_архивом> - путь к директории, содержащей архив astra-linux-smolensk-1.5-pg96_x86_64.tar.gz.
В нашем примере команда будет следующей:
|
sudo bash /distr/iwtm-installer-6.10.0.279-astra-smolensk.run -- --before-upgrade
Примерный вывод в консоль будет таким: See log files for more details:
/var/log/infowatch/generate_serman_services_nodes_for_consul.out
/var/log/infowatch/generate_serman_services_nodes_for_consul.err
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-===============-============-============-===================================
ii iwtm-serman-cli 6.7.12.200-r amd64 InfoWatch Traffic Monitor Service M
WARNING: missing binary '/opt/iw/tm5/bin/serman_prober', trying to install 'iwtm-qatools' package...
Reading package lists...
Building dependency tree...
Reading state information...
...
ldconfig deferred processing now taking place
==> /opt/iw/tm5/tmp/sd_nodes.out <==
10.20.30.40
10.20.30.41
OK: Please copy the file to all nodes before upgrading TM on them, e.g.:
scp /opt/iw/tm5/tmp/sd_nodes.out 10.20.30.40:/opt/iw/tm5/tmp/sd_nodes.out
scp /opt/iw/tm5/tmp/sd_nodes.out 10.20.30.41:/opt/iw/tm5/tmp/sd_nodes.outСкопируйте файл sd_nodes.out на все указанные ноды, исключая ту, на которой он был создан. Выполните команды: sudo scp /opt/iw/tm5/tmp/sd_nodes.out <имя_пользователя_1>@10.20.30.40:/home/<имя_пользователя_1>/sd_nodes.out
sudo scp /opt/iw/tm5/tmp/sd_nodes.out <имя_пользователя_2>@10.20.30.41:/home/<имя_пользователя_2>/sd_nodes.out где <имя_пользователя_1>, <имя_пользователя_2> - пользователи, которые имеют права на работу в указанной директории на целевой машине. После ввода команды копирования необходимо будет ввести пароль от целевой ноды.| Информация |
|---|
| На всех обновляемых серверах файл sd_nodes.out необходимо переместить в директорию /opt/iw/tm5/tmp | Введите команду для остановки сервисов сервера Traffic Monitor: service iwtm stop service iwtm-php5-fpm stop service nagios3 stopВыполните следующую команду:
sudo bash /<директория_с_файлом>/iwtm-installer-x.x.x.xxx-astra-smolensk.run
В нашем примере команда будет следующей: sudo bash /distr/iwtm-installer-6.10.0.279-astra-smolensk.run
Начнется распаковка файлов, необходимых для установки Traffic Monitor. Image Removed
По завершении на экране отобразится окно с приглашением установить Traffic Monitor (номер в окне соответствует номеру устанавливаемой версии Системы): Image RemovedДля продолжения нажмите Continue. В открывшемся окне, оповещающем о том, что найдена более ранняя версия InfoWatch Traffic Monitor, нажмите Update:
Image RemovedУбедитесь в том, что обновление завершилось - в консоли отобразится сообщение вида:
Image RemovedОбновите сервер СУБД (DB Node) - описание смотрите ниже.ШАГ 2. ОБНОВЛЕНИЕ СЕРВЕРА СУБД (DB Node) Чтобы обновить Сервер СУБД (DB Node), выполните следующие действия: - Откройте консоль обновляемого сервера.
Введите имя пользователя, от имени которого планируется обновление, и нажмите Enter. - Введите пароль и нажмите Enter.
Вызовите командную строку (например, терминал Fly). Введите команду для вызова файлового менеджера: mc
- Перейдите в директорию
/opt/iw/tm5 и убедитесь в наличии там файла iwks_mode.
Image Removed
| Информация |
|---|
| Если файл iwks_mode отсутствует в директории, то его необходимо создать. Для этого введите команду: touch iwks_mode
|
Убедитесь, что содержимое файла - слово "iwdb". | Информация |
|---|
| Если файл имеет другое содержимое, удалите все символы и введите iwdb | Вставьте в CD-привод диск Astra-Linux-Smolensk-1.5_x86_64.Скопируйте все содержимое диска в произвольную директорию на жестком диске. Например, в директорию /disk1. Вставьте в CD-привод диск Astra-Linux-Smolensk-Devel-1.5_x86_64.Скопируйте все содержимое диска в произвольную директорию на жестком диске. Например, в директорию /disk2.Откройте на редактирование файл sources.list, расположенный в директории /etc/aptУдалите все строки и введите следующее:
deb file:///директория_1/ smolensk main non-free contrib
deb file:///директория_2/ smolensk main non-free
где: директория_1 - это абсолютный путь к директории, в которой сохранены данные с диска Astra-Linux-Smolensk-1.5_x86_64директория_2 - это абсолютный путь к директории, в которой сохранены данные с диска Astra-Linux-Smolensk-Devel-1.5_x86_64
В нашем примере текст файла будет следующим: deb file:///disk1/ smolensk main non-free contrib
deb file:///disk2/ smolensk main non-free
Сохраните файл sources.list. Выполните следующую команду:
sudo mv /home/<имя_пользователя_1>/sd_nodes.out /opt/iw/tm5/tmp
В нашем примере команда будет следующей:
sudo mv /home/astra/sd_nodes.out /opt/iw/tm5/tmpCкопируйте файл iwtm-installer-x.x.x.xxx-astra-smolensk.run (где x.x.x.xxx - номер сборки) и архив astra-linux-smolensk-1.5-pg96_x86_64.tar.gz, поставляемые на дистрибутивном диске InfoWatch Traffic Monitor, в любую директорию на жестком диске сервера. Например, в директорию /distr.Введите команду для перехода в нужную директорию:
cd /<директория_с_архивом/ где /<директория_с_архивом>/ - путь к директории, содержащей архив astra-linux-smolensk-1.5-pg96_x86_64.tar.gz.
В нашем примере команда будет следующей: cd /distr Введите команду для извлечения архива:
sudo tar -xzf astra-linux-smolensk-1.5-pg96_x86_64.tar.gz -C /optВведите команду для перехода в нужную директорию:
cd /opt Выполните следующую команду:
sudo mv astra-linux-smolensk-1.5-pg96-local.list /etc/apt/sources.list.d Выполните следующую команду:
sudo apt-get update Выполните следующую команду:
sudo mv /home/<имя_пользователя>/su_nodes.out /opt/iw/tm5/tmp
где <имя_пользователя> - пользователь, который имеет права на работу в указанной директории. В нашем примере команда будет следующей: sudo mv /home/astra/su_nodes.out /opt/iw/tm5/tmp Введите команду для остановки служб:
service iwtm stop Убедитесь, что нет активных пользователей, подключенных к серверу через консоль управления (во всех веб-консолях произведен выход). Выполните следующую команду:
sudo bash /<директория_с_файлом>/iwtm-installer-x.x.x.xxx-astra-smolensk.run
где <директория_с_файлом> - путь к директории, содержащей файл iwtm-installer-x.x.x.xxx-astra-smolensk.run. В нашем примере команда будет следующей: sudo bash /distr/iwtm-installer-6.10.0.279-astra-smolensk.run
Начнется распаковка файлов, необходимых для установки Traffic Monitor. Image Removed
По завершении на экране отобразится окно с приглашением установить Traffic Monitor (номер в окне соответствует номеру устанавливаемой версии Системы): Image RemovedДля продолжения нажмите Continue. В открывшемся окне, оповещающем о том, что найдена более ранняя версия InfoWatch Traffic Monitor, нажмите Update:
Image RemovedУбедитесь в том, что обновление завершилось - в консоли отобразится сообщение вида:
Image Removed Выполните обновление СУБД PostgreSQL. Для переключения на пользователя postgres введите команду:
su - postgres Введите команду для запуска скрипта (сценария) обновления БД:
sudo bash /opt/iw/tm5/csw/postgres/update.sh Введите команду:
exitВведите команду для перезагрузки сервера: rebootДождитесь загрузки сервера и повторите действия 1, 2 и 3 ШАГА 1 данной инструкции.Введите команду для проверки запуска процессов: service iwtm status На экране отобразится список процессов и их статус. Сервисы должны быть запущены, при этом строки должны заканчиваться фразой "is running...": Image Removed Запустите все Серверы TM (TM Node) - описание смотрите ниже. ШАГ 3. ПЕРЕЗАПУСК СЕРВЕРОВ TM (TM Node) Чтобы перезапустить Серверы TM (TM Node), на каждом из них выполните следующие действия: На сервере TM (TME Node Server), на котором функционирует пакет web-gui, введите команду для очистки кеша: redis-cli flushall Введите команду для перезагрузки сервера: reboot- Дождитесь загрузки сервера и повторите действия 1, 2 и 3 ШАГА 1 данной инструкции.
Введите команду для проверки запуска процессов: service iwtm status На экране отобразится список процессов и их статус: Image Removed
Обновление серверов Traffic Monitor распределенного типа установки завершено. Номер версии Системы в окне О системе Консоли управления Traffic Monitor должен измениться на новый. Если в Системе есть другие серверы или подсистемы, подлежащие обновлению, воспользуйтесь инструкциями данного раздела. | Информация |
|---|
| Для корректного отображения консоли управления до начала работ удалите кеш в вашем браузере. Данное действие выполняется стандартными средствами браузера. |
|