Медицина/Установка: различия между версиями
Admin (обсуждение | вклад) Нет описания правки |
Admin (обсуждение | вклад) |
||
| (не показана 41 промежуточная версия этого же участника) | |||
| Строка 1: | Строка 1: | ||
== Настройка сервера - Ubuntu, Debian == | |||
'''Все действия выполнять от пользователя root''' | '''Все действия выполнять от пользователя root''' | ||
Устанавливаем '''git, unzip, vim''' | === Устанавливаем '''git, unzip, vim, openssl''' === | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
sudo apt-get update && apt-get install --assume-yes git unzip vim openssl openssh-server | sudo apt-get update && apt-get install --assume-yes git unzip vim openssl openssh-server curl | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Устанавливаем автоматически Docker === | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh | |||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Ручная установка Docker === | |||
* [https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository Ununtu] | |||
* [https://docs.docker.com/engine/install/debian/#install-using-the-repository Debian] | |||
== Настройка сервера РЕД ОС == | |||
'''Все действия выполнять от пользователя root''' | |||
Устанавливаем | === Устанавливаем '''git, unzip, vim, openssl''' === | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
dnf --assumeyes update && dnf install --assumeyes git unzip vim openssl openssh-server | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Устанавливаем базовые образы | === Установка === | ||
<syntaxhighlight lang="bash"> | |||
dnf install docker-ce docker-ce-cli docker-compose | |||
</syntaxhighlight> | |||
=== Автозапуск Docker === | |||
<syntaxhighlight lang="bash"> | |||
systemctl enable docker --now | |||
</syntaxhighlight> | |||
=== Ручная установка Docker === | |||
* [https://redos.red-soft.ru/base/arm/arm-other/docker-install/ РЕД ОС] | |||
== Установка системы == | |||
=== Клонируем репозиторий с настройками === | |||
<syntaxhighlight lang="bash"> | |||
cd /root && git -c http.sslVerify=false clone https://git.med-logic.ru/ilya.muhortov/medicine-config.git | |||
</syntaxhighlight> | |||
=== Устанавливаем базовые образы === | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
. /root/medicine-config/bash_scripts/install-base.sh | . /root/medicine-config/bash_scripts/install-base.sh | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Устанавливаем МИС Медицина | === Устанавливаем МИС Медицина === | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
. /root/medicine-config/bash_scripts/install-medicine.sh | . /root/medicine-config/bash_scripts/install-medicine.sh | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Устанавливаем РЭМД | === Устанавливаем РЭМД === | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
. /root/medicine-config/bash_scripts/install-remd.sh | . /root/medicine-config/bash_scripts/install-remd.sh | ||
</syntaxhighlight> | |||
=== Устанавливаем сервис проверки полисов === | |||
<syntaxhighlight lang="bash"> | |||
. /root/medicine-config/tfoms-patient/install.sh | |||
</syntaxhighlight> | |||
=== Сброс пароля администратора === | |||
<syntaxhighlight lang="bash"> | |||
. /root/medicine-config/medicine/reset_password.sh | |||
</syntaxhighlight> | |||
== Автообновление == | |||
С помощью планировщика задач cron добавить следующие задачи | |||
<syntaxhighlight lang="bash"> | |||
export EDITOR="vim" && crontab -e | |||
</syntaxhighlight> | |||
<syntaxhighlight lang="bash"> | |||
00 21 * * * /root/medicine-config/update_repository.sh | |||
30 13 * * * /root/medicine-config/medicine-remd/update.sh | |||
50 13 * * * /root/medicine-config/medicine-remd/backup_database.sh | |||
20 13 * * * /root/medicine-config/medicine/update.sh | |||
55 13 * * * /root/medicine-config/medicine/backup_database.sh | |||
00 00 * * * /root/medicine-config/scripts/docker-cleanup.sh | |||
</syntaxhighlight> | |||
== Docker Compose alias == | |||
<syntaxhighlight lang="bash"> | |||
ln -f -s /usr/libexec/docker/cli-plugins/docker-compose /usr/bin/docker-compose | |||
</syntaxhighlight> | |||
== Docker через прокси == | |||
Создать файл | |||
/etc/systemd/system/docker.service.d | |||
<syntaxhighlight lang="bash"> | |||
[Service] | |||
Environment="HTTP_PROXY=http://proxy-host/" | |||
Environment="NO_PROXY=localhost,127.0.0.1" | |||
</syntaxhighlight> | |||
Добавить в файл /etc/docker/daemon.json | |||
<syntaxhighlight lang="json"> | |||
{ | |||
"insecure-registries": ["docker.med-logic.ru:80"] | |||
} | |||
</syntaxhighlight> | |||
В файл ~/.docker/config.json | |||
<syntaxhighlight lang="json"> | |||
{ | |||
"auths": { | |||
"docker.med-logic.ru:80": { | |||
"auth": "" | |||
} | |||
} | |||
} | |||
</syntaxhighlight> | |||
Перезапустить сервис | |||
<syntaxhighlight lang="bash"> | |||
systemctl daemon-reload | |||
systemctl restart docker | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Текущая версия от 02:40, 7 декабря 2025
Настройка сервера - Ubuntu, Debian
Все действия выполнять от пользователя root
Устанавливаем git, unzip, vim, openssl
sudo apt-get update && apt-get install --assume-yes git unzip vim openssl openssh-server curl
Устанавливаем автоматически Docker
curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh
Ручная установка Docker
Настройка сервера РЕД ОС
Все действия выполнять от пользователя root
Устанавливаем git, unzip, vim, openssl
dnf --assumeyes update && dnf install --assumeyes git unzip vim openssl openssh-server
Установка
dnf install docker-ce docker-ce-cli docker-compose
Автозапуск Docker
systemctl enable docker --now
Ручная установка Docker
Установка системы
Клонируем репозиторий с настройками
cd /root && git -c http.sslVerify=false clone https://git.med-logic.ru/ilya.muhortov/medicine-config.git
Устанавливаем базовые образы
. /root/medicine-config/bash_scripts/install-base.sh
Устанавливаем МИС Медицина
. /root/medicine-config/bash_scripts/install-medicine.sh
Устанавливаем РЭМД
. /root/medicine-config/bash_scripts/install-remd.sh
Устанавливаем сервис проверки полисов
. /root/medicine-config/tfoms-patient/install.sh
Сброс пароля администратора
. /root/medicine-config/medicine/reset_password.sh
Автообновление
С помощью планировщика задач cron добавить следующие задачи
export EDITOR="vim" && crontab -e
00 21 * * * /root/medicine-config/update_repository.sh
30 13 * * * /root/medicine-config/medicine-remd/update.sh
50 13 * * * /root/medicine-config/medicine-remd/backup_database.sh
20 13 * * * /root/medicine-config/medicine/update.sh
55 13 * * * /root/medicine-config/medicine/backup_database.sh
00 00 * * * /root/medicine-config/scripts/docker-cleanup.sh
Docker Compose alias
ln -f -s /usr/libexec/docker/cli-plugins/docker-compose /usr/bin/docker-compose
Docker через прокси
Создать файл /etc/systemd/system/docker.service.d
[Service]
Environment="HTTP_PROXY=http://proxy-host/"
Environment="NO_PROXY=localhost,127.0.0.1"
Добавить в файл /etc/docker/daemon.json
{
"insecure-registries": ["docker.med-logic.ru:80"]
}
В файл ~/.docker/config.json
{
"auths": {
"docker.med-logic.ru:80": {
"auth": ""
}
}
}
Перезапустить сервис
systemctl daemon-reload
systemctl restart docker